/* Layout concept: asymmetric editorial grid on near-black; oversized expanded type,
   lime used sparingly for action and emphasis, Filmylog purple as the second voice. */
:root {
  --bg: #0E0F0C;
  --surface: #161812;
  --surface-2: #1D201A;
  --line: #2B2F26;
  --fg: #EEF0E6;
  --muted: #9EA393;
  --accent: #C6F432;        /* lime fill */
  --accent-ink: #C6F432;    /* lime as text on bg */
  --on-accent: #10120B;
  --purple: #7012CE;        /* Filmylog purple, fills */
  --purple-ink: #B08CF5;    /* purple as text / strokes */
  --purple-soft: #231A33;
  --ph: #F5B847;            /* placeholder marker */
  --header-bg: rgba(14, 15, 12, 0.78);

  --font-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: clamp(0.8rem, 0.77rem + 0.12vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.4rem);
  --step-4: clamp(2.6rem, 1.7rem + 4.4vw, 5.8rem);

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F3F4EE; --surface: #FFFFFF; --surface-2: #EBEDE4; --line: #D7DACD;
    --fg: #12140F; --muted: #575C4E;
    --accent: #C6F432; --accent-ink: #4A6400; --on-accent: #10120B;
    --purple: #7012CE; --purple-ink: #6A12C4; --purple-soft: #EEE5FB;
    --ph: #9A5B00; --header-bg: rgba(243, 244, 238, 0.82);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F3F4EE; --surface: #FFFFFF; --surface-2: #EBEDE4; --line: #D7DACD;
  --fg: #12140F; --muted: #575C4E;
  --accent: #C6F432; --accent-ink: #4A6400; --on-accent: #10120B;
  --purple: #7012CE; --purple-ink: #6A12C4; --purple-soft: #EEE5FB;
  --ph: #9A5B00; --header-bg: rgba(243, 244, 238, 0.82);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
strong { font-weight: 600; }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 64px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

/* Type */
.display {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.h2 { font-family: var(--font-display); font-variation-settings: "wdth" 118; font-weight: 800; font-size: var(--step-3); letter-spacing: -0.03em; line-height: 1.02; }
.h3 { font-family: var(--font-display); font-variation-settings: "wdth" 112; font-weight: 750; font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.1; }
.h4 { font-family: var(--font-display); font-variation-settings: "wdth" 112; font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.2; }
.h5 { font-family: var(--font-body); font-weight: 600; font-size: var(--step-0); line-height: 1.3; }
.label, .eyebrow, .mono-cap, .project-tag, .t-when, .hero-facts dt, .ps dt {
  font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.label { color: var(--accent-ink); }
.prose p { max-width: 62ch; }
.prose p + p { margin-top: 1.1em; }
.small { font-size: var(--step--1); color: var(--muted); }

/* Placeholder marker: visible on purpose until real content is added */
.ph {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.02em; text-transform: none;
  color: var(--ph); border: 1px dashed currentColor; border-radius: 6px; padding: 1px 8px; line-height: 1.6;
  background: transparent;
}
.ph::before { content: "TO ADD · "; opacity: .75; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-display); font-variation-settings: "wdth" 125; font-weight: 900; font-size: 13px; letter-spacing: -0.02em;
}
.brand-name { font-family: var(--font-display); font-variation-settings: "wdth" 112; font-weight: 700; letter-spacing: -0.01em; }
.nav ul { display: flex; gap: 4px; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: 0.95rem; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav a:hover, .nav a[aria-current="true"], .nav a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent-ink); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg);
  transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--muted); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
.theme-toggle[data-mode="light"] .i-sun { display: none; }
.theme-toggle[data-mode="light"] .i-moon { display: block; }
.menu-toggle { display: none; position: relative; }
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 1.8px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease); }
.menu-toggle span:first-child { transform: translateY(-4px); }
.menu-toggle span:last-child { transform: translateY(4px); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: grid; }
  .brand-name { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a { padding: 14px 12px; border-radius: var(--radius-sm); font-size: 1.1rem; color: var(--fg); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  font: 600 1rem/1 var(--font-body); text-decoration: none; border: 1px solid transparent;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-dark { background: var(--on-accent); color: #F2F5E6; }
.btn-dark:hover { transform: translateY(-2px); }

/* Social links (text, descriptive) */
.social { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.social a {
  font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; color: var(--fg); border-bottom: 1px solid var(--line); padding: 4px 0;
  transition: border-color .2s, color .2s;
}
.social a[href]::after { content: " ↗"; color: var(--accent-ink); }
.social a[href]:hover { border-color: var(--accent-ink); }
a.is-missing { color: var(--ph) !important; border-bottom: 1px dashed var(--ph) !important; cursor: help; }
a.is-missing::after { content: " · add link" !important; color: var(--ph) !important; text-transform: none; }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { min-width: 0; display: grid; gap: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.hero h1 { font-size: var(--step-4); }
.hero h1 .line { display: block; }
.hero h1 .accent { color: var(--accent-ink); }
.lead { font-size: var(--step-1); line-height: 1.55; color: var(--muted); max-width: 40ch; }
.lead strong { color: var(--fg); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { margin: 0; min-width: 0; display: grid; justify-items: center; gap: 14px; }
.strip-tilt { transform: rotate(6deg); }
.strip {
  position: relative; width: min(300px, 70vw); height: clamp(380px, 46vw, 520px); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 34px;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.strip::before, .strip::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 14px;
  background-image: radial-gradient(circle at 50% 50%, var(--bg) 0 4px, transparent 4.5px);
  background-size: 14px 22px; background-repeat: repeat-y;
}
.strip::before { left: 10px; } .strip::after { right: 10px; }
.strip-track { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; animation: advance 28s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.frame {
  position: relative; aspect-ratio: 16 / 11; max-width: 100%;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  display: grid; place-items: center;
}
.frame svg { width: 88%; height: auto; }
.frame span { position: absolute; left: 8px; bottom: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); }
@keyframes advance { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.s-line, .s-dim, .s-purple { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.s-line { stroke: var(--fg); }
.s-dim { stroke: var(--line); stroke-width: 2; }
.s-purple { stroke: var(--purple-ink); }
.f-lime { fill: var(--accent); }
.f-fg { fill: var(--fg); }
.f-dim { fill: var(--line); }
.f-purple { fill: var(--purple-ink); }
.mono-cap { text-align: center; }

.hero-facts {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.hero-facts > div { padding: 18px 20px 0 0; display: grid; gap: 6px; min-width: 0; }
.hero-facts > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.hero-facts dd { font-weight: 500; }

/* Load sequence: runs once, ends fully visible */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-visual { animation: rise .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .hero-copy > :nth-child(4) { animation-delay: .2s; }
  .hero-copy > :nth-child(5) { animation-delay: .26s; }
  .hero-visual { animation-delay: .18s; }
}
@keyframes rise { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 128px); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.split { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); align-items: end; gap: 24px; }
.section-note { color: var(--muted); }

.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.about-grid .section-head { margin-bottom: 0; position: sticky; top: 96px; }
.about-body { font-size: var(--step-1); line-height: 1.6; }
.about-body p:first-child::first-line { color: var(--fg); }
.about-body p { color: var(--muted); }
.about-body p:first-child { color: var(--fg); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.project {
  grid-column: span 2; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s, transform .25s var(--ease);
}
.project:hover { border-color: color-mix(in srgb, var(--accent-ink) 55%, var(--line)); transform: translateY(-3px); }
.project.wide { grid-column: span 3; }
.project-tag { color: var(--purple-ink); }
.ps { display: grid; gap: 14px; }
.ps > div { display: grid; gap: 4px; }
.ps dd { color: var(--muted); }
.project .chips { margin-top: auto; }
.project-links { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.project-links a { font-weight: 600; font-size: 0.95rem; text-decoration: none; border-bottom: 1px solid var(--accent-ink); padding-bottom: 1px; }
.project-links a[href]::after { content: " ↗"; color: var(--accent-ink); }
.project-links a[href]:hover { color: var(--accent-ink); }

.project.featured {
  grid-column: 1 / -1; flex-direction: row; padding: 0; overflow: hidden; gap: 0;
}
.project.featured:hover { transform: none; }
.featured-art {
  flex: 0 0 38%; position: relative; min-height: 320px;
  background: var(--purple); display: grid; place-items: center; overflow: hidden;
}
.fl-mark {
  width: 46%; height: auto; aspect-ratio: 1; max-width: 220px; display: block;
}
.fl-sprockets {
  position: absolute; left: 0; right: 0; bottom: 18px; height: 10px;
  background-image: radial-gradient(circle, rgba(255,255,255,.28) 0 3.5px, transparent 4px);
  background-size: 22px 10px; background-repeat: repeat-x;
}
.featured .project-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: clamp(24px, 3.4vw, 44px); }
.featured .h3 { font-size: var(--step-3); }
.project-intro { font-size: var(--step-1); line-height: 1.5; max-width: 44ch; }
.featured .ps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
.chips li.ph { border-style: dashed; border-color: var(--ph); background: transparent; color: var(--ph); }

/* Timeline */
.timeline { border-top: 1px solid var(--line); }
.t-item {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 32px;
  padding-block: 26px; border-bottom: 1px solid var(--line); align-items: baseline;
  transition: background-color .25s;
}
.t-item:hover { background: linear-gradient(90deg, transparent, var(--surface) 30%, transparent); }
.t-when { font-variant-numeric: tabular-nums; }
.t-when .now { color: var(--on-accent); background: var(--accent); padding: 2px 8px; border-radius: 999px; }
.t-role { color: var(--purple-ink); font-weight: 500; margin-top: 2px; }
.t-desc { color: var(--muted); max-width: 56ch; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.skill-group { min-width: 0; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 14px; align-content: start; }

/* Education + Beyond */
.edu-beyond { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.edu { display: grid; gap: 10px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.edu .h3 { font-size: var(--step-1); }
.edu-degree { color: var(--fg); }
.edu-years { font-family: var(--font-display); font-variation-settings: "wdth" 125; font-weight: 800; font-size: var(--step-2); letter-spacing: -0.02em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.beyond { display: grid; gap: 12px; }
.beyond-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.b-card { min-width: 0; display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 2px solid var(--fg); }
.b-card p { color: var(--muted); }
.b-icon { width: 44px; height: 44px; }
.b-cone { fill: var(--accent); }
.b-base { fill: var(--purple-ink); }
.b-src { fill: var(--fg); }
.b-line { fill: none; stroke: var(--muted); stroke-width: 2; }

/* Contact */
.contact { background: var(--accent); color: var(--on-accent); }
.contact-inner { padding-block: clamp(72px, 10vw, 140px); display: grid; gap: 24px; }
.contact .label.on-accent { color: var(--on-accent); opacity: .7; }
.contact-title { font-size: var(--step-4); max-width: 14ch; }
.contact-lead { font-size: var(--step-1); max-width: 46ch; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 8px; }
.email {
  font-family: var(--font-display); font-variation-settings: "wdth" 112; font-weight: 700;
  font-size: clamp(1.15rem, 0.8rem + 1.8vw, 2.2rem); letter-spacing: -0.01em;
  color: var(--on-accent); text-decoration: none; border-bottom: 3px solid var(--on-accent);
  overflow-wrap: anywhere; user-select: all;
}
.email:hover { opacity: .8; }
.copy-status { font-family: var(--font-mono); font-size: var(--step--1); }
.social-on-accent a { color: var(--on-accent); border-bottom-color: rgba(16,18,11,.35); }
.social-on-accent a[href]::after { color: var(--on-accent); }
.contact a.is-missing { color: #5A4300 !important; border-bottom-color: #5A4300 !important; }
.contact a.is-missing::after { color: #5A4300 !important; }
.contact :focus-visible { outline-color: var(--on-accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 28px; color: var(--muted); font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--fg); }

/* Responsive */
@media (max-width: 1020px) {
  .project, .project.wide { grid-column: span 3; }
  .projects > .project:last-child:nth-child(even) { grid-column: 1 / -1; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edu-beyond { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .strip-tilt { transform: rotate(4deg); }
  .strip { height: 320px; width: min(260px, 72vw); }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-grid .section-head { position: static; }
  .section-head.split { grid-template-columns: minmax(0, 1fr); }
  .project.featured { flex-direction: column; }
  .featured-art { flex-basis: auto; min-height: 220px; }
  .featured .ps { grid-template-columns: minmax(0, 1fr); }
  .t-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .beyond-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
  .project, .project.wide, .projects > .project:last-child:nth-child(even) { grid-column: 1 / -1; }
  .skills { grid-template-columns: minmax(0, 1fr); }
  .hero-facts { grid-template-columns: minmax(0, 1fr); }
  .hero-facts > div, .hero-facts > div + div { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

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

/* ==========================================================
   Freelance page (/freelance)
   Reuses tokens, header, buttons, chips, section heads, contact band and footer.
   ========================================================== */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.fl-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.fl-display { font-size: clamp(2.4rem, 1.5rem + 4vw, 5.2rem); max-width: 15ch; }
.fl-display .accent { color: var(--accent-ink); }

/* Avenizer identity card */
.az-card {
  min-width: 0; display: grid; gap: 18px; padding: clamp(20px, 2.4vw, 28px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.az-tagline { font-family: var(--font-display); font-variation-settings: "wdth" 112; font-weight: 700; font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.01em; }
.az-facts { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.az-facts > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; }
.az-facts dt { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.az-link, .client-link a {
  justify-self: start; font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border-bottom: 1px solid var(--accent-ink); padding-bottom: 1px; overflow-wrap: anywhere;
}
.az-link::after, .client-link a::after { content: " ↗"; color: var(--accent-ink); }
.az-link:hover, .client-link a:hover { color: var(--accent-ink); }

/* Logo slots: show the real logo when set in freelance.js, otherwise a marked placeholder */
.logo-slot {
  position: relative; display: grid; place-items: center; min-height: 128px; padding: 20px;
  background-color: var(--surface-2);
  background-image: radial-gradient(color-mix(in srgb, var(--fg) 9%, transparent) 1px, transparent 1.2px);
  background-size: 14px 14px;
  border-radius: var(--radius-sm);
}
.logo-slot img { max-height: 64px; max-width: 72%; width: auto; height: auto; object-fit: contain; }
.logo-slot.has-logo { background-image: none; background-color: #FFFFFF; } /* logos are usually made for white */
.logo-slot.has-logo .logo-ph { display: none; }
.logo-ph {
  display: grid; justify-items: center; gap: 8px; text-align: center;
  padding: 12px 16px; border: 1px dashed var(--ph); border-radius: var(--radius-sm); background: var(--surface);
}
.logo-ph-name { font-family: var(--font-display); font-variation-settings: "wdth" 118; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1.15; color: var(--fg); }
.logo-ph-tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ph); }
.az-logo { min-height: 104px; }
.az-logo .logo-ph-name { font-size: 1.5rem; font-variation-settings: "wdth" 125; }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.svc-col { min-width: 0; display: grid; gap: 4px; align-content: start; }
.svc-kicker { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--purple-ink); padding-bottom: 14px; border-bottom: 2px solid var(--fg); }
.svc-list li {
  display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 4px 20px; align-items: baseline;
  padding-block: 14px; border-bottom: 1px solid var(--line);
}
.svc-list p { color: var(--muted); font-size: 0.95rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 16px; cursor: pointer;
  font: 500 0.95rem/1 var(--font-body); color: var(--fg);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  transition: background-color .2s, border-color .2s, color .2s;
}
.filter:hover { border-color: var(--muted); }
.filter .count { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter[aria-pressed="true"] .count { color: var(--on-accent); opacity: .7; }
.filter-status { margin-top: 16px; margin-bottom: 28px; font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em; color: var(--muted); }

/* Client grid */
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.client-card { min-width: 0; display: flex; }
.client-card > article {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s, transform .25s var(--ease);
}
.client-card > article:hover { border-color: color-mix(in srgb, var(--accent-ink) 55%, var(--line)); transform: translateY(-3px); }
.client-card .logo-slot { border-radius: 0; border-bottom: 1px solid var(--line); min-height: 148px; }
.client-body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: clamp(18px, 2.2vw, 24px); }
.client-desc { color: var(--muted); }
.client-link { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.no-link { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.chips.delivered li { background: var(--purple-soft); border-color: transparent; color: var(--fg); }

@media (prefers-reduced-motion: no-preference) {
  .client-card.enter { animation: rise .45s var(--ease) both; }
}

@media (max-width: 1020px) {
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .fl-hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .client-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-list li { grid-template-columns: minmax(0, 1fr); }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; padding-bottom: 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; }
}
