/* ==========================================================================
   Senior Cobb — seniorcobb.com
   Hand-rolled CSS. No framework, no build step.

   Each section is built as the thing it's named after:
     The Cob    → tenets grow as kernels down a cob rail
     Kernels    → project cards packed like kernels, domed and staggered
     The Silo   → a real grain silo with roof, corrugation, ladder and base
     The Field  → sky, planted rows, a crop line and tilled soil
     Ear Me Out → the contact panel is an ear, wrapped in husk with silk on top
   ========================================================================== */

/* ── 1. TOKENS ───────────────────────────────────────────────────────────── */

:root {
  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;

  --ease: cubic-bezier(.22, .68, 0, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
}

/* Dark — "midnight in the corn field" (default) */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:          #101a0d;
  --bg-deep:     #0a1208;
  --surface:     #17250f;
  --surface-2:   #1e3014;
  --line:        rgba(255, 224, 148, .13);
  --line-strong: rgba(255, 224, 148, .26);

  --text:        #F4EDD9;
  --text-dim:    #A8B392;
  --text-faint:  #828F6B;

  --butter:      #FFD75E;
  --corn:        #F0AF1E;
  --corn-deep:   #C98307;
  --husk:        #86BC45;
  --husk-deep:   #4E7A2B;
  --accent-ink:  #1A1305;
  --soil:        #23190B;

  /* --butter is a FILL colour. --accent-text is the readable-on-background
     twin; on cream, raw butter only hits ~2:1 so it must not carry text. */
  --accent-text: #FFD75E;
  --display-grad: linear-gradient(150deg, #FFF0B8 0%, #FFD75E 38%, #F0AF1E 72%, #86BC45 130%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow:    0 18px 44px -18px rgba(0, 0, 0, .8);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .9);

  --grain-opacity: .05;
  --glow: radial-gradient(60% 55% at 68% 18%, rgba(240, 175, 30, .20), transparent 70%),
          radial-gradient(45% 45% at 12% 72%, rgba(134, 188, 69, .14), transparent 70%);

  /* corn illustration */
  --cob-lo:    #D9930E;
  --cob-hi:    #FFCE55;
  --husk-hi:   #6FA637;
  --husk-lo:   #3B6B1F;
  --kernel-hi: #FFF0B8;
  --kernel-mid:#FFC93F;
  --kernel-lo: #D08908;
  --silk:      #E8CE86;
}

/* Light — "buttered & sunlit" */
:root[data-theme="light"] {
  color-scheme: light;

  --bg:          #FFF7E2;
  --bg-deep:     #FBEFCF;
  --surface:     #FFFDF6;
  --surface-2:   #FFF4D8;
  --line:        rgba(60, 45, 10, .14);
  --line-strong: rgba(60, 45, 10, .28);

  --text:        #1D2A13;
  --text-dim:    #5A6A45;
  --text-faint:  #636E4C;

  --butter:      #E9A100;
  --corn:        #CE8305;
  --corn-deep:   #A66504;
  --husk:        #3F6B1E;
  --husk-deep:   #2C5117;
  --accent-ink:  #2A1D02;
  --soil:        #C9A87A;

  --accent-text: #8A5A02;
  --display-grad: linear-gradient(150deg, #C98305 0%, #A9690A 38%, #8A5A02 72%, #3F6B1E 130%);

  --shadow-sm: 0 2px 8px rgba(90, 66, 12, .10);
  --shadow:    0 18px 40px -20px rgba(90, 66, 12, .35);
  --shadow-lg: 0 40px 80px -34px rgba(90, 66, 12, .40);

  --grain-opacity: .035;
  --glow: radial-gradient(60% 55% at 68% 18%, rgba(233, 161, 0, .16), transparent 70%),
          radial-gradient(45% 45% at 12% 72%, rgba(78, 127, 39, .10), transparent 70%);

  --cob-lo:    #E8A616;
  --cob-hi:    #FFD873;
  --husk-hi:   #6FA637;
  --husk-lo:   #3E6E20;
  --kernel-hi: #FFF8D8;
  --kernel-mid:#FFCB48;
  --kernel-lo: #D9910E;
  --silk:      #C6A45A;
}

/* ── 2. BASE ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: inherit; }

/* the <use> symbol library — present but never rendered directly */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -.02em;
  margin: 0;
  font-variation-settings: "opsz" 100;
}

p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }
code, kbd { font-family: var(--font-mono); font-size: .88em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--butter); color: var(--accent-ink);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.grain {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.section { position: relative; padding-block: clamp(5rem, 11vw, 8.5rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 1.1rem;
}
.eyebrow-dot {
  width: 9px; height: 9px; flex: none;
  /* a kernel, not a circle */
  border-radius: 50% 50% 42% 42% / 58% 58% 42% 42%;
  background: var(--butter);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--butter) 18%, transparent);
}
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
.section-sub {
  margin-top: 1.1rem; color: var(--text-dim);
  font-size: 1.06rem; max-width: 38rem;
}

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.6rem;
  border-radius: 999px;
  font-weight: 600; font-size: .96rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .3s var(--ease-pop), background-color .25s, border-color .25s, box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2; }
.btn-primary {
  background: var(--butter); color: var(--accent-ink);
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--butter) 70%, transparent);
}
.btn-primary svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -12px color-mix(in srgb, var(--butter) 75%, transparent); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost .ic-gh { fill: currentColor; stroke: none; }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--butter); background: color-mix(in srgb, var(--butter) 8%, transparent); }

/* ── 3. NAV ──────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 74px;
}

.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  text-decoration: none; font-family: var(--font-display);
  font-weight: 900; font-size: 1.22rem; letter-spacing: -.02em;
  flex: none;
}
.brand-mark { width: 30px; height: 30px; flex: none; }
.bm-cob { fill: var(--corn); }
.bm-husk { fill: var(--husk); }
.bm-kernels rect { fill: var(--kernel-hi); opacity: .92; }
.brand:hover .brand-mark { animation: wiggle .6s var(--ease); }
.brand-accent { color: var(--accent-text); }

.nav-links { display: flex; gap: .35rem; }
.nav-links a {
  position: relative;
  padding: .55rem .9rem; border-radius: 999px;
  text-decoration: none; font-size: .92rem; font-weight: 500;
  color: var(--text-dim); white-space: nowrap;
  transition: color .22s, background-color .22s;
}
.nav-links a:hover { color: var(--text); background: color-mix(in srgb, var(--butter) 10%, transparent); }
.nav-links a.is-active { color: var(--accent-text); background: color-mix(in srgb, var(--butter) 12%, transparent); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }

.theme-toggle {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--line);
  transition: color .22s, border-color .22s, transform .35s var(--ease-pop);
}
.theme-toggle:hover { color: var(--accent-text); border-color: var(--butter); transform: rotate(18deg); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .ic-moon { display: none; }
:root[data-theme="light"] .theme-toggle .ic-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ic-moon { display: block; }

.nav-burger {
  display: none;
  width: 42px; height: 40px; flex: none;
  background: transparent; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer;
  padding: 0; place-content: center; gap: 4px;
}
.nav-burger span {
  display: block; width: 17px; height: 2px; border-radius: 2px;
  background: var(--text); margin-inline: auto;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--husk), var(--butter));
  transition: width .1s linear;
}

/* ── 4. HERO ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(7rem, 12vw, 10rem);
  overflow: hidden;
  isolation: isolate;
}
.hero-glow { position: absolute; inset: -20% -10% 0; background: var(--glow); pointer-events: none; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--butter) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--butter) 5%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 78%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 78%);
}

.hero-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.h1-kicker {
  display: block;
  font-family: var(--font-mono); font-weight: 400;
  font-size: clamp(.85rem, 1.6vw, 1rem);
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .9rem;
}
.h1-main {
  display: block;
  font-size: clamp(3.1rem, 10.5vw, 7.2rem);
  font-variation-settings: "opsz" 144;
  background: var(--display-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-bottom: .08em;
}

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 500; line-height: 1.35;
  margin: 1.4rem 0 1rem;
}
.lede em { font-style: italic; color: var(--accent-text); }

.hero-body { color: var(--text-dim); max-width: 34rem; font-size: 1.04rem; }
.hero-body strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 2.75rem; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3rem);
  margin: 0; padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.hero-stats div { display: grid; gap: .15rem; }
.hero-stats dt {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint);
}
.hero-stats dd {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: 1.9rem; line-height: 1; color: var(--accent-text);
  font-variation-settings: "opsz" 144;
}
.hero-stats .dd-zero { color: var(--husk); }
.hero-stats .dd-focus { color: var(--husk); font-size: 1.35rem; letter-spacing: -.01em; }

/* the ear itself */
.hero-art { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.cob-stage {
  position: relative; width: min(100%, 440px); aspect-ratio: 2 / 3;
  display: block; padding: 0; overflow: hidden;
  cursor: default; touch-action: pan-y;
  color: inherit;
  background: #18200a;
  border: 1px solid color-mix(in srgb, var(--butter) 44%, transparent);
  border-radius: 28px 8px 28px 8px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.035) inset,
    0 34px 80px -24px rgba(0,0,0,.85),
    0 0 52px color-mix(in srgb, var(--butter) 10%, transparent);
  animation: float 7s ease-in-out infinite;
  transition: transform .4s var(--ease-pop), border-color .3s, box-shadow .3s;
}
.cob-stage::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255,255,255,.09), transparent 20% 72%, rgba(0,0,0,.28)),
    radial-gradient(circle at 50% 45%, transparent 48%, rgba(4,8,2,.45) 100%);
}
.cob-stage:hover {
  transform: scale(1.025) rotate(-.6deg);
  border-color: color-mix(in srgb, var(--butter) 78%, transparent);
  box-shadow: 0 38px 90px -24px rgba(0,0,0,.9), 0 0 70px color-mix(in srgb, var(--butter) 17%, transparent);
}
.cob-stage:active { transform: scale(.98); }
.cob-stage.can-harvest { cursor: grab; }
.cob-stage.is-dragging { cursor: grabbing; }
.cob-stage:focus-visible { outline: 2px solid var(--butter); outline-offset: 7px; }
.hero-corn {
  display: block; width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-drag: none;
  transition: transform .45s var(--ease-pop), filter .3s;
  filter: saturate(1.04) contrast(1.03);
}
.cob-stage:hover .hero-corn { transform: scale(1.018); }
.cob-stage.is-hit .hero-corn { animation: cobImpact .34s var(--ease-pop); }

.art-label {
  position: absolute; z-index: 6; pointer-events: none;
  font-family: var(--font-mono); font-size: .58rem; font-weight: 500;
  letter-spacing: .16em; color: rgba(255,247,220,.78);
  text-shadow: 0 1px 8px rgba(0,0,0,.85);
}
.art-label-top { left: 18px; top: 16px; }
.art-label-bottom { right: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: .5rem; }
.art-label-bottom i { width: 6px; height: 6px; border-radius: 50%; background: #bbef59; box-shadow: 0 0 10px #bbef59; }
.art-corner { position: absolute; z-index: 7; width: 38px; height: 38px; pointer-events: none; }
.art-corner-tl { left: 9px; top: 9px; border-left: 2px solid var(--butter); border-top: 2px solid var(--butter); }
.art-corner-br { right: 9px; bottom: 9px; border-right: 2px solid var(--butter); border-bottom: 2px solid var(--butter); }
.art-scan {
  position: absolute; left: 0; right: 0; top: -8%; z-index: 5; height: 14%; pointer-events: none;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--butter) 16%, transparent), transparent);
  mix-blend-mode: screen; opacity: .65; animation: scanArt 6s linear infinite;
}

.cob-body { fill: url(#gCob); }
.cob-shade { fill: url(#gShade); pointer-events: none; }

/* holding the ear on the diagonal is what keeps it from reading as a rocket */
.ear-tilt { transform: rotate(-16deg); transform-box: view-box; transform-origin: 200px 300px; }

.kernel {
  fill: url(#gKernel);
  /* the seam between kernels, rather than a gap of background showing through */
  stroke: rgba(120, 68, 4, .38);
  stroke-width: .9;
  transform-box: fill-box; transform-origin: center;
  animation: kernelShimmer 4.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.kernel.k-pale { fill: url(#gKernelPale); }
.kernel.is-popped { animation: kernelPop .7s var(--ease-pop) forwards; }

/* Husk leaves — shared by the hero ear and the contact ear.
   A descendant selector cannot reach into a <use> shadow tree, so the per-leaf
   colours are passed down as inherited custom properties instead. */
.leaf-blade { fill: var(--leaf-fill, var(--husk-hi)); }
.leaf-sheen { fill: #FFFFFF; opacity: .14; }
.leaf-vein  {
  fill: none; stroke-width: 6; stroke-linecap: round;
  stroke: var(--leaf-vein-color, color-mix(in srgb, var(--husk-lo) 75%, transparent));
}
.husk-base  { --leaf-fill: var(--husk-hi); --leaf-vein-color: rgba(0, 0, 0, .2); }
.husk { transform-origin: 200px 300px; }
.husk-back { animation: swayL 9s ease-in-out infinite; }
.husk-front { animation: swayR 9s ease-in-out infinite; }

.silk path {
  fill: none; stroke: var(--silk); stroke-width: 4; stroke-linecap: round;
  opacity: .85;
}

.pop-layer { position: absolute; inset: 0; z-index: 8; pointer-events: none; overflow: visible; }
.kernel-divot {
  position: absolute; width: 17px; height: 13px; border-radius: 48% 48% 42% 42%;
  translate: -50% -50%;
  background: radial-gradient(circle at 55% 60%, #4a2605, #1a0d02 72%);
  box-shadow: 0 1px 0 rgba(255,206,64,.22) inset, 0 0 7px rgba(0,0,0,.7);
  opacity: .88; transform: rotate(var(--rot)); animation: divotIn .25s var(--ease-pop) both;
}
.flying-kernel {
  position: absolute; width: var(--kw, 18px); height: var(--kh, 23px);
  translate: -50% -50%; border-radius: 52% 52% 43% 43% / 43% 43% 58% 58%;
  background: radial-gradient(circle at 32% 25%, #fff5aa 0 7%, #ffd84d 20%, #f2a70b 63%, #a95d02 100%);
  border: 1px solid rgba(113,60,0,.52);
  box-shadow: 2px 3px 5px rgba(0,0,0,.32), -2px -2px 3px rgba(255,255,210,.28) inset;
  will-change: transform, opacity;
  animation: kernelFly var(--flight, .9s) cubic-bezier(.16,.72,.28,1) forwards;
}

.cob-hint {
  margin: 0; font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
  transition: opacity .4s;
}
.cob-hint.is-hidden { opacity: 0; }
.cob-hint kbd {
  border: 1px solid var(--line-strong); border-radius: 5px;
  padding: .1rem .4rem; margin-right: .3rem; color: var(--text-dim);
}

/* ── 5. BUTTER DRIP DIVIDER ──────────────────────────────────────────────── */

.drip {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 46px; z-index: 3;
  background-color: var(--butter);
  --drip-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='46'%3E%3Cg fill='%23000'%3E%3Crect width='260' height='11'/%3E%3Ccircle cx='26' cy='11' r='12'/%3E%3Ccircle cx='78' cy='11' r='19'/%3E%3Ccircle cx='128' cy='11' r='9'/%3E%3Ccircle cx='172' cy='11' r='15'/%3E%3Ccircle cx='222' cy='11' r='23'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: var(--drip-mask); mask-image: var(--drip-mask);
  -webkit-mask-size: 260px 46px; mask-size: 260px 46px;
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
  -webkit-mask-position: top center; mask-position: top center;
}

/* ── 6. THE COB (about) ──────────────────────────────────────────────────── */

.section-about { background: var(--bg-deep); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-lead { font-size: 1.22rem; line-height: 1.55; color: var(--text); }
.about-lead strong { color: var(--accent-text); font-weight: 600; }
.about-copy > p { color: var(--text-dim); }
.about-copy em { color: var(--text); font-style: italic; }

.about-side { min-width: 0; display: grid; align-content: start; }
.about-portrait {
  position: relative; margin: 0; aspect-ratio: 900 / 1008; overflow: hidden;
  border-radius: 24px 8px 24px 8px;
  border: 1px solid color-mix(in srgb, var(--butter) 48%, transparent);
  background: var(--surface);
  box-shadow: 0 34px 70px -34px rgba(0,0,0,.9), 0 0 45px color-mix(in srgb, var(--butter) 8%, transparent);
}
.about-portrait::before {
  content: "PORTRAIT_01"; position: absolute; z-index: 3; left: 14px; top: 13px;
  font-family: var(--font-mono); font-size: .55rem; letter-spacing: .17em;
  color: rgba(255,247,220,.8); text-shadow: 0 1px 7px rgba(0,0,0,.9);
  pointer-events: none;
}
.about-portrait::after {
  content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 55%, rgba(5,11,4,.9) 100%),
    linear-gradient(115deg, rgba(255,255,255,.06), transparent 22% 76%, rgba(0,0,0,.24));
  box-shadow: inset 0 0 0 7px rgba(255,215,94,.04);
}
.about-portrait img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease), filter .4s;
}
.about-portrait:hover img { transform: scale(1.025); filter: saturate(1.06) contrast(1.02); }
.about-portrait figcaption {
  position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 52px;
  display: grid; line-height: 1.2; color: #fff8df; text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.about-portrait figcaption span { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; }
.about-portrait figcaption small { margin-top: .28rem; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: #e6d9b2; }

/* the tenets grow as kernels down an actual cob */
.tenets { position: relative; display: grid; gap: 1.6rem; margin-top: 2.75rem; }
.tenets::before {
  content: ""; position: absolute; z-index: 0;
  left: 24px; transform: translateX(-50%);
  top: -14px; bottom: -14px; width: 36px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--kernel-hi) 42%, transparent) 2.6px, transparent 3.1px)
      0 0 / 12px 12px,
    linear-gradient(90deg, var(--corn-deep), var(--corn) 42%, var(--corn-deep));
  opacity: .38;
}
.tenets li { position: relative; z-index: 1; display: flex; gap: 1rem; align-items: flex-start; }

/* each icon is a corn kernel, not a rounded square */
.tenet-kernel {
  flex: none; width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50% 50% 42% 42% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 34% 26%, var(--kernel-hi), var(--kernel-mid) 55%, var(--kernel-lo));
  box-shadow: inset 0 -2px 5px rgba(120, 70, 0, .3), var(--shadow-sm);
  transition: transform .35s var(--ease-pop);
}
.tenets li:hover .tenet-kernel { transform: translateY(-4px) scale(1.06); }
.tenet-kernel svg { width: 22px; height: 22px; fill: none; stroke: #4A3208; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tenets h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: .2rem; font-variation-settings: "opsz" 20; }
.tenets p { margin: 0; font-size: .95rem; color: var(--text-dim); }
.tenets code { color: var(--accent-text); background: color-mix(in srgb, var(--butter) 12%, transparent); padding: .1em .4em; border-radius: 5px; }

.about-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 1.75rem 1.75rem;
  box-shadow: var(--shadow);
  transform: rotate(1.1deg);
  transition: transform .45s var(--ease);
}
.about-side .about-card { z-index: 4; width: calc(100% - 1.5rem); margin: -1.8rem auto 0; }
.about-card:hover { transform: rotate(0deg) translateY(-4px); }
.card-tape {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  background: var(--butter); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: .58rem; font-weight: 500;
  letter-spacing: .18em; padding: .32rem 1.1rem;
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.card-title {
  font-size: .74rem; font-family: var(--font-mono); font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint);
  margin-bottom: 1.25rem;
}
.field-card { display: grid; gap: .95rem; margin: 0; }
.field-card > div { display: grid; gap: .1rem; }
.field-card dt {
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint);
}
.field-card dd { margin: 0; font-size: .96rem; font-weight: 500; }
.pip {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--husk); margin-right: .5rem;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--husk) 25%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
.card-link {
  display: inline-block; margin-top: 1.75rem;
  font-weight: 600; font-size: .92rem; color: var(--accent-text);
  text-decoration: none;
}
.card-link:hover span { display: inline-block; transform: translateX(4px); transition: transform .25s; }

/* ── 7. KERNELS (projects) ───────────────────────────────────────────────── */

.section-kernels {
  background:
    radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--butter) 8%, transparent), transparent 28%),
    radial-gradient(circle at 88% 72%, color-mix(in srgb, var(--husk) 7%, transparent), transparent 30%);
}

.kernel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem 1.25rem;
  align-items: start;
}

.kcard {
  position: relative;
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse at 28% 3%, rgba(255,255,215,.16), transparent 26%),
    linear-gradient(162deg,
      color-mix(in srgb, var(--surface-2) 82%, var(--butter)),
      var(--surface) 48%,
      color-mix(in srgb, var(--surface) 88%, var(--corn-deep)));
  border: 1.5px solid color-mix(in srgb, var(--corn) 34%, var(--line));
  /* Real kernels are bulbous at the crown and taper toward the attachment scar. */
  border-radius: 48% 48% 28% 28% / 88px 88px 34px 34px;
  padding: 4.2rem 1.6rem 2rem;
  overflow: hidden;
  box-shadow:
    inset 8px 9px 22px rgba(255,255,210,.035),
    inset -12px -14px 28px rgba(83,45,0,.13),
    0 18px 42px -30px rgba(0,0,0,.8);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s, background-color .3s;
}
/* kernel packing: nudge the middle column down like an offset row */
.kcard:nth-child(3n + 3) { margin-top: 2.25rem; }

.kcard::before {
  content: ""; position: absolute; z-index: 0; left: 50%; top: 14px;
  width: 34px; height: 42px; translate: -50% 0;
  border-radius: 52% 52% 43% 43% / 42% 42% 61% 61%;
  background: radial-gradient(circle at 31% 23%, #fff7b9 0 7%, var(--butter) 20%, var(--corn) 62%, var(--corn-deep) 100%);
  border: 1px solid color-mix(in srgb, var(--corn-deep) 72%, transparent);
  box-shadow:
    -4px -5px 7px rgba(255,255,210,.24) inset,
    5px 7px 9px rgba(88,47,0,.24) inset,
    0 7px 16px color-mix(in srgb, var(--corn-deep) 28%, transparent);
  pointer-events: none;
}
.kcard::after {
  content: ""; position: absolute; z-index: 0; left: 50%; bottom: 10px;
  width: 42px; height: 9px; translate: -50% 0;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--corn-deep) 52%, transparent), transparent 72%);
  opacity: .42;
}
.kcard > * { position: relative; z-index: 1; }
.kcard:hover {
  transform: translateY(-8px) scale(1.012);
  border-color: color-mix(in srgb, var(--butter) 66%, transparent);
  box-shadow:
    inset 8px 9px 24px rgba(255,255,210,.06),
    inset -12px -14px 28px rgba(83,45,0,.16),
    0 30px 64px -28px rgba(0,0,0,.85),
    0 0 34px color-mix(in srgb, var(--butter) 10%, transparent);
}
.kcard:hover::before { animation: kernelNod .65s var(--ease-pop); }

.kcard-lead {
  grid-column: 1 / -1;
  margin-top: 0 !important;
  border-color: color-mix(in srgb, var(--butter) 28%, transparent);
  border-radius: 24% 24% 30px 30px / 105px 105px 30px 30px;
  padding: 4.6rem 2rem 2.25rem;
}

.kcard-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.kcard-badge {
  font-family: var(--font-mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  background: var(--butter); color: var(--accent-ink);
  padding: .3rem .7rem; border-radius: 999px;
}
.kcard-lang {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .1em; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: .45rem;
}
.kcard-lang::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint);
}
.kcard-lang[data-lang="Python"]::before     { background: #4B8BBE; }
.kcard-lang[data-lang="TypeScript"]::before { background: #3178C6; }
.kcard-lang[data-lang="Shell"]::before      { background: #89E051; }

.kcard-stars {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim);
}
.kcard-stars svg { width: 14px; height: 14px; fill: var(--butter); }

.kcard h3 { font-size: 1.45rem; font-variation-settings: "opsz" 40; margin-bottom: .6rem; }
.kcard-lead h3 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-variation-settings: "opsz" 80; }
.kcard h3 a { text-decoration: none; display: inline-flex; align-items: baseline; gap: .35rem; }
.kcard h3 a:hover { color: var(--accent-text); }
.ext { font-size: .6em; opacity: .45; transition: transform .25s var(--ease); }
.kcard h3 a:hover .ext { transform: translate(3px, -3px); opacity: 1; }

.kcard-desc { color: var(--text-dim); font-size: .97rem; margin-bottom: 1.1rem; }
.kcard-lead .kcard-desc { font-size: 1.08rem; max-width: 46rem; }

.kcard-points { display: grid; gap: .5rem; margin-bottom: 1.3rem; }
.kcard-points li { position: relative; padding-left: 1.5rem; font-size: .95rem; color: var(--text-dim); }
.kcard-points li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 9px; height: 9px;
  border-radius: 50% 50% 42% 42% / 58% 58% 42% 42%;
  background: var(--corn);
}

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.tags li {
  font-family: var(--font-mono); font-size: .68rem;
  padding: .3rem .65rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-dim);
  background: color-mix(in srgb, var(--butter) 5%, transparent);
}

.kcard-live {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: 1rem; font-family: var(--font-mono); font-size: .76rem;
  color: var(--husk); text-decoration: none;
}
.kcard-live:hover { text-decoration: underline; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--husk); animation: pulse 2s ease-in-out infinite; }

.all-repos {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 2.5rem; font-weight: 600; color: var(--accent-text);
  text-decoration: none; font-size: 1rem;
}
.all-repos:hover span { display: inline-block; transform: translateX(5px); transition: transform .25s; }

/* ── 8. THE SILO (stack) ─────────────────────────────────────────────────── */

.section-silo { background: var(--bg-deep); }

.silo { position: relative; padding-top: 96px; }

.silo-roof { position: absolute; top: 0; left: 0; width: 100%; height: 96px; display: block; }
.roof-dome { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 2; }
.roof-ribs { fill: none; stroke: var(--line-strong); stroke-width: 1.5; opacity: .8; }
.silo-cap {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--butter); border: 2px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.silo-body {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line-strong); border-top: none;
  border-radius: 0 0 22px 22px;
  padding: 2.25rem 1.75rem 2.5rem 3.75rem;
  background:
    /* corrugated sheet metal */
    repeating-linear-gradient(90deg,
      transparent 0 20px,
      color-mix(in srgb, var(--line) 60%, transparent) 20px 22px),
    linear-gradient(180deg, var(--surface), var(--surface-2));
}
/* the welded band rings around the silo */
.silo-body::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit;
  background: repeating-linear-gradient(180deg,
    transparent 0 118px,
    color-mix(in srgb, var(--line-strong) 70%, transparent) 118px 121px);
}
.silo-fill {
  position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 0;
  pointer-events: none; overflow: visible;
  background:
    radial-gradient(circle at 18% 68%, rgba(255,255,220,.22) 0 3px, transparent 4px),
    radial-gradient(circle at 74% 42%, rgba(255,255,220,.18) 0 5px, transparent 6px),
    radial-gradient(circle at 48% 78%, rgba(255,255,220,.14) 0 2px, transparent 3px),
    linear-gradient(145deg,
      color-mix(in srgb, var(--husk) 34%, transparent),
      color-mix(in srgb, var(--butter) 38%, transparent) 58%,
      color-mix(in srgb, var(--corn-deep) 46%, transparent));
  background-size: 150px 190px, 210px 240px, 110px 145px, 100% 100%;
  border-top: 1px solid color-mix(in srgb, var(--butter) 72%, transparent);
  box-shadow: 0 -10px 35px color-mix(in srgb, var(--butter) 12%, transparent) inset;
  opacity: .82;
}
.silo-fill::before {
  content: ""; position: absolute; left: -8%; right: -8%; top: -12px; height: 24px;
  background:
    radial-gradient(ellipse at 50% 100%, transparent 0 52%, color-mix(in srgb, var(--butter) 46%, transparent) 54% 62%, transparent 64%) 0 0 / 82px 24px repeat-x;
  filter: blur(.2px); animation: liquidSurface 4.5s linear infinite;
}
.silo-fill span {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.11) 43%, transparent 64%);
  transform: translateX(-75%); animation: liquidSheen 5.5s ease-in-out infinite;
}
.silo-body.is-filling .silo-fill { animation: fillSilo 11s cubic-bezier(.18,.68,.2,1) forwards; }
/* the maintenance ladder */
.silo-ladder {
  position: absolute; z-index: 4; left: 16px; top: 22px; bottom: 22px; width: 20px;
  background:
    linear-gradient(90deg,
      var(--line-strong) 0 2px, transparent 2px calc(100% - 2px), var(--line-strong) calc(100% - 2px) 100%),
    repeating-linear-gradient(180deg, transparent 0 11px, var(--line-strong) 11px 13px);
  opacity: .75;
}
.silo-base {
  height: 18px; margin: 0 -14px;
  border: 2px solid var(--line-strong); border-top: none;
  border-radius: 0 0 14px 14px;
  background: var(--surface-2);
}

.silo-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 1.1rem;
}
.silo-bin {
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.1rem;
  transition: transform .35s var(--ease), border-color .3s, background-color .3s;
}
.silo-bin:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--husk) 55%, transparent);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
}
.silo-bin h3 {
  display: flex; align-items: center; gap: .55rem;
  font-size: .72rem; font-family: var(--font-mono); font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim);
  padding-bottom: .8rem; margin-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.bin-ic { display: grid; place-items: center; width: 18px; height: 18px; flex: none; color: var(--accent-text); }
.bin-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.silo-bin ul { display: grid; gap: .45rem; }
.silo-bin li { position: relative; padding-left: 1.15rem; font-size: .9rem; color: var(--text-dim); }
.silo-bin li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 8px; height: 8px;
  border-radius: 50% 50% 42% 42% / 58% 58% 42% 42%;
  background: var(--corn); opacity: .85;
}

/* ── 9. THE FIELD (live activity) ────────────────────────────────────────── */

.section-field {
  position: relative; overflow: hidden; isolation: isolate;
  padding-bottom: 17rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 86%, #102d18), var(--bg) 68%),
    var(--bg);
}
.field-sky {
  position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(circle at 78% 16%, color-mix(in srgb, var(--butter) 18%, transparent), transparent 19%),
    linear-gradient(180deg, color-mix(in srgb, #163a21 52%, var(--bg)), var(--bg) 72%);
  pointer-events: none;
}
.field-atmosphere { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.field-sun {
  position: absolute; width: clamp(120px, 17vw, 230px); aspect-ratio: 1;
  right: 9%; top: 8%; border-radius: 50%;
  background: radial-gradient(circle at 43% 40%, #fff7c6 0 4%, #ffd75e 28%, #e9a113 62%, rgba(233,161,19,.08) 69%, transparent 72%);
  opacity: .32; filter: blur(.2px);
  box-shadow: 0 0 90px color-mix(in srgb, var(--butter) 20%, transparent);
}
.field-haze {
  position: absolute; left: -10%; right: -10%; bottom: 145px; height: 230px;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--butter) 15%, transparent), transparent 67%);
  filter: blur(18px); opacity: .7;
}
.field-atmosphere i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #d9ff7a; box-shadow: 0 0 7px #d9ff7a, 0 0 16px color-mix(in srgb, var(--butter) 55%, transparent);
  opacity: 0; animation: fieldMote 7s ease-in-out infinite;
}
.field-atmosphere i:nth-of-type(1) { left: 8%;  top: 34%; animation-delay: -1s; }
.field-atmosphere i:nth-of-type(2) { left: 21%; top: 59%; animation-delay: -4s; scale: .7; }
.field-atmosphere i:nth-of-type(3) { left: 38%; top: 22%; animation-delay: -2.3s; scale: .6; }
.field-atmosphere i:nth-of-type(4) { left: 54%; top: 48%; animation-delay: -5.1s; }
.field-atmosphere i:nth-of-type(5) { left: 67%; top: 31%; animation-delay: -3.4s; scale: .75; }
.field-atmosphere i:nth-of-type(6) { left: 81%; top: 53%; animation-delay: -.4s; scale: .55; }
.field-atmosphere i:nth-of-type(7) { left: 91%; top: 26%; animation-delay: -6s; }
.field-atmosphere i:nth-of-type(8) { left: 73%; top: 68%; animation-delay: -2s; scale: .65; }
.section-field .wrap { position: relative; z-index: 4; }

.field-feed {
  display: grid; gap: .72rem; max-width: 62rem;
  padding: clamp(.7rem, 2vw, 1.15rem);
  border: 1px solid color-mix(in srgb, var(--husk) 26%, transparent);
  border-radius: 24px;
  background: color-mix(in srgb, var(--bg-deep) 54%, transparent);
  box-shadow: 0 28px 70px -40px rgba(0,0,0,.9), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
}

.feed-loading, .feed-error {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .85rem; color: var(--text-dim);
  padding: 1.75rem; border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.husk-spinner {
  width: 16px; height: 16px; flex: none;
  border: 2px solid var(--line-strong); border-top-color: var(--butter);
  border-radius: 50%; animation: spin .9s linear infinite;
}

/* each event is a row planted in the field */
.feed-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 1rem;
  padding: .95rem 1.25rem;
  background: linear-gradient(105deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-2) 68%, transparent));
  border: 1px solid color-mix(in srgb, var(--husk) 23%, var(--line));
  border-left: 4px solid var(--husk);
  border-radius: 5px 16px 16px 5px;
  box-shadow: 0 9px 24px -20px rgba(0,0,0,.9), inset 0 1px rgba(255,255,255,.025);
  text-decoration: none;
  transition: transform .3s var(--ease), border-color .3s, background-color .3s;
}
.feed-row:nth-child(even) { background: linear-gradient(105deg, color-mix(in srgb, var(--husk) 11%, var(--surface)), color-mix(in srgb, var(--surface) 72%, transparent)); }
.feed-row:hover {
  transform: translateX(6px);
  border-color: color-mix(in srgb, var(--butter) 40%, transparent);
  border-left-color: var(--butter);
}
.feed-ic {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center; font-size: .85rem;
  border-radius: 50% 50% 42% 42% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--kernel-hi) 60%, transparent), color-mix(in srgb, var(--corn) 22%, transparent));
  border: 1px solid color-mix(in srgb, var(--corn) 30%, transparent);
  box-shadow: inset -3px -4px 8px rgba(93,50,0,.12);
}
.feed-text { min-width: 0; font-size: .94rem; }
.feed-text span { color: var(--text-dim); }
.feed-repo {
  font-family: var(--font-mono); font-size: .85rem; color: var(--accent-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;
  font-weight: 500;
}
.feed-when { font-family: var(--font-mono); font-size: .72rem; color: var(--text-faint); white-space: nowrap; }

/* the crop line and the tilled soil it's planted in */
.field-horizon {
  position: absolute; z-index: 0; left: -3%; right: -3%; bottom: 178px; height: 82px;
  background: color-mix(in srgb, var(--husk-deep) 74%, var(--bg-deep));
  clip-path: polygon(0 72%, 7% 60%, 13% 68%, 20% 42%, 27% 62%, 34% 48%, 43% 65%, 52% 36%, 59% 58%, 69% 44%, 77% 64%, 86% 40%, 93% 57%, 100% 49%, 100% 100%, 0 100%);
  opacity: .6; filter: blur(.4px); pointer-events: none;
}
.field-crop {
  position: absolute; left: -2%; right: -2%; bottom: 88px; height: 140px; z-index: 2;
  background: linear-gradient(90deg, var(--husk-deep), var(--husk), var(--husk-deep));
  --stalk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='120'%3E%3Cg fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M48 120V30'/%3E%3Cpath d='M48 48C37 42 25 45 16 56'/%3E%3Cpath d='M48 68c11-6 23-3 32 8'/%3E%3Cpath d='M48 88c-11-6-23-3-32 8'/%3E%3Cpath d='M48 32c-5-9-3-18 4-25'/%3E%3C/g%3E%3Cellipse cx='60' cy='74' rx='7' ry='13' fill='%23000' transform='rotate(18 60 74)'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--stalk); mask-image: var(--stalk);
  -webkit-mask-size: 105px 132px; mask-size: 105px 132px;
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
  -webkit-mask-position: bottom center; mask-position: bottom center;
  opacity: .7;
  filter: drop-shadow(0 -8px 13px rgba(0,0,0,.24));
  pointer-events: none;
}
.field-rows {
  position: absolute; z-index: 1; left: -12%; right: -12%; bottom: 0; height: 170px;
  background:
    repeating-conic-gradient(from 268deg at 50% 8%,
      rgba(23,12,3,.72) 0deg 2.2deg,
      color-mix(in srgb, var(--soil) 74%, #d49a37) 2.4deg 5.5deg,
      rgba(19,10,3,.76) 5.8deg 8.4deg);
  opacity: .78; pointer-events: none;
}
.field-rows::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 25px, rgba(255,218,117,.07) 26px, transparent 28px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 26%);
  mask-image: linear-gradient(to bottom, transparent, #000 26%);
}
.field-soil {
  position: absolute; left: 0; right: 0; bottom: 0; height: 112px; z-index: 0;
  background:
    repeating-linear-gradient(180deg,
      color-mix(in srgb, #000 12%, transparent) 0 2px,
      transparent 2px 16px),
    linear-gradient(180deg, var(--soil), color-mix(in srgb, var(--soil) 70%, var(--bg-deep)));
  border-top: 3px solid color-mix(in srgb, var(--soil) 60%, #000);
  box-shadow: 0 -26px 60px color-mix(in srgb, var(--butter) 7%, transparent);
  pointer-events: none;
}

/* ── 10. EAR ME OUT (contact) ────────────────────────────────────────────── */

.section-contact {
  background: var(--surface-2);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--corn) 30%, transparent) 1.5px, transparent 1.6px);
  background-size: 22px 22px;
}

/* the whole panel is an ear: husk either side, silk on top */
.ear { position: relative; max-width: 62rem; margin-inline: auto; padding-top: 30px; }
.ear-husk {
  position: absolute; top: 4%; height: 92%; width: clamp(72px, 11vw, 132px);
  z-index: 0; pointer-events: none;
}
.ear-husk {
  opacity: .9;
  --leaf-fill: var(--husk-lo);
  --leaf-vein-color: rgba(0, 0, 0, .2);
}
.ear-husk-l { left: 0; transform: translateX(-58%); }
.ear-husk-r { right: 0; transform: translateX(58%); }
.ear-silk {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 210px; height: 62px; z-index: 0; pointer-events: none;
}
.ear-silk svg { width: 100%; height: 100%; }
.ear-silk path { fill: none; stroke: var(--silk); stroke-width: 4; stroke-linecap: round; opacity: .8; }

.contact-inner {
  position: relative; z-index: 2;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--line);
  /* the cob under the husk */
  border-radius: 120px 120px var(--radius-lg) var(--radius-lg);
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-lg);
}
.contact-inner .eyebrow { justify-content: center; }
.contact-inner h2 { font-size: clamp(2.3rem, 6vw, 4rem); }
.contact-lead { margin: 1.2rem auto 2.5rem; max-width: 34rem; color: var(--text-dim); font-size: 1.06rem; }

.contact-links {
  display: grid; gap: .75rem;
  /* four links resolve to a balanced 2x2 rather than 3 + orphan */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  text-align: left;
}
.clink {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none;
  transition: transform .3s var(--ease-pop), border-color .3s, background-color .3s;
}
.clink:hover { transform: translateY(-4px); border-color: var(--butter); background: color-mix(in srgb, var(--butter) 8%, transparent); }
.clink-primary { background: var(--butter); border-color: var(--butter); color: var(--accent-ink); }
.clink-primary:hover { background: var(--corn); border-color: var(--corn); }
.clink-ic { flex: none; }
.clink-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.clink-body { display: grid; min-width: 0; }
.clink-body strong { font-size: .95rem; font-weight: 600; }
.clink-body small { font-family: var(--font-mono); font-size: .74rem; opacity: .75; overflow: hidden; text-overflow: ellipsis; }

/* ── 11. FOOTER ──────────────────────────────────────────────────────────── */

.footer { background: var(--bg-deep); border-top: 1px solid var(--line); padding-block: 3.5rem; }
.footer-inner { display: grid; gap: .9rem; justify-items: center; text-align: center; }
.footer-mark { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; }
.footer-mark .brand-mark { width: 26px; height: 26px; }
.footer-note { margin: 0; color: var(--text-dim); font-size: .93rem; max-width: 34rem; }
.footer-meta { margin: 0; font-family: var(--font-mono); font-size: .74rem; color: var(--text-faint); }
.footer-meta a { color: var(--text-dim); text-decoration: none; }
.footer-meta a:hover { color: var(--accent-text); }

.scroll-cob {
  position: fixed; right: 22px; bottom: 26px; z-index: 40;
  opacity: 0; transform: translateY(12px);
  transition: opacity .4s, transform .4s var(--ease);
  pointer-events: none;
}
.scroll-cob.is-on { opacity: 1; transform: none; }
.sc-track {
  width: 14px; height: 96px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.sc-fill {
  width: 100%; height: 0%;
  background-image:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--kernel-hi) 60%, transparent) 2px, transparent 2.5px),
    linear-gradient(0deg, var(--corn-deep), var(--butter));
  background-size: 7px 7px, 100% 100%;
  transition: height .12s linear;
}

/* ── 12. MOTION ──────────────────────────────────────────────────────────── */

.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--rd, 0s);
}

@keyframes float     { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes swayL     { 0%, 100% { rotate: 0deg; } 50% { rotate: -2.5deg; } }
@keyframes swayR     { 0%, 100% { rotate: 0deg; } 50% { rotate: 2.5deg; } }
@keyframes spin      { to { rotate: 360deg; } }
@keyframes pulse     { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes slideDown { from { opacity: 0; translate: 0 -10px; } to { opacity: 1; translate: 0 0; } }
@keyframes wiggle    { 0%, 100% { rotate: 0deg; } 30% { rotate: -12deg; } 65% { rotate: 9deg; } }

@keyframes kernelShimmer { 0%, 100% { opacity: .93; } 50% { opacity: 1; scale: 1.05; } }
@keyframes kernelPop { 0% { opacity: 1; scale: 1; } 35% { opacity: 1; scale: 1.5; } 100% { opacity: 0; scale: .2; } }
@keyframes popFly {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(.5); }
  25%  { opacity: 1; transform: translate(calc(var(--dx) * .4), calc(var(--dy) * .8)) rotate(90deg) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 180px)) rotate(var(--dr)) scale(.85); }
}
@keyframes scanArt { from { transform: translateY(-10%); } to { transform: translateY(760%); } }
@keyframes cobImpact { 0%,100% { transform: scale(1.018); } 38% { transform: scale(1.035) rotate(.7deg); } 68% { transform: scale(1.012) rotate(-.45deg); } }
@keyframes divotIn { from { opacity: 0; scale: .25; } to { opacity: .88; scale: 1; } }
@keyframes kernelFly {
  0% { opacity: 1; transform: translate(0,0) rotate(0deg) scale(.55); }
  18% { opacity: 1; transform: translate(calc(var(--dx) * .25), calc(var(--dy) * .58)) rotate(calc(var(--dr) * .3)) scale(1.08); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 155px)) rotate(var(--dr)) scale(.72); }
}
@keyframes fillSilo { 0% { height: 0; } 100% { height: 76%; } }
@keyframes liquidSurface { from { background-position-x: 0; } to { background-position-x: 82px; } }
@keyframes liquidSheen { 0%,15% { transform: translateX(-75%); } 70%,100% { transform: translateX(75%); } }
@keyframes kernelNod { 0%,100% { transform: rotate(0) scale(1); } 38% { transform: rotate(-8deg) scale(1.12); } 68% { transform: rotate(5deg) scale(1.05); } }
@keyframes fieldMote {
  0%,100% { opacity: 0; transform: translate(0, 12px) scale(.65); }
  18% { opacity: .8; }
  54% { opacity: .32; transform: translate(17px, -18px) scale(1); }
  78% { opacity: .72; transform: translate(-7px, -34px) scale(.78); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .nav-links a { padding-inline: .65rem; font-size: .88rem; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: initial; }
  .cob-stage { width: min(88vw, 360px); }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { width: 100%; max-width: 520px; margin-inline: auto; }
  .about-card { transform: none; }
  .ear-husk { display: none; }
  .contact-inner { border-radius: 80px 80px var(--radius-lg) var(--radius-lg); }
}

/* below this the nav collapses into a drop-down panel — same markup, new shape */
@media (max-width: 820px) {
  .nav-burger { display: grid; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: slideDown .28s var(--ease);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a {
    border-radius: 8px; padding: .85rem .75rem;
    font-family: var(--font-mono); font-size: .9rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: none; }

  .hero-stats { gap: 1.5rem 2rem; }
  .hero-stats dd { font-size: 1.5rem; }
  .scroll-cob { display: none; }

  .silo-body { padding: 1.75rem 1.25rem 2rem 3rem; }
  .silo-ladder { left: 12px; width: 16px; }
}

@media (max-width: 620px) {
  .kcard, .kcard-lead { border-radius: 46% 46% 25% 25% / 70px 70px 28px 28px; }
  .kcard:nth-child(3n + 3) { margin-top: 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .kcard { padding: 3.9rem 1.35rem 1.75rem; }
  .kcard-lead { padding: 4.1rem 1.35rem 1.8rem; }
  .feed-row { grid-template-columns: auto minmax(0, 1fr); row-gap: .35rem; }
  .feed-when { grid-column: 2; }
  .field-feed { padding: .45rem; border-radius: 18px; }
  .feed-row { padding: .85rem .8rem; gap: .7rem; }
  .field-sun { right: -8%; top: 7%; width: 150px; }
  .field-horizon { bottom: 138px; height: 64px; }
  .field-crop { bottom: 72px; height: 105px; -webkit-mask-size: 82px 105px; mask-size: 82px 105px; }
  .field-rows { height: 138px; }
  .field-soil { height: 78px; }
  .section-field { padding-bottom: 13rem; }
}
