/* =========================================================
   andzelika.design
   Breakpoints: 1600 (wide) / 900 (tablet) / 720 (mobile nav) / 400 (small phones)
   ========================================================= */
:root {
  --background: 240 6% 5%;
  --foreground: 0 0% 96%;
  --card: 240 6% 7%;
  --primary: 344 94% 42%;
  --secondary: 196 94% 42%;
  --muted: 240 6% 12%;
  --muted-foreground: 240 5% 62%;
  --border: 240 6% 16%;

  --gutter: clamp(20px, 5vw, 72px);
  --content-max: 1200px;
  --header-h: 88px;
  /* Self-hosted (assets/fonts); system fallbacks if a file fails to load */
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Manrope', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: hsl(var(--foreground)); background: hsl(var(--background)); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
svg.icon { flex-shrink: 0; display: inline-block; }
a:focus-visible, button:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 5px; }
::selection { background: hsl(var(--primary)); color: #fff; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 12px 16px; background: hsl(var(--primary)); color: #fff; font-size: 13px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--content-max)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: hsl(240 6% 5% / 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-header-inner { height: var(--header-h); margin: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid hsl(var(--border)); }
.wordmark { display: flex; gap: 12px; align-items: center; font-size: 16px; font-weight: 600; white-space: nowrap; }
.logo-mark { display: block; width: 32px; height: 32px; flex-shrink: 0; }
.wordmark-text { font-family: 'Poppins', var(--sans); font-weight: 600; font-size: 18px; letter-spacing: -.01em; line-height: 1; }
.site-nav { display: flex; align-items: center; gap: 36px; font-size: 13px; }
.site-nav a { white-space: nowrap; transition: color .2s; }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; }
.site-header a:hover, .site-footer a:hover { color: hsl(var(--primary)); }

.menu-toggle { display: none; width: 44px; height: 44px; margin-right: -10px; align-items: center; justify-content: center; border: 0; background: none; }
.menu-icon-open { display: inline-flex; }
.menu-icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-close { display: inline-flex; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; min-height: calc(100svh - var(--header-h)); padding: clamp(48px, 8vw, 80px) var(--gutter) clamp(72px, 9vw, 100px); display: flex; align-items: center; }
.hero-two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 64px); align-items: center; width: 100%; max-width: 1320px; margin: 0 auto; }
.hero-corner { position: absolute; right: var(--gutter); top: 40px; color: hsl(var(--border)); }
.section-label, .hero-bottom { font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; }
.hero-hi { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; line-height: 1.2; }
:root { --wave-delay: 1s; --wave-time: 2.4s; --wave-count: 1; }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave var(--wave-time) ease-in-out var(--wave-delay) var(--wave-count); cursor: default; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10%,30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
h1 { font-size: clamp(44px, 6.4vw, 104px); line-height: .98; font-weight: 700; letter-spacing: -.025em; }
.accent-word, .headline-line { display: block; }
.headline-line { margin-top: 6px; }
.period, .accent-word { color: hsl(var(--primary)); }
.hero-copy { position: relative; z-index: 1; }
.hero-intro { max-width: 500px; text-wrap: pretty; font-size: 16px; line-height: 1.9; color: hsl(var(--muted-foreground)); margin-top: 32px; }

.primary-link, .case-banner-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; color: #fff; background: hsl(var(--primary)); border: 1px solid hsl(var(--primary)); font-weight: 600; letter-spacing: .3px; transition: background .2s, transform .2s, box-shadow .2s; }
.primary-link { margin-top: 36px; padding: 16px 30px; font-size: 13px; }
.primary-link:hover, .case-banner-cta:hover { background: hsl(344 94% 48%); box-shadow: 0 8px 30px hsl(344 94% 42% / .35); }
.primary-link:active, .case-banner-cta:active { transform: scale(.98); }
.hero-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; color: hsl(var(--muted-foreground)); font-size: 9px; letter-spacing: 1px; margin-top: 48px; }
.hero-bottom a { display: inline-flex; gap: 12px; align-items: center; min-height: 44px; transition: color .2s; }
.hero-bottom a:hover { color: hsl(var(--foreground)); }

/* Portrait */
.hero-portrait { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 14px; }
/* Hero background: half-sphere of crimson light sitting on the Experience divider, with fine noise */
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(85vw 55% at 50% 100%, hsl(var(--primary) / .08), hsl(var(--primary) / .035) 40%, hsl(var(--primary) / .01) 75%, transparent 100%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 220px 220px; opacity: .05; mix-blend-mode: soft-light;
  -webkit-mask-image: radial-gradient(85vw 55% at 50% 100%, #000 30%, transparent 100%); mask-image: radial-gradient(85vw 55% at 50% 100%, #000 30%, transparent 100%); }
.portrait-frame { position: relative; width: 100%; max-width: 380px; aspect-ratio: 4 / 5; border: 1px solid hsl(0 0% 100% / .08); background: transparent; overflow: hidden; display: flex; align-items: flex-end; }
.portrait-frame::before { content: ""; position: absolute; inset: 10px; border: 1px solid hsl(var(--primary) / .18); pointer-events: none; z-index: 1; transition: border-color .35s ease; }
.portrait-grid { position: absolute; z-index: -1; left: 50%; top: 50%; width: 1300px; aspect-ratio: 5121 / 4001; transform: translate(-50%, -50%); pointer-events: none;
  background: url('../img/grid-frame.svg') center / 100% 100% no-repeat;
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent 100%); mask-image: radial-gradient(closest-side, #000 25%, transparent 100%); opacity: .3; }
.portrait-img { position: relative; display: block; width: 100%; height: auto; }

/* Portrait hover: photo lifts from the background, named cursor follows the pointer */
.portrait-frame { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease; }
.portrait-img { transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.name-cursor { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; opacity: 0; transform: translate3d(var(--cx, 50%), var(--cy, 50%), 0) scale(.85); transform-origin: 0 0; transition: opacity .2s ease, transform .18s ease-out; }
.name-cursor-arrow { display: block; margin: -3px 0 0 -3px; fill: hsl(var(--secondary)); stroke: #fff; stroke-width: 2.2; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .35)); }
.name-cursor-label { position: absolute; left: 18px; top: 28px; padding: 7px 12px; border-radius: 6px; background: hsl(var(--secondary)); color: #fff; font: 600 13px/1.2 'Poppins', var(--sans); letter-spacing: .1px; white-space: nowrap; box-shadow: 0 6px 16px rgb(0 0 0 / .35); }
.name-cursor.is-flipped .name-cursor-label { left: auto; right: 4px; }
@media (hover: hover) and (pointer: fine) {
  .portrait-frame { cursor: none; }
  .hero-portrait.is-hovered .portrait-frame { transform: translateY(-12px); box-shadow: 0 28px 40px -24px rgb(0 0 0 / .7); }
  .hero-portrait.is-hovered .portrait-frame::before { border-color: hsl(var(--secondary) / .6); }
  .hero-portrait.is-hovered .portrait-img { transform: scale(1.01); }
  .hero-portrait.is-hovered .name-cursor { opacity: 1; transform: translate3d(var(--cx), var(--cy), 0) scale(1); transition: opacity .2s ease, transform 0s; }
}
@media (hover: none), (pointer: coarse) { .name-cursor { display: none; } }

/* ---------- Sections shared ---------- */
.section-label { display: flex; justify-content: space-between; gap: 16px; color: hsl(var(--muted-foreground)); }
.section-heading { display: flex; justify-content: space-between; align-items: last baseline; margin: 32px 0 48px; gap: 32px; }
h2 { font-weight: 700; font-size: clamp(40px, 5.6vw, 80px); letter-spacing: -.025em; line-height: 1.05; }
.section-heading p { color: hsl(var(--muted-foreground)); font-size: 14px; line-height: 1.9; max-width: 340px; flex-shrink: 0; text-align: right; }

/* ---------- Experience ---------- */
.experience-section { position: relative; z-index: 1; }
/* Soft full-width noise behind Experience: same grain as the hero, strongest at the top (continues the hero) and fading out downwards */
.experience-section::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px; opacity: .05;
  -webkit-mask-image: linear-gradient(to bottom, #000, #000 35%, transparent); mask-image: linear-gradient(to bottom, #000, #000 35%, transparent); }
.experience-section::before { content: ""; position: absolute; top: -1px; left: 50%; width: 100vw; height: 1px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(90deg, transparent, hsl(var(--primary) / .6) 50%, transparent) center / 80% 100% no-repeat, linear-gradient(90deg, transparent, hsl(var(--border)) 12%, hsl(var(--border)) 88%, transparent); }
.experience-section, .case-studies-section { padding: clamp(72px, 10vw, 110px) 0 clamp(80px, 10vw, 120px); border-top: 1px solid hsl(var(--border)); }
/* Menu links land past the divider: it tucks under the sticky header and the label keeps ~56px of air (48px + 8px scroll padding) */
.experience-section, .case-studies-section { scroll-margin-top: calc(48px - clamp(72px, 10vw, 110px)); }
.timeline { position: relative; margin-top: 8px; }
/* Line sits above row hover backgrounds (z 1) and below the dots (z 2) */
.timeline-line { position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: hsl(var(--border)); z-index: 1; pointer-events: none; }
.company-group { position: relative; }
.company-group + .company-group { margin-top: 64px; }
/* Dots live inside their title and are centred on the lowercase (x-height) middle of its first line,
   which is where the eye reads a title's centre. They stay aligned at any size.
   left = distance from the title back to the timeline line (row padding, plus card padding on the highlighted role). */
.company-marker { position: absolute; left: -29px; top: calc(.68em - 4.5px); width: 9px; height: 9px; border-radius: 50%; background: hsl(var(--secondary)); border: 2px solid hsl(var(--background)); box-shadow: 0 0 0 1px hsl(var(--secondary)); z-index: 2; }
.company-heading { position: relative; display: flex; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; padding-left: 32px; margin-bottom: 8px; }
.company-heading h3 { position: relative; font-size: 24px; font-weight: 700; letter-spacing: -.4px; line-height: 1.2; }
.company-dates { font: 11px var(--mono); color: hsl(var(--muted-foreground)); letter-spacing: .4px; }
.positions { list-style: none; padding: 0; margin: 0; }
.position { position: relative; padding: 28px 0 28px 32px; border-top: 1px solid hsl(var(--border)); transition: background .2s; }
.position:hover { background: hsl(var(--foreground) / .025); }
.position-marker { position: absolute; left: -29px; top: calc(.775em - 4.5px); width: 9px; height: 9px; border-radius: 50%; background: hsl(var(--background)); border: 1px solid hsl(var(--muted-foreground)); transition: all .2s; z-index: 2; }
.position:hover .position-marker { border-color: hsl(var(--primary)); background: hsl(var(--primary)); }
.position-dates { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font: 10px var(--mono); color: hsl(var(--muted-foreground)); letter-spacing: .3px; margin-bottom: 8px; }
.position-content h4 { position: relative; font-size: 18px; font-weight: 600; letter-spacing: -.3px; line-height: 1.35; }
.position-content p { max-width: 640px; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.8; margin-top: 10px; }
.position.prominent .position-marker { background: hsl(var(--primary)); border-color: hsl(var(--primary)); box-shadow: 0 0 14px hsl(var(--primary) / .7); width: 11px; height: 11px; left: -59px; top: calc(.775em - 5.5px); }
.position.prominent .position-content { position: relative; isolation: isolate; z-index: 2; /* own layer for the grain; z 2 keeps its dot above the timeline line (z 1) */ background: hsl(var(--card)); border: 1px solid hsl(var(--primary) / .3); border-radius: 2px; padding: 24px 28px; margin-top: -4px; }
/* Grain on the current-role card (same noise as hero/Experience, a bit stronger so the card reads as a textured surface) */
.position.prominent .position-content::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px; opacity: .1; }
.position.prominent .position-content h4 { color: hsl(var(--primary)); font-size: 21px; }
.position.prominent:hover { background: transparent; }
.current-badge { display: inline-block; padding: 2px 8px; font: 9px var(--mono); letter-spacing: .8px; color: hsl(var(--primary)); border: 1px solid hsl(var(--primary) / .5); border-radius: 2px; text-transform: uppercase; }

/* Earlier roles: collapsed by default to keep recent work prominent.
   The toggle reads as part of the timeline: a dashed "more history" dot on the line + a two-line rewind button. */
.earlier-roles { margin-top: 40px; }
.earlier-roles > summary { list-style: none; position: relative; z-index: 2; margin-left: 32px; display: flex; align-items: center; gap: 14px; /* full row width */
  min-height: 56px; padding: 10px 16px 10px 10px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  border: 1px solid hsl(var(--border)); border-radius: 2px;
  background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--background)) 70%);
  transition: border-color .25s, box-shadow .25s, transform .25s, background .25s; }
.earlier-roles > summary::-webkit-details-marker { display: none; }
/* Dashed dot on the timeline line, vertically centred on the button (line sits 25px left of the button edge) */
.earlier-roles > summary::before { content: ""; position: absolute; left: -30.5px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%;
  border: 1.5px dashed hsl(var(--muted-foreground)); background: hsl(var(--background)); transition: border-color .25s, background .25s; }
.earlier-roles-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 2px;
  color: hsl(var(--primary)); background: hsl(var(--primary) / .1); border: 1px solid hsl(var(--primary) / .25); transition: background .25s, color .25s, border-color .25s; }
.earlier-roles-icon svg { transition: transform .35s ease; }
.earlier-roles-title { font-size: 15px; font-weight: 600; letter-spacing: -.2px; line-height: 1.3; text-align: left; }
/* Hover / keyboard focus: crimson accents, slight lift */
.earlier-roles > summary:hover, .earlier-roles > summary:focus-visible { border-color: hsl(var(--primary) / .55); transform: translateY(-1px);
  box-shadow: 0 10px 30px -14px hsl(var(--primary) / .45); background: linear-gradient(135deg, hsl(var(--primary) / .08), hsl(var(--background)) 70%); }
.earlier-roles > summary:hover .earlier-roles-icon, .earlier-roles > summary:focus-visible .earlier-roles-icon { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: #fff; }
.earlier-roles > summary:hover::before { border-color: hsl(var(--primary)); }
.earlier-roles > summary:hover .earlier-roles-icon svg { transform: translateX(-2px); }
.earlier-roles > summary:active { transform: translateY(0) scale(.99); }
/* Open state: rewind flips to fast-forward */
.earlier-roles-hide, .earlier-roles[open] .earlier-roles-show { display: none; }
.earlier-roles[open] .earlier-roles-hide { display: inline; }
.earlier-roles[open] .earlier-roles-icon svg { transform: scaleX(-1); }
.earlier-roles[open] > summary:hover .earlier-roles-icon svg { transform: scaleX(-1) translateX(-2px); }
.earlier-roles[open] > summary::before { border-style: solid; border-color: hsl(var(--muted-foreground)); }
.earlier-roles[open] > summary { margin-bottom: 56px; }
@media (max-width: 720px) {
  .earlier-roles > summary { margin-left: 28px; gap: 12px; }
  .earlier-roles > summary::before { left: -26.5px; }
}

/* Side work: part-time card under the current role, aligned with role rows, deliberately without a dot (not a timeline step) */
.side-work { position: relative; z-index: 2; margin: 24px 0 0 32px; padding: 24px 28px; border: 1px dashed hsl(var(--secondary) / .45); background: hsl(var(--card)); border-radius: 2px; }
.timeline > .side-work + .company-group { margin-top: 64px; }
.side-work-label { display: block; font: 10px var(--mono); letter-spacing: 1.4px; color: hsl(var(--secondary)); margin-bottom: 8px; }
.side-work-list { list-style: none; padding: 0; margin: 0; }
.side-work-item { display: grid; grid-template-columns: 1fr; gap: 0; padding: 16px 0 0; } /* dates above title, like the role cards */
.side-work-item + .side-work-item { border-top: 1px solid hsl(var(--border)); }
.side-work-item:last-child { padding-bottom: 0; }
.side-work-dates { display: flex; align-items: center; align-self: start; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; font: 10px var(--mono); letter-spacing: .3px; color: hsl(var(--muted-foreground)); }
.side-work-item h3 { font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
.side-work-item p { max-width: 560px; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.8; margin-top: 8px; }
/* Keyword tags under roles and side work */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.tags li { padding: 5px 10px; font: 10px var(--mono); letter-spacing: .4px; color: hsl(var(--foreground) / .85); border: 1px solid hsl(var(--border)); border-radius: 2px; }
.position.prominent .tags li { border-color: hsl(var(--primary) / .3); }

/* ---------- Case studies ---------- */
.case-banner { position: relative; margin-top: 8px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); padding: clamp(56px, 8vw, 88px) clamp(24px, 5vw, 48px); text-align: center; overflow: hidden; transition: border-color .3s; }
.case-banner:hover { border-color: hsl(var(--primary) / .5); }
/* Glow fills the whole card: brightest in the centre, then a long, soft falloff that reaches the borders and fades out at the corners */
.case-banner-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse farthest-corner at 50% 50%, hsl(var(--primary) / .12) 0%, hsl(var(--primary) / .08) 25%, hsl(var(--primary) / .05) 55%, hsl(var(--primary) / .03) 80%, hsl(var(--primary) / .015) 100%); }
/* Soft grain on the glow, like the hero gradient: same noise, masked to the glow's shape so it fades out towards the borders */
.case-banner-glow::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px; opacity: .09;
  -webkit-mask-image: radial-gradient(ellipse farthest-corner at 50% 50%, #000 0, #000 35%, rgb(0 0 0 / .35) 100%); mask-image: radial-gradient(ellipse farthest-corner at 50% 50%, #000 0, #000 35%, rgb(0 0 0 / .35) 100%); }
.case-banner h3 { position: relative; font-size: clamp(30px, 5vw, 64px); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; margin-top: 0; }
.case-banner p { position: relative; color: hsl(var(--muted-foreground)); font-size: clamp(14px, 1.6vw, 16px); line-height: 1.9; max-width: 560px; margin: 24px auto 0; }
.case-banner-cta { position: relative; margin-top: 40px; padding: 17px 36px; font-size: 14px; }
.case-banner .case-banner-ask { position: relative; margin: 20px auto 0; font-size: 13px; color: hsl(var(--muted-foreground)); }
.case-banner-ask a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; font-weight: 600; color: hsl(var(--foreground)); border-bottom: 1px solid hsl(var(--border)); transition: color .2s, border-color .2s; }
.case-banner-ask a:hover, .case-banner-ask a:focus-visible { color: hsl(var(--primary)); border-color: hsl(var(--primary)); }

/* ---------- Contact ---------- */
.contact-section { position: relative; overflow: hidden; text-align: center; background: hsl(240 6% 3%); padding: clamp(80px, 10vw, 120px) var(--gutter) clamp(110px, 13vw, 150px); border-top: 1px solid hsl(var(--border)); }
.contact-section .section-label { justify-content: center; }
.contact-section h2 { margin-top: 36px; font-size: clamp(40px, 6.4vw, 92px); }
.contact-section p { font-size: 15px; line-height: 1.9; color: hsl(var(--muted-foreground)); margin: 28px auto 0; max-width: 480px; }
.contact-email { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 14px; font-size: clamp(20px, 2.6vw, 28px); font-weight: 600; padding: 16px 0; border-bottom: 1px solid hsl(var(--border)); margin-top: 40px; transition: color .2s, border-color .2s; }
.contact-email:hover { color: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.contact-alt { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 20px; font-size: 14px; color: hsl(var(--muted-foreground)); }
.contact-alt a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; overflow-wrap: anywhere; transition: color .2s; }
.contact-alt a:hover { color: hsl(var(--primary)); }
/* Decorative "hello." in the bottom-left corner, slightly cropped by the bottom and left edges */
.cropped-hello { position: absolute; bottom: -.09em; left: -.05em; font-size: clamp(150px, 22vw, 300px); line-height: .8; font-weight: 700; color: hsl(0 0% 100% / .035); pointer-events: none; white-space: nowrap; }
/* Same grain as the current-role card, clipped to the letters of "hello." */
.cropped-hello::after { content: attr(data-text); position: absolute; inset: 0; color: transparent; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 220px 220px; -webkit-background-clip: text; background-clip: text; opacity: .12; }

/* ---------- Footer ---------- */
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 24px var(--gutter); padding-bottom: max(24px, env(safe-area-inset-bottom)); font-size: 11px; color: hsl(var(--muted-foreground)); }
.site-footer a { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; transition: color .2s; }

/* =========================================================
   Responsive
   ========================================================= */

/* Large screens: keep the reading width calm */
@media (min-width: 1600px) {
  :root { --content-max: 1280px; }
}

/* Tablet & small laptop: stack hero, portrait on top, smaller */
@media (max-width: 900px) {
  .hero { align-items: flex-start; }
  .hero-two-col { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; }
  .portrait-grid { width: 820px; opacity: .22; }
  .portrait-frame { max-width: 300px; }
  .hero-corner { display: none; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 16px; margin: 28px 0 40px; }
  .section-heading p { max-width: 520px; text-align: left; }
}

/* Mobile: collapsible nav, tighter spacing */
@media (max-width: 720px) {
  :root { --header-h: 72px; }

  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: hsl(240 6% 5% / .98);
    border-bottom: 1px solid hsl(var(--border));
    font-size: 20px; font-weight: 600;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: 16px 0; border-bottom: 1px solid hsl(var(--border)); }
  .site-nav a:last-child { border-bottom: 0; color: hsl(var(--primary)); }

  .wordmark { font-size: 14px; gap: 8px; }
  .logo-mark { width: 26px; height: 26px; }
  .wordmark-text { font-size: 16px; }

  .hero-hi { margin-bottom: 24px; }
  .hero-intro { font-size: 15px; margin-top: 24px; }
  .hero-bottom { margin-top: 28px; }
  .portrait-frame { max-width: 240px; }

  .section-label { font-size: 9px; letter-spacing: 1px; }

  .position { padding: 24px 0 24px 28px; }
  .company-heading { padding-left: 28px; }
  .position-marker { left: -25px; }
  .company-marker { left: -25px; }
  .position.prominent .position-marker { left: -47px; top: calc(.71em - 5.5px); }
  .position.prominent .position-content { padding: 18px 20px; }
  .position.prominent .position-content h4 { font-size: 19px; }
  .company-heading h3 { font-size: 20px; }
  .company-group + .company-group { margin-top: 48px; }

  .side-work { padding: 20px; margin: 20px 0 0 28px; }
  .side-work-item h3 { font-size: 18px; }

  .site-footer { flex-wrap: wrap; }
  .contact-alt { flex-direction: column; gap: 0; }
  .contact-alt-divider { display: none; }

}

/* Small phones */
@media (max-width: 400px) {
  h1 { font-size: 40px; }
  .primary-link, .case-banner-cta { width: 100%; }
  .section-label span:last-child { display: none; }
  .contact-email { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave { animation: none; }
  .portrait-img, .portrait-frame { transition: none; }
  *, *::before, *::after { transition: none !important; }
}
