@layer reset, tokens, base, layout, components, utilities;

@layer reset, tokens, base, layout, components, utilities;

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

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body { margin: 0; }

  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }

  input, button, textarea, select { font: inherit; }

  ul[role="list"],
  ol[role="list"] { list-style: none; }
}


/* =========================================================
   TOKENS
   ─────────────────────────────────────────────────────────
   Sections:
     1. Layout & Spacing
     2. Color — Surface
     3. Color — Text
     4. Color — Border & Shadow
     5. Color — Interactive
     6. Typography — Families & Weights
     7. Typography — Scale
     8. Typography — Line-height & Letter-spacing
     9. Radius
    10. Motion
    11. Z-index
   ========================================================= */
@layer tokens {
  :root {

    /* ── 1. Layout & Spacing ─────────────────────────── */
    --container-max:    1300px;
    --container-prose:  72ch;        /* readable long-form text */
    --gutter:           clamp(16px, 4vw, 30px);
    --section-pad-y:    clamp(3rem, 6vw, 6rem);

    /* Header */
    --header-pad-y:     8px;
    --logo-h:           78px;
    --header-h:         calc(var(--logo-h) + (2 * var(--header-pad-y)));

    /* Spacing scale — use for margins, gaps, padding */
    --space-1:  0.25rem;   /*  4px */
    --space-2:  0.5rem;    /*  8px */
    --space-3:  0.75rem;   /* 12px */
    --space-4:  1rem;      /* 16px */
    --space-5:  1.25rem;   /* 20px */
    --space-6:  1.5rem;    /* 24px */
    --space-8:  2rem;      /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */


    /* ── 2. Color — Surface ──────────────────────────── */
    --color-bg:         #FFFFFF;        /* primary page background */
    --color-bg-alt:     #F5F5F5;        /* alternate section background (e.g. education) */
    --color-bg-subtle:  rgba(0,0,0,0.025); /* story--reverse, very light tint */
    --color-bg-overlay: rgba(0,0,0,0.50);  /* image overlays */

    /* Legacy aliases — kept for backward compatibility during migration.
       Replace with the tokens above as you refactor each component. */
    --color-bg1:        var(--color-bg);
    --color-bg2:        var(--color-bg-alt);


    /* ── 3. Color — Text ─────────────────────────────── */
    --color-heading:    hsl(0, 0%, 0%);          /* h1, h2, h3 */
    --color-text:       hsl(0, 0%, 11%);         /* body copy */
    --color-text-muted: hsl(0, 0%, 40%);         /* captions, meta, secondary info */
    --color-text-faint: hsl(0, 0%, 60%);         /* placeholders, disabled */
    --color-kicker:     hsl(0, 0%, 45%);         /* section kickers / labels */

    /* Legacy aliases */
    --color-text-grey:  var(--color-text-muted);
    --color-h1:         var(--color-heading);
    --color-h2:         var(--color-heading);
    --color-h3:         var(--color-text);
    --color-points:     var(--color-text-muted);


    /* ── 4. Color — Border & Shadow ──────────────────── */
    --color-border:         hsl(0, 0%, 86%);    /* default border */
    --color-border-strong:  hsl(0, 0%, 20%);    /* hover border, accent line */
    --color-border-faint:   rgba(0,0,0,0.06);   /* card inner dividers */

    --shadow-xs:  0 1px 2px rgba(0,0,0,.06);
    --shadow-sm:  0 2px 6px -1px rgba(0,0,0,.08), 0 1px 2px -1px rgba(0,0,0,.04);
    --shadow-md:  0 4px 16px -4px rgba(0,0,0,.12), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg:  0 10px 32px -8px rgba(0,0,0,.18), 0 4px 8px -2px rgba(0,0,0,.08);
    --shadow-xl:  0 20px 48px -12px rgba(0,0,0,.22);

    /* Legacy aliases */
    --color-line:           hsl(0, 0%, 0%);
    --color-symbol:         hsl(0, 0%, 10%);
    --color-gray_border:    var(--color-border);
    --color-hover_border:   var(--color-border-strong);
    --color-gray_shadow:    hsl(0, 0%, 60%);
    --color-shadow-border:  rgba(0,0,0,0.10);   /* NOTE: was --color--shadow-border (typo) */
    --color-shadow-md:      var(--shadow-md);    /* legacy name used in .card */


    /* ── 5. Color — Interactive ──────────────────────── */
    --color-hover:          hsl(0, 0%, 39%);
    --color-accent:         hsl(0, 0%, 95%);
    --color-accent-strong:  hsl(0, 0%, 10%);
    --color-gray_bg:        hsl(0, 0%, 95%);    /* legacy alias */


    /* ── 6. Typography — Families & Weights ─────────── */
    --ff-sans:    "Inter",        system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --ff-heading: "Space Grotesk", sans-serif;
    --ff-mono:    "JetBrains Mono", "Fira Code", ui-monospace, monospace;

    --fw-light:   300;
    --fw-regular: 400;
    --fw-medium:  500;
    --fw-semibold:600;
    --fw-bold:    700;


    /* ── 7. Typography — Scale ───────────────────────── */
    --fs-xs:    clamp(0.55rem,  1.5vw, 0.7rem);
    --fs-small: clamp(0.65rem,  1.8vw, 0.8rem);
    --fs-body:  clamp(0.85rem,  1.8vw, 1rem);
    --fs-lead:  clamp(1rem,     1.5vw, 1.2rem);
    --fs-nav:   clamp(0.85rem,  2vw,   1rem);
    --fs-h4:    clamp(1rem,     1.5vw, 1.25rem);
    --fs-h3:    clamp(1.25rem,  2vw,   1.75rem);
    --fs-h2:    clamp(1.75rem,  3vw,   3.25rem);
    --fs-h1:    clamp(2.75rem,  5vw,   5rem);

    /* Page-hero specific — project pages */
    --fs-page-title: clamp(2rem, 6vw, 3.25rem);


    /* ── 8. Typography — Line-height & Letter-spacing ── */
    --lh-tight:  1.1;
    --lh-snug:   1.3;
    --lh-normal: 1.6;
    --lh-relaxed:1.75;
    --lh-wide:   2;

    --ls-tight:  -0.05em;   /* h1 */
    --ls-snug:   -0.01em;   /* h2 */
    --ls-normal: 0;
    --ls-wide:   0.06em;    /* kickers, labels */
    --ls-wider:  0.12em;    /* all-caps micro text */


    /* ── 9. Radius ───────────────────────────────────── */
    --radius-xs:   4px;
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-pill: 999px;


    /* ── 10. Motion ──────────────────────────────────── */
    --ease-out:      cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-in:       cubic-bezier(0.4, 0.0, 1.0, 1);
    --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);  /* most UI transitions */
    --ease-spring:   cubic-bezier(0.6, 0.9, 0.2, 1);  /* nav drop, bouncy */
    --ease-hero:     cubic-bezier(0.2, 0.8, 0.8, 1);  /* hero rise */

    --duration-instant: 80ms;
    --duration-fast:    180ms;
    --duration-base:    300ms;
    --duration-slow:    500ms;
    --duration-reveal:  700ms;
    --duration-long:    900ms;


    /* ── 11. Z-index ─────────────────────────────────── */
    --z-below:   -1;
    --z-base:     0;
    --z-raised:   10;   /* cards on hover */
    --z-overlay:  20;   /* image overlays, drawers */
    --z-header:   100;
    --z-modal:    200;
    --z-toast:    300;
  }


  /* ── Responsive overrides ──────────────────────────── */

  @media (max-width: 768px) {
    :root {
      --logo-h:         42px;
      --header-pad-y:   10px;
      --header-h:       calc(var(--logo-h) + (2 * var(--header-pad-y)));
    }
  }

  @media (max-width: 420px) {
    :root {
      --logo-h:         38px;
      --header-pad-y:   9px;
    }
  }

  @media (min-width: 1600px) {
    :root { --container-max: 1400px; }
  }

  @media (min-width: 2000px) {
    :root { --container-max: 1600px; }
  }
}


/* =========================================================
   BASE
   Bare element styles — no class selectors here.
   ========================================================= */
@layer base {
  html {
    width: 100%;
    font-size: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
  }

  body {
    width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    font-family: var(--ff-sans);
    font-weight: var(--fw-regular);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background: var(--color-bg);
    /* Subpixel antialiasing on macOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Headings */
  h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.6em;
    font-family: var(--ff-heading);
    line-height: var(--lh-tight);
    color: var(--color-heading);
  }

  h1 {
    font-size: var(--fs-h1);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-tight);
  }

  h2 {
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-snug);
  }

  h3 {
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-normal);
  }

  h4 {
    font-size: var(--fs-h4);
    font-weight: var(--fw-semibold);
  }

  /* Body copy */
  p {
    margin: 0 0 1em;
    max-width: var(--container-prose);
  }

  /* Links */
  a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-standard);
  }

  a:hover { color: var(--color-hover); }

  /* Images */
  img {
    height: auto;
  }

  /* Code */
  code, kbd, samp, pre {
    font-family: var(--ff-mono);
    font-size: 0.9em;
  }

  /* Reduce motion for people who prefer it */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }

  /* Mobile heading alignment override */
  @media (max-width: 768px) {
    h2 {
      text-align: center;
      margin-bottom: var(--space-10);
    }
  }
}


/* =========================================================
   LAYOUT
   Page-level structural patterns only.
   Component-level layouts belong in components/.
   ========================================================= */
@layer layout {

  /* Push content below fixed header */
  main { padding-top: var(--header-h); }

  /* Centred content container */
  .container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  /* Narrow prose container — for long-form text blocks */
  .container--prose {
    max-width: var(--container-prose);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  /* Section vertical rhythm */
  .section {
    padding-block: var(--section-pad-y);
  }

  /* Alternate section backgrounds — apply to every other .section */
  .section--alt    { background: var(--color-bg-alt); }
  .section--subtle { background: var(--color-bg-subtle); }
}


/* =========================================================
   UTILITIES
   Single-purpose helpers. Compose freely in HTML.
   ========================================================= */
@layer utilities {

  /* Typography */
  .text-xs      { font-size: var(--fs-xs); }
  .text-small   { font-size: var(--fs-small); }
  .text-lead    { font-size: var(--fs-lead); line-height: var(--lh-snug); }
  .text-muted   { color: var(--color-text-muted); }
  .text-faint   { color: var(--color-text-faint); }
  .text-kicker  {
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--color-kicker);
  }
  .text-balance { text-wrap: balance; }
  .text-center  { text-align: center; }

  /* Display */
  .sr-only,
  .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;
  }

  /* Spacing helpers — margin-block-start */
  .mt-0  { margin-top: 0; }
  .mt-4  { margin-top: var(--space-4); }
  .mt-8  { margin-top: var(--space-8); }

  /* Flex shortcuts */
  .flex         { display: flex; }
  .flex-center  { display: flex; align-items: center; justify-content: center; }
  .flex-between { display: flex; align-items: center; justify-content: space-between; }
  .gap-2        { gap: var(--space-2); }
  .gap-4        { gap: var(--space-4); }
  .gap-6        { gap: var(--space-6); }
}


/* =========================================================
   COMPONENTS
   Shared, reusable UI patterns used across pages.
   Page- and section-specific styles live in their own files.
   ========================================================= */
@layer components {

  /* ── Card ──────────────────────────────────────────── */
  .card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    transition: box-shadow var(--duration-base) var(--ease-standard),
                transform    var(--duration-base) var(--ease-standard);
  }

  .card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }


  /* ── Tag / Pill label ──────────────────────────────── */
  .tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    line-height: 1;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    white-space: nowrap;
  }


  /* ── Content bullets — shared list style ───────────── */
  /* Replaces .education-text-bullets — use everywhere    */
  .content-bullets ul {
    list-style: disc;
    list-style-position: outside;
    padding-left: 1.1em;
    margin: var(--space-3) 0 var(--space-8);
    color: var(--color-text);
    line-height: var(--lh-relaxed);
  }

  .content-bullets ul li {
    margin: 0.35em 0;
    padding-left: 0.25em;
  }

  /* Labeled bullet variant: "Key: value" */
  .content-bullets .bullet-key {
    font-weight: var(--fw-semibold);
  }

  .content-bullets .bullet-key::after {
    content: ":";
    margin-right: 0.35rem;
  }

  @media (max-width: 900px) {
    .content-bullets ul {
      list-style: none;
      padding: 0;
      width: min(100%, 28rem);
      margin: var(--space-5) auto var(--space-6);
      display: grid;
      gap: var(--space-2);
    }

    .content-bullets ul li {
      width: 100%;
      padding: 0 0 var(--space-3);
      text-align: center;
    }

    .content-bullets ul li::after {
      content: "";
      display: block;
      width: 2.75rem;
      height: 1px;
      margin: var(--space-3) auto 0;
      background: var(--color-border);
      opacity: 0.9;
    }

    .content-bullets ul li:last-child {
      padding-bottom: 0;
    }

    .content-bullets ul li:last-child::after {
      display: none;
    }

    /* Center-rule separator for labeled keys on mobile */
    .content-bullets .bullet-key {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-2);
      width: min(26rem, 92%);
      margin: 0 auto var(--space-2);
      font-weight: var(--fw-light);
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
    }

    .content-bullets .bullet-key::before,
    .content-bullets .bullet-key::after {
      content: "";
      flex: 1;
      height: 1px;
      background: var(--color-border);
      opacity: 0.9;
    }

    /* Remove the colon on mobile (already visually separated) */
    /* override the desktop ::after colon */
    .content-bullets .bullet-key::after {
      content: "";    /* clear colon, replaced by rule */
      margin-right: 0;
    }
  }


  /* ── Divider line ──────────────────────────────────── */
  .divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin-block: var(--section-pad-y);
  }

  .divider--short {
    width: 240px;
    margin-inline: 0;
    border-color: var(--color-border-strong);
    opacity: 0.7;
  }
}


@layer components {
  .header{
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 9999;
    padding: var(--header-pad-y) 0;
    background: var(--color-bg-alt);
    backdrop-filter: saturate(165%) blur(14px);
    border-bottom: 1px solid transparent;
    transition:
      background 220ms ease,
      border-color 220ms ease,
      box-shadow 220ms ease,
      padding 220ms ease;
  }

  .header::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  body.nav-open .header::before {
    opacity: 1;
    pointer-events: auto;
  }

  .header.on-scroll{
    background: var(--color-bg-alt);
    /*border-bottom-color: var(--color-line);*/
    box-shadow: 0 18px 44px rgba(16, 18, 23, 0.08);
  }

  .header-inner{
    position: relative;
    z-index: 3;
    width: min(var(--container-max), calc(100% - (2 * var(--gutter))));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 34px);
    min-width: 0;
  }

  .logo{
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 0 0 auto;
  }

  .logo-img{
    height: var(--logo-h);
    width: auto;
    display: block;
  }

  .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(0.7rem, 1.6vw, 1rem);
    min-width: 0;
    flex: 1 1 auto;
  }

  .header-tools {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 0 0 auto;
    padding: 0.18rem 0.34rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-xs);
    backdrop-filter: saturate(150%) blur(10px);
  }

  .nav{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(14px, 1.8vw, 28px);
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
  }

  .nav a{
    position: relative;
    font-family: var(--ff-sans);
    font-size: var(--fs-nav);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--color-text);
    opacity: 0.84;
    transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
  }

  .nav__link{
    padding: 0.42rem 0;
  }

  .nav__link::after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.1rem;
    height: 1.5px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 180ms ease;
    opacity: 0.88;
  }

  .nav__link:hover,
  .nav a.is-active{
    opacity: 1;
    transform: translateY(-1px);
  }

  .nav__link:hover::after,
  .nav a.is-active::after{
    transform: scaleX(1);
  }

  .nav:has(.nav__link:hover) .nav__link:not(:hover):not(.is-active){
    opacity: 0.48;
  }

  .nav a.is-active{
    color: var(--color-accent-strong);
  }

  .nav .button-redirect{
    margin-left: clamp(6px, 1vw, 12px);
    padding-inline: 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .nav__meta {
    display: contents;
  }

  .nav__language {
    display: none;
  }

  .nav__language-button {
    padding: 0;
    color: var(--color-text-faint);
    font: inherit;
    line-height: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition:
      color var(--duration-fast) var(--ease-standard),
      border-color var(--duration-fast) var(--ease-standard),
      background var(--duration-fast) var(--ease-standard);
  }

  .header-language {
    position: relative;
    flex: 0 0 auto;
  }

  .header-language__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-height: 1.95rem;
    padding: 0 0.58rem;
    color: var(--color-text-muted);
    border: 0;
    border-radius: calc(var(--radius-pill) - 2px);
    background: transparent;
    font-family: var(--ff-sans);
    font-size: 0.74rem;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition:
      color var(--duration-fast) var(--ease-standard),
      border-color var(--duration-fast) var(--ease-standard),
      background var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .header-language__current {
    min-width: 1.5rem;
    text-align: center;
  }

  .header-language__chevron {
    width: 0.42rem;
    height: 0.42rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.1rem) rotate(45deg);
    transition: transform var(--duration-fast) var(--ease-standard);
  }

  .header-language.is-open .header-language__chevron {
    transform: translateY(0.06rem) rotate(-135deg);
  }

  .header-language__toggle:hover,
  .header-language__toggle:focus-visible {
    color: var(--color-heading);
    border-color: var(--color-border-strong);
    background: var(--color-bg-subtle);
    transform: translateY(-1px);
  }

  .header-language__toggle:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 3px;
  }

  .header-language__menu {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0;
    display: grid;
    gap: 0.15rem;
    min-width: 11.25rem;
    padding: 0.45rem;
    border: 1px solid var(--color-border);
    border-radius: calc(var(--radius-md) + 2px);
    background: var(--color-bg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.35rem);
    transition:
      opacity var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .header-language.is-open .header-language__menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .header-language__option {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 2.55rem;
    padding: 0.5rem 0.65rem;
    color: var(--color-text);
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
      background var(--duration-fast) var(--ease-standard),
      color var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .header-language__option:hover,
  .header-language__option:focus-visible {
    background: var(--color-bg-subtle);
    color: var(--color-heading);
  }

  .header-language__option:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 2px;
  }

  .header-language__code {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
  }

  .header-language__label {
    font-size: 0.96rem;
    font-weight: var(--fw-medium);
    letter-spacing: -0.01em;
  }

  .header-language__check {
    opacity: 0;
    color: var(--color-heading);
    transition: opacity var(--duration-fast) var(--ease-standard);
  }

  .header-language__option.is-active {
    color: var(--color-heading);
  }

  .header-language__option.is-active .header-language__check {
    opacity: 1;
  }

  .theme-switch,
  .theme-switch__input {
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .theme-switch {
    display: block;
    flex: 0 0 auto;
    width: 3em;
    height: 1.5em;
    font-size: 1rem;
  }

  .theme-switch__input {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0.75em;
    background-color: #1a2029;
    cursor: pointer;
    transition:
      background-color 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    -webkit-appearance: none;
    appearance: none;
  }

  .theme-switch__input::before {
    content: "";
    position: absolute;
    top: 0.125em;
    left: 0.125em;
    display: block;
    width: 1.25em;
    height: 1.25em;
    border-radius: 50%;
    background-color: transparent;
    transition:
      background-color 0.4s cubic-bezier(0.65, 0, 0.35, 1),
      transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .theme-switch__icon,
  .theme-switch__icon-part {
    position: absolute;
    display: block;
    top: 0;
    left: 0;
  }

  .theme-switch__icon {
    top: 50%;
    left: 0.125em;
    width: 1.25em;
    height: 1.25em;
    border-radius: 50%;
    background-color: #f4f5f7;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    transform: translateY(-50%);
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .theme-switch__icon-part {
    transition:
      box-shadow 0.4s cubic-bezier(0.65, 0, 0.35, 1),
      transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .theme-switch__icon-part--1,
  .theme-switch__icon-part--2,
  .theme-switch__icon-part--3 {
    border-radius: 50%;
  }

  .theme-switch__icon-part--1 {
    top: calc(50% - 0.375em);
    left: calc(50% - 0.375em);
    width: 0.75em;
    height: 0.75em;
    background-color: #f4f5f7;
  }

  .theme-switch__icon-part--2 {
    top: calc(50% - 0.4375em);
    left: calc(50% - 0.0625em);
    width: 0.5em;
    height: 0.5em;
    background-color: #1a2029;
    transform: translate(-0.1875em, 0.1875em) scale(0.2);
  }

  .theme-switch__icon-part--3 {
    width: 1.25em;
    height: 1.25em;
    box-shadow: 0 0 0 0.625em #1a2029 inset;
    transform: scale(0.25);
  }

  .theme-switch__icon-part--3 ~ .theme-switch__icon-part {
    top: 50%;
    left: 50%;
    width: 0.125em;
    height: 0.1875em;
    border-radius: 0.0625em;
    background-color: #1a2029;
    transform-origin: 50% 0;
  }

  .theme-switch__icon-part--4 {
    transform: translateX(-50%) rotate(0) translateY(0.25em);
  }

  .theme-switch__icon-part--5 {
    transform: translateX(-50%) rotate(45deg) translateY(0.25em);
  }

  .theme-switch__icon-part--6 {
    transform: translateX(-50%) rotate(90deg) translateY(0.25em);
  }

  .theme-switch__icon-part--7 {
    transform: translateX(-50%) rotate(135deg) translateY(0.25em);
  }

  .theme-switch__icon-part--8 {
    transform: translateX(-50%) rotate(180deg) translateY(0.25em);
  }

  .theme-switch__icon-part--9 {
    transform: translateX(-50%) rotate(225deg) translateY(0.25em);
  }

  .theme-switch__icon-part--10 {
    transform: translateX(-50%) rotate(270deg) translateY(0.25em);
  }

  .theme-switch__icon-part--11 {
    transform: translateX(-50%) rotate(315deg) translateY(0.25em);
  }

  .theme-switch__input:checked {
    background-color: #fbfaf7;
  }

  .theme-switch__input:checked::before,
  .theme-switch__input:checked ~ .theme-switch__icon {
    transform: translate(1.5em, -50%);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--2 {
    transform: translate(0, 0) scale(1);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--3 {
    box-shadow: 0 0 0 0.25em #1a2029 inset;
    transform: scale(1);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--4 {
    transform: translateX(-50%) rotate(0) translateY(0.625em) scale(0);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--5 {
    transform: translateX(-50%) rotate(45deg) translateY(0.625em) scale(0);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--6 {
    transform: translateX(-50%) rotate(90deg) translateY(0.625em) scale(0);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--7 {
    transform: translateX(-50%) rotate(135deg) translateY(0.625em) scale(0);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--8 {
    transform: translateX(-50%) rotate(180deg) translateY(0.625em) scale(0);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--9 {
    transform: translateX(-50%) rotate(225deg) translateY(0.625em) scale(0);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--10 {
    transform: translateX(-50%) rotate(270deg) translateY(0.625em) scale(0);
  }

  .theme-switch__input:checked ~ .theme-switch__icon .theme-switch__icon-part--11 {
    transform: translateX(-50%) rotate(315deg) translateY(0.625em) scale(0);
  }

  .theme-switch__input:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 3px;
  }

  .theme-switch__sr {
    overflow: hidden;
    position: absolute;
    width: 1px;
    height: 1px;
  }

  .burger {
    cursor: pointer;
    position: relative;
    display: none;
    z-index: 2;
    width: 1.75rem;
    height: 1.25rem;
    user-select: none;
    background: transparent;
    border: 0;
    padding: 0;
  }

  .burger-line {
    position: absolute;
    display: block;
    left: 0;
    opacity: 1;
    width: 100%;
    height: 2px;
    background-color: var(--color-line);
    transition: all 0.25s ease;
  }

  .burger-line:nth-child(1) {
    top: 0px;
  }

  .burger-line:nth-child(2) {
    top: 0.55rem;
    width: 70%;
  }

  .burger-line:nth-child(3) {
    top: 1.1rem;
  }

  .burger.is-active .burger-line:nth-child(1) {
    top: 0.55rem;
    transform: rotate(135deg);
  }

  .burger.is-active .burger-line:nth-child(2) {
    left: -1rem;
    opacity: 0;
  }

  .burger.is-active .burger-line:nth-child(3) {
    top: 0.55rem;
    transform: rotate(-135deg);
  }

  @media (max-width: 768px) {
    body.nav-open {
      overflow: hidden;
    }

    .header {
      border-bottom-color: var(--color-border);
    }

    .header-inner {
      gap: var(--space-4);
    }

    .header-actions {
      gap: 0.5rem;
      flex: 0 0 auto;
    }

    .header-tools {
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
      backdrop-filter: none;
      gap: 0.45rem;
    }

    .logo-img {
      height: var(--logo-h);
      max-height: none;
    }

    .header-language--desktop {
      display: none;
    }

    .header-language__toggle {
      min-height: 2.35rem;
      padding-inline: 0.7rem;
      font-size: 0.68rem;
    }

    .header-language__menu {
      min-width: 10.5rem;
      top: calc(100% + 0.55rem);
    }

    .header-language__option {
      min-height: 2.35rem;
      padding-inline: 0.58rem;
    }

    .header-language__label {
      font-size: 0.9rem;
    }

    .theme-switch {
      font-size: 1rem;
    }

    .burger {
      display: inline-grid;
      place-items: center;
      width: 2.55rem;
      height: 2.55rem;
      border: 0;
      border-radius: var(--radius-sm);
    }

    .burger-line {
      left: 50%;
      width: 1.22rem;
      transform: translateX(-50%);
    }

    .burger-line:nth-child(1) {
      top: 0.78rem;
    }

    .burger-line:nth-child(2) {
      top: 1.22rem;
      width: 0.92rem;
    }

    .burger-line:nth-child(3) {
      top: 1.66rem;
    }

    .burger.is-active .burger-line:nth-child(1) {
      top: 1.22rem;
      transform: translateX(-50%) rotate(135deg);
    }

    .burger.is-active .burger-line:nth-child(2) {
      left: 50%;
      transform: translateX(-50%);
    }

    .burger.is-active .burger-line:nth-child(3) {
      top: 1.22rem;
      transform: translateX(-50%) rotate(-135deg);
    }

    .nav {
      position: fixed;
      inset: 0 0 0 auto;
      z-index: 2;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      width: min(23rem, calc(100vw - var(--space-8)));
      height: 100vh;
      height: 100dvh;
      gap: 0;
      padding:
        calc(var(--header-h) + var(--space-8))
        clamp(1.35rem, 6vw, 2rem)
        clamp(1.35rem, 6vw, 2rem);
      overflow-y: auto;
      overscroll-behavior: contain;
      background: var(--color-bg);
      border-left: 1px solid var(--color-border);
      box-shadow: -24px 0 54px rgba(16, 18, 23, 0.14);
      transform: translateX(100%);
      opacity: 0;
      pointer-events: none;
      visibility: hidden;
      transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
    }

    .nav.is-open {
      transform: translateX(0);
      opacity: 1;
      pointer-events: auto;
      visibility: visible;
    }

    .nav a {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      min-height: 3.35rem;
      padding: 0.68rem 0;
      border-bottom: 1px solid var(--color-border);
      border-radius: 0;
      font-family: var(--ff-heading);
      font-size: clamp(1.24rem, 6vw, 1.75rem);
      font-weight: var(--fw-regular);
      line-height: var(--lh-snug);
      letter-spacing: 0;
      opacity: 1;
      text-align: right;
    }

    .nav__meta {
      display: grid;
      gap: 0.9rem;
      width: 100%;
      margin-top: var(--space-6);
      padding-top: var(--space-4);
      border-top: 1px solid var(--color-border);
    }

    .nav__language {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.4rem;
    }

    .nav__language-button {
      min-width: 2.75rem;
      min-height: 2.25rem;
      padding: 0 0.72rem;
      color: var(--color-text-muted);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-pill);
      background: transparent;
      font-size: 0.74rem;
      font-weight: var(--fw-semibold);
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
    }

    .nav__language-button.is-active,
    .nav__language-button:hover,
    .nav__language-button:focus-visible {
      color: var(--color-heading);
      border-color: var(--color-border-strong);
      background: var(--color-bg-subtle);
    }

    .nav__language-button:focus-visible {
      outline: 2px solid var(--color-border-strong);
      outline-offset: 2px;
    }

    .nav .button-redirect {
      justify-content: center;
      width: 100%;
      min-height: 2.8rem;
      margin: 0;
      padding: 0.72rem 1rem;
      color: var(--color-bg);
      border: 1px solid var(--color-heading);
      border-radius: var(--radius-sm);
      background: var(--color-heading);
      font-size: var(--fs-small);
      line-height: var(--lh-snug);
      white-space: normal;
      text-align: center;
    }

    .nav a:active {
      transform: none;
    }

    .nav__link::after {
      display: none;
    }

    .nav__link:hover,
    .nav a.is-active {
      transform: none;
    }

    .nav a.is-active {
      color: var(--color-heading);
      background: transparent;
    }

    .nav:has(a:hover) a:not(:hover) {
      opacity: 1;
    }

    .nav .button-redirect:hover,
    .nav .button-redirect:focus-visible {
      color: var(--color-heading);
      background: transparent;
    }

    .nav .button-redirect:focus-visible,
    .burger:focus-visible,
    .header-language__toggle:focus-visible,
    .theme-switch__input:focus-visible,
    .nav__language-button:focus-visible {
      outline: 2px solid var(--color-border-strong);
      outline-offset: 3px;
      box-shadow: none;
    }
  }

  @media (max-width: 420px) {
    .header-inner {
      width: min(var(--container-max), calc(100% - (2 * var(--gutter))));
    }

    .burger {
      width: 2.35rem;
      height: 2.35rem;
    }

    .nav a {
      min-height: 2.55rem;
    }
  }
}

@layer components {
  .site-footer{
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-faint);
    padding-block: clamp(2.25rem, 5vw, 3.75rem);
  }

  .site-footer__inner{
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: grid;
    justify-items: center;
    gap: clamp(0.9rem, 2vw, 1.25rem);
    text-align: center;
  }

  .site-footer__nav{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem clamp(0.85rem, 2vw, 1.35rem);
    max-width: 58rem;
  }

  .site-footer__nav a{
    font-size: var(--fs-small);
    line-height: 1.6;
    color: var(--color-text-muted);
    padding: 0.35rem 0.2rem;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    font-weight: var(--fw-semibold);
    transition: color var(--duration-fast) var(--ease-standard);
  }

  .site-footer__nav a:hover{
    color: var(--color-heading);
  }

  .site-footer__social{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.2rem;
  }

  .site-footer__social a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--color-heading);
    border-radius: 12px;
    transition:
      color var(--duration-fast) var(--ease-standard),
      background var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .site-footer__social a:hover{
    transform: translateY(-1px);
    color: var(--color-heading);
  }

  .site-footer__social svg{
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
  }

  .site-footer__copy{
    justify-self: center;
    width: 100%;
    margin: 0;
    text-align: center;
    color: var(--color-text-faint);
    font-size: var(--fs-small);
    line-height: var(--lh-snug);
  }

  @media (max-width: 560px) {
    .site-footer__nav {
      gap: 0.25rem 0.75rem;
    }

    .site-footer__social {
      gap: 0.9rem;
    }
  }
}


/* Button 23 */
@layer components {
.button-redirect {
  border: 1px solid var(--color-line);
  background-color: var(--color-bg1);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  font-family: Circular,-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  margin: 0;
  outline: none;
  padding: 8px 16px;
  position: relative;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  transition: box-shadow .2s,-ms-transform .1s,-webkit-transform .3s,transform .1s;
  user-select: none;
  -webkit-user-select: none;
  width: auto;
  gap: 10px;  
}

.button-redirect:focus-visible {
  box-shadow: #222222 0 0 0 10px, rgba(255, 255, 255, 0.8) 0 0 0 4px;
  transition: box-shadow .2s;
}

.button-redirect:active {
  background-color: #F7F7F7;
  border-color: #ffffff;
  transform: scale(.96);
}

.button-redirect:disabled {
  border-color: #DDDDDD;
  color: #DDDDDD;
  cursor: not-allowed;
  opacity: 1;
}

.button-redirect__icon{
  width: 1.1em;          /* scales with font size */
  height: 1.1em;
  flex: 0 0 auto;
}
}
@layer tokens {
  :root[data-theme="dark"] {
    --color-bg: #0f1115;
    --color-bg-alt: #151a22;
    --color-bg-subtle: rgba(255, 255, 255, 0.035);
    --color-bg-overlay: rgba(0, 0, 0, 0.62);

    --color-heading: #f3f5f8;
    --color-text: #d9dee7;
    --color-text-muted: #adb5c2;
    --color-text-faint: #858f9e;
    --color-kicker: #b9c2ce;

    --color-border: rgba(255, 255, 255, 0.14);
    --color-border-strong: rgba(255, 255, 255, 0.76);
    --color-border-faint: rgba(255, 255, 255, 0.08);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.32);
    --shadow-sm: 0 2px 6px -1px rgba(0, 0, 0, 0.38), 0 1px 2px -1px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 6px 20px -8px rgba(0, 0, 0, 0.5), 0 3px 8px -2px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 14px 38px -10px rgba(0, 0, 0, 0.56), 0 6px 14px -4px rgba(0, 0, 0, 0.34);
    --shadow-xl: 0 24px 56px -14px rgba(0, 0, 0, 0.6);

    --color-line: rgba(255, 255, 255, 0.8);
    --color-symbol: #f3f5f8;
    --color-gray_shadow: rgba(255, 255, 255, 0.16);
    --color-shadow-border: rgba(255, 255, 255, 0.08);

    --color-hover: #f3f5f8;
    --color-accent: rgba(255, 255, 255, 0.12);
    --color-accent-strong: #ffffff;
    --color-gray_bg: rgba(255, 255, 255, 0.08);
    --fade-bg: 15,17,21;
  }
}

@layer components {
  :root[data-theme="dark"] body {
    background:
      radial-gradient(circle at top, rgba(95, 113, 148, 0.12), transparent 38%),
      var(--color-bg);
  }

  :root[data-theme="dark"] .header {
    background: #151a22;
  }

  :root[data-theme="dark"] .header.on-scroll {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  }

  :root[data-theme="dark"] .header-language__menu {
    background: #151a22;
  }

  :root[data-theme="dark"] .header-tools {
    background: #151a22;
    border-color: var(--color-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  }

  :root[data-theme="dark"] .nav {
    background: #151a22;
  }

  :root[data-theme="dark"] .button-redirect {
    color: var(--color-heading);
    border-color: var(--color-border);
    background: rgba(255, 255, 255, 0.04);
  }

  :root[data-theme="dark"] .button-redirect:focus-visible {
    box-shadow:
      rgba(255, 255, 255, 0.16) 0 0 0 10px,
      rgba(255, 255, 255, 0.12) 0 0 0 4px;
  }

  :root[data-theme="dark"] .button-redirect:active {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
  }

  :root[data-theme="dark"] .hero {
    background: #171c25;
  }

  :root[data-theme="dark"] .hero__bg::before {
    background: rgba(255, 255, 255, 0.025);
  }

  :root[data-theme="dark"] .hero__bgItem {
    opacity: 0.16;
    filter: none;
    mix-blend-mode: screen;
  }

  :root[data-theme="dark"] .hero .button-redirect {
    color: #10131a;
    border-color: #ffffff;
    background: #ffffff;
  }

  :root[data-theme="dark"] .section.projects,
  :root[data-theme="dark"] .project-assets,
  :root[data-theme="dark"] .project-gallery-section--subtle,
  :root[data-theme="dark"] .contact-hero,
  :root[data-theme="dark"] .privacy-hero {
    background: var(--color-bg-subtle);
  }

  :root[data-theme="dark"] .project-card__face,
  :root[data-theme="dark"] .callout,
  :root[data-theme="dark"] .thesis-book,
  :root[data-theme="dark"] .privacy-block,
  :root[data-theme="dark"] .privacy-table,
  :root[data-theme="dark"] .privacy-definition,
  :root[data-theme="dark"] .project-asset,
  :root[data-theme="dark"] .project-gallery__feature,
  :root[data-theme="dark"] .project-gallery__item,
  :root[data-theme="dark"] .contact-form,
  :root[data-theme="dark"] .education-card,
  :root[data-theme="dark"] .exp-item {
    border-color: var(--color-border);
  }

  :root[data-theme="dark"] .callout {
    background: rgba(255, 255, 255, 0.04);
  }

  :root[data-theme="dark"] .callout__title,
  :root[data-theme="dark"] .callout__text {
    color: inherit;
  }

  :root[data-theme="dark"] .about__image {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  }

  :root[data-theme="dark"] .exp-item--featured {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.04) 7%,
      rgba(255, 255, 255, 0.04) 93%,
      rgba(255, 255, 255, 0) 100%
    );
    box-shadow:
      inset 0 18px 22px -26px rgba(255, 255, 255, 0.22),
      inset 0 -18px 22px -26px rgba(255, 255, 255, 0.18);
  }

  :root[data-theme="dark"] .about__signature {
    opacity: 0.94;
  }

  :root[data-theme="dark"] .business-card__hint {
    border-bottom-color: var(--color-border);
    background: transparent;
  }

  :root[data-theme="dark"] .field__input {
    color: var(--color-text);
    border-bottom-color: var(--color-border);
  }

  :root[data-theme="dark"] .field__input::placeholder {
    color: var(--color-text-faint);
  }

  :root[data-theme="dark"] .privacy-content a,
  :root[data-theme="dark"] .contact-form__privacy a,
  :root[data-theme="dark"] .story__link,
  :root[data-theme="dark"] .exp-item__link {
    color: var(--color-heading);
  }

  :root[data-theme="dark"] .project-assets__summary,
  :root[data-theme="dark"] .project-gallery__summary,
  :root[data-theme="dark"] .experience__summary,
  :root[data-theme="dark"] .education__summary,
  :root[data-theme="dark"] .testimonials__summary,
  :root[data-theme="dark"] .projects__summary {
    color: var(--color-text-muted);
  }

  :root[data-theme="dark"] .project-asset,
  :root[data-theme="dark"] .contact-page,
  :root[data-theme="dark"] .privacy-page {
    background: transparent;
  }

  :root[data-theme="dark"] .project-asset__meta,
  :root[data-theme="dark"] .project-card__hint,
  :root[data-theme="dark"] .project-card__kicker,
  :root[data-theme="dark"] .project-card__year,
  :root[data-theme="dark"] .project-meta__label,
  :root[data-theme="dark"] .facts__title {
    color: var(--color-text-muted);
  }

  :root[data-theme="dark"] .logo-track img {
    filter: grayscale(1) invert(1) brightness(1.16) contrast(0.95);
    opacity: 0.8;
  }

  :root[data-theme="dark"] .education-roundedimg:not(.education-roundedimg--preserve),
  :root[data-theme="dark"] .exp-item__logo:not([data-theme-src-dark]),
  :root[data-theme="dark"] .testimonial__company-logo:not([data-theme-src-dark]) {
    filter: brightness(0) invert(1);
  }

  :root[data-theme="dark"] .yt-lite__play {
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  }

  :root[data-theme="dark"] .hei-exploded-band__image {
    opacity: 0.88;
  }

  :root[data-theme="dark"] .page--project .media--plain img:not([data-theme-src-dark]) {
    filter: invert(1) brightness(0.98) contrast(0.92);
  }

  :root[data-theme="dark"] .project-assets__copy,
  :root[data-theme="dark"] .project-gallery__head,
  :root[data-theme="dark"] .privacy-content,
  :root[data-theme="dark"] .story__content {
    color: var(--color-text);
  }
}


@layer components {
  .hero {
    --hero-portrait-position: center 52%;
    position: relative;
    isolation: isolate;
    overflow: clip;
    min-height: calc(100svh - var(--header-h));
    padding-top: 0;
    color: #fff;
    background: #6a6d77;
  }

  .hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
  }

  .hero__bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(117, 117, 117, 0.043);
  }

  .hero__bg::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    height: 5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.14) 100%);
  }

  .hero__bgItem {
    position: absolute;
    top: 7%;
    right: -12%;
    width: min(72rem, 84vw);
    height: auto;
    max-width: none;
    opacity: 0.11;
    filter: invert(1) brightness(0.82);
    mix-blend-mode: screen;
    transform: rotate(-1.5deg);
    -webkit-mask-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 0, 0, 0.34) 18%,
      #000 42%,
      rgba(0, 0, 0, 0.58) 72%,
      transparent 100%
    );
    mask-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 0, 0, 0.34) 18%,
      #000 42%,
      rgba(0, 0, 0, 0.58) 72%,
      transparent 100%
    );
  }

  .hero__grid {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(20rem, 0.58fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    width: min(var(--container-max), calc(100% - (2 * var(--gutter))));
    min-height: calc(100svh - var(--header-h));
    margin-inline: auto;
    padding-block: clamp(1.25rem, 4vh, var(--space-8)) 0;
  }

  .hero__content {
    position: relative;
    z-index: 4;
    max-width: 45rem;
  }

  .hero__kicker {
    width: fit-content;
    margin: 0 0 var(--space-4);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .hero__kicker::before {
    content: "";
    display: inline-block;
    width: 0.38rem;
    aspect-ratio: 1;
    margin-right: var(--space-2);
    border-radius: 50%;
    background: currentColor;
    vertical-align: 0.1em;
  }

  .hero__title {
    max-width: 10ch;
    margin: 0;
    color: #fff;
    font-family: var(--ff-heading);
    font-size: 5rem;
    font-weight: var(--fw-semibold);
    line-height: 0.96;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .hero__text {
    max-width: 41rem;
    margin: var(--space-5) 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: var(--lh-normal);
  }

  .hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    margin-top: var(--space-6);
  }

  .hero .button-redirect {
    color: #111;
    border-color: #fff;
    background: #fff;
  }

  .hero .button-redirect:hover,
  .hero .button-redirect:focus-visible {
    transform: translateY(-1px);
  }

  .hero__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 2.35rem;
    color: #fff;
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    text-decoration: none;
  }

  .hero__link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0.35rem;
    left: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0.72);
    transform-origin: left;
    transition: transform var(--duration-fast) var(--ease-standard);
  }

  .hero__link:hover::after,
  .hero__link:focus-visible::after {
    transform: scaleX(1);
  }

  .hero__signals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.8rem, 2vw, 1.25rem);
    max-width: 44rem;
    margin: var(--space-8) 0 0;
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .hero__signals div {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
  }

  .hero__signals dt {
    color: rgba(255, 255, 255, 0.48);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    letter-spacing: 0;
  }

  .hero__signals dd {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--ff-heading);
    font-size: 0.98rem;
    font-weight: var(--fw-medium);
    line-height: var(--lh-snug);
  }

  .hero__art {
    position: relative;
    z-index: 2;
    align-self: end;
    justify-self: stretch;
    min-height: 33rem;
    pointer-events: none;
  }

  .hero__artMain {
    position: absolute;
    right: -3%;
    bottom: 0;
    z-index: 1;
    width: min(47rem, 72vw);
    height: calc(100% + 2rem);
    max-width: none;
    object-fit: cover;
    object-position: var(--hero-portrait-position);
    
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 100%);
    user-select: none;
  }

  .hero__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.05rem;
    height: 3.05rem;
    color: rgba(255, 255, 255, 0.86);
    border: 0;
    border-radius: 0;
    background: transparent;
    text-decoration: none;
    filter: drop-shadow(0 0.18rem 0.45rem rgba(0, 0, 0, 0.22));
    transition:
      color var(--duration-fast) var(--ease-standard),
      filter var(--duration-fast) var(--ease-standard),
      opacity var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .hero__social a:hover,
  .hero__social a:focus-visible {
    color: #fff;
    filter: drop-shadow(0 0.24rem 0.65rem rgba(0, 0, 0, 0.32));
    transform: translateY(-2px);
  }

  .hero__social a:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.82);
    outline-offset: 0.35rem;
  }

  .hero__icon {
    display: block;
    width: 1.55rem;
    height: 1.55rem;
  }

  .hero__social--row {
    display: flex;
    gap: var(--space-1);
    margin-top: var(--space-6);
  }

  .hero__social--rail {
    display: none;
  }

  @media (min-width: 64rem) {
    .hero__social--row {
      display: none;
    }

    .hero__social--rail {
      position: absolute;
      top: calc(50% - 1.35rem);
      right: clamp(0.75rem, 2vw, 2rem);
      z-index: 5;
      display: grid;
      gap: var(--space-2);
      transform: translateY(-50%);
    }
  }

  @media (max-width: 1180px) {
    .hero__title {
      font-size: 4.15rem;
    }

    .hero__artMain {
      right: -10%;
    }
  }

  @media (max-width: 900px) {
    .hero {
      min-height: calc(100svh - var(--header-h));
      padding-top: 0;
    }

    .hero__bg::before {
      background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.36) 100%);
    }

    .hero__bg::after {
      height: 4rem;
      background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    }

    .hero__bgItem {
      top: 36%;
      right: -24rem;
      width: 48rem;
      opacity: 0.055;
    }

    .hero__grid {
      grid-template-columns: 1fr;
      grid-template-areas:
        "title"
        "text"
        "cta"
        "portrait";
      justify-items: center;
      align-items: start;
      min-height: calc(100svh - var(--header-h));
      gap: 0;
      padding-block: var(--space-7) 0;
      text-align: center;
    }

    .hero__content {
      display: contents;
    }

    .hero__title,
    .hero__text,
    .hero__cta,
    .hero__signals,
    .hero__social--row {
      position: relative;
      z-index: 4;
    }

    .hero__title {
      grid-area: title;
      max-width: 11ch;
      font-size: 3.35rem;
      margin-inline: auto;
    }

    .hero__text {
      grid-area: text;
      max-width: 36rem;
      margin-top: var(--space-4);
      margin-inline: auto;
      color: rgba(255, 255, 255, 0.82);
    }

    .hero__cta {
      grid-area: cta;
      justify-content: center;
      margin-top: var(--space-5);
    }

    .hero__social--row {
      display: none;
    }

    .hero__signals {
      display: none;
    }

    .hero__art {
      grid-area: portrait;
      position: relative;
      inset: auto;
      z-index: 2;
      justify-self: center;
      width: min(26rem, 96%);
      min-height: 0;
      aspect-ratio: 1 / 0.88;
      margin: var(--space-5) 0 0;
      overflow: visible;
      opacity: 0.96;
    }

    .hero__artMain {
      right: -5%;
      bottom: -0.2rem;
      width: 110%;
      height: 115%;
      object-position: center 62%;
      -webkit-mask-image: linear-gradient(0deg, #000 0%, #000 88%, transparent 100%);
      mask-image: linear-gradient(0deg, #000 0%, #000 88%, transparent 100%);
    }
  }

  @media (max-width: 700px) {
    .hero {
      min-height: auto;
    }

    .hero__grid {
      justify-items: center;
      min-height: auto;
      padding-block: clamp(2.25rem, 6svh, 3.5rem) 0;
      text-align: center;
    }

    .hero__kicker {
      max-width: 20rem;
      font-size: 0.72rem;
    }

    .hero__title {
      max-width: 11ch;
      font-size: 2.65rem;
    }

    .hero__text {
      max-width: 22rem;
      margin-top: var(--space-3);
      font-size: 0.88rem;
      line-height: 1.48;
    }

    .hero__cta {
      justify-content: center;
      width: 100%;
      margin-top: var(--space-4);
    }

    .hero__art {
      width: min(20.5rem, 94%);
      aspect-ratio: 1 / 0.84;
      margin-top: var(--space-3);
      margin-bottom: 0;
    }
  }

  @media (max-width: 420px) {
    .hero__title {
      font-size: 2.28rem;
    }

    .hero__text {
      max-width: 19.5rem;
      font-size: 0.84rem;
    }

    .hero__cta {
      align-items: center;
      gap: var(--space-3);
    }

    .hero__art {
      width: min(18.5rem, 94%);
      aspect-ratio: 1 / 0.86;
      margin-top: var(--space-3);
    }

    .hero__artMain {
      bottom: -0.16rem;
      height: 112%;
      object-position: center 60%;
    }
  }
}

/* ===================== ABOUT SECTION (FULL CSS) ===================== */
@layer components {
  .section.about {
    background: var(--color-bg);
  }

  .about__grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: clamp(30px, 4vw, 64px);
    align-items: center;
  }

  .about__grid > picture {
    display: block;
    width: 100%;
  }

  .about__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
  }

  .about__content {
    max-width: 75ch;
  }

  .about__text {
    margin: 0 0 2px;
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
    color: var(--color-text);
  }

  .about__text a {
    color: var(--color-heading);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
  }

  @media (max-width: 820px) {
    .about__grid {
      grid-template-columns: 1fr;
      text-align: left;
    }

    .about__image {
      max-width: 660px;
    }
  }

  .about__signature {
    display: block;
    width: 80%;
    height: auto;
    margin: 20px 0 0px;
    object-fit: cover;
  }

  .about_title{
    font-size: var(--fs-h2);
    font-weight: var(--fw-medium);
  }
}

/* ===================== EDUCATION SECTION ===================== */
@layer components {
  .section.education {
    background: var(--color-bg);
    color: var(--color-text);
  }

  .education__grid {
    display: grid;
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }

  .education__intro {
    max-width: 74ch;
  }

  .education__title {
    margin-bottom: var(--space-5);
    font-size: var(--fs-h2);
    font-weight: var(--fw-medium);
    text-align: left;
  }

  .education__summary {
    max-width: 68ch;
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
  }

  .education__list {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: clamp(1.9rem, 5vw, 4.25rem);
    align-items: start;
  }

  .education .education-card {
    display: grid;
    grid-template-columns: var(--edu-logo-size, clamp(6rem, 8vw, 7.5rem)) minmax(0, 1fr);
    grid-template-areas:
      "logo copy"
      ". details";
    gap: clamp(0.95rem, 2vw, 1.45rem);
    align-items: start;
    min-width: 0;
    position: relative;
    z-index: 1;
  }

  .education-card--current {
    --edu-logo-size: clamp(5.85rem, 7.6vw, 7.15rem);
    --edu-title-size: clamp(1.52rem, 1.9vw, 1.85rem);
  }

  .education-card--foundation {
    --edu-logo-size: clamp(5.65rem, 7.2vw, 6.9rem);
    --edu-title-size: clamp(1.48rem, 1.8vw, 1.78rem);
  }

  .education-card__logo-mark {
    grid-area: logo;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    position: relative;
    width: var(--edu-logo-size, clamp(6rem, 8vw, 7.5rem));
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 50%;
    background: var(--color-bg);
    transition: transform var(--duration-base) var(--ease-standard);
  }

  .education .education-card:hover .education-card__logo-mark {
    transform: translateY(-0.24rem) scale(1.035);
  }

  .education-card__logo-mark picture {
    display: block;
    width: 100%;
    height: 100%;
  }

  .education-roundedimg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
  }

  .education-card-right {
    grid-area: copy;
    min-width: 0;
  }

  .education-card__stage {
    margin: 0 0 var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .education-card-right h3 {
    max-width: 20ch;
    margin: 0;
    color: var(--color-heading);
    font-family: var(--ff-heading);
    font-size: var(--edu-title-size, clamp(1.48rem, 2vw, 1.95rem));
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-snug);
    line-height: var(--lh-tight);
    white-space: nowrap;
  }

  .education-card--foundation h3 {
    max-width: 20ch;
    font-size: var(--edu-title-size, clamp(1.48rem, 2vw, 1.95rem));
    letter-spacing: var(--ls-snug);
    line-height: var(--lh-tight);
  }

  .education-card-right .logo-band__label {
    display: block;
    max-width: 100%;
    margin-top: var(--space-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: var(--ls-wider);
  }

  .education-text-duration {
    margin: 0 0 var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .education-text-desc {
    max-width: 48ch;
    margin: var(--space-4) 0 0;
    color: var(--color-text);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
  }

  .education-card--foundation .education-text-desc {
    max-width: 42ch;
    color: var(--color-text);
    font-size: var(--fs-body);
  }

  .education-text-bullets {
    grid-area: details;
    margin-top: var(--space-1);
  }

  .education-text-bullets .edu-points {
    display: grid;
    gap: 0.38rem;
    margin: 0;
    padding: 0;
    color: var(--color-text-muted);
    font-size: clamp(0.61rem, 0.58rem + 0.12vw, 0.69rem);
    line-height: var(--lh-snug);
    list-style: none;
  }

  .education-text-bullets .edu-points li {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.46rem;
    align-items: baseline;
    min-width: 0;
    white-space: nowrap;
  }

  .education-text-bullets .edu-k {
    color: var(--color-heading);
    font-weight: var(--fw-semibold);
  }

  .education-text-bullets .edu-k::after {
    content: ":";
  }

  .education-text-bullets .edu-v {
    display: block;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  @media (max-width: 860px) {
    .education__list {
      gap: clamp(2.5rem, 8vw, 4rem);
    }

    .education-card--current {
      --edu-logo-size: clamp(5.45rem, 16vw, 6.65rem);
      --edu-title-size: clamp(1.42rem, 3.8vw, 1.85rem);
    }

    .education-card--foundation {
      --edu-logo-size: clamp(5.3rem, 15vw, 6.45rem);
      --edu-title-size: clamp(1.4rem, 3.6vw, 1.8rem);
    }

    .education-card__logo-mark {
      width: var(--edu-logo-size);
    }

    .education-card-right h3 {
      max-width: 22ch;
    }
  }

  @media (max-width: 700px) {
    .education__list {
      grid-template-columns: 1fr;
      gap: 1rem;
    }

    .education .education-card {
      grid-column: auto;
      grid-template-columns: 1fr;
      grid-template-areas:
        "logo"
        "stage"
        "date"
        "title"
        "program"
        "desc"
        "details";
      gap: 0.18rem;
      justify-items: center;
      padding: 1.25rem 1rem;
      background: var(--color-bg-subtle);
      border-radius: var(--radius-sm);
      text-align: center;
    }

    .education-card--current {
      --edu-logo-size: 4.7rem;
      --edu-title-size: 1.52rem;
    }

    .education-card--foundation {
      --edu-logo-size: 4.5rem;
      --edu-title-size: 1.42rem;
    }

    .education-card__logo-mark {
      width: var(--edu-logo-size);
      align-self: center;
      justify-self: center;
      margin-bottom: var(--space-3);
    }

    .education-card-right {
      display: contents;
    }

    .education-card__stage {
      grid-area: stage;
      margin: 0;
      align-self: center;
      color: var(--color-heading);
      font-size: 0.72rem;
      letter-spacing: 0;
      text-transform: none;
    }

    .education-text-duration {
      grid-area: date;
      margin: 0;
      align-self: center;
      font-size: 0.68rem;
      letter-spacing: 0;
      text-transform: none;
    }

    .education-card-right h3 {
      grid-area: title;
      justify-self: center;
      max-width: 18rem;
      margin-top: var(--space-3);
      font-size: var(--edu-title-size);
      letter-spacing: 0;
      line-height: 1.12;
      text-align: center;
      overflow-wrap: break-word;
      white-space: normal;
    }

    .education-card-right .logo-band__label {
      grid-area: program;
      justify-self: center;
      max-width: min(100%, 20rem);
      margin-top: var(--space-1);
      overflow: visible;
      color: var(--color-text-muted);
      font-size: 0.76rem;
      letter-spacing: 0;
      line-height: var(--lh-snug);
      text-align: center;
      text-overflow: clip;
      text-transform: none;
      white-space: normal;
    }

    .education-text-desc {
      grid-area: desc;
      justify-self: center;
      max-width: 30ch;
      margin-top: var(--space-3);
      font-size: 0.95rem;
      line-height: var(--lh-normal);
      text-align: center;
    }

    .education-text-bullets {
      grid-area: details;
      justify-self: center;
      width: min(100%, 23rem);
      margin-top: 0.85rem;
    }

    .education-text-bullets .edu-points {
      justify-items: center;
      gap: 0.64rem;
      font-size: 0.82rem;
      line-height: 1.35;
    }

    .education-text-bullets .edu-points li {
      grid-template-columns: 1fr;
      gap: 0.14rem;
      justify-items: center;
      align-items: center;
      text-align: center;
      white-space: normal;
    }

    .education-text-bullets .edu-k {
      font-size: 0.76rem;
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
    }

    .education-text-bullets .edu-k::after {
      content: "";
    }

    .education-text-bullets .edu-v {
      max-width: 30ch;
      overflow: visible;
      text-align: center;
      text-overflow: clip;
      white-space: normal;
    }
  }

  @media (max-width: 560px) {
    .education__grid {
      gap: 2.1rem;
    }

    .education__title {
      text-align: center;
    }

    .education__summary {      
      text-align: center;
    }

    .education-card--current {
      --edu-logo-size: 5.9rem;
      --edu-title-size: 1.34rem;
    }

    .education-card--foundation {
      --edu-logo-size: 5.25rem;
      --edu-title-size: 1.28rem;
    }

    .education .education-card {
      padding: 1.05rem 0.9rem;
    }

    .education-card-right .logo-band__label {
      font-size: 0.72rem;
    }

    .education-card__stage,
    .education-text-duration {
      font-size: 0.66rem;
    }

    .education-text-bullets .edu-points {
      font-size: 0.82rem;
    }
  }

  @media (max-width: 380px) {
    .education-card--current {
      --edu-logo-size: 5.9rem;
      --edu-title-size: 1.16rem;
    }

    .education-card--foundation {
      --edu-logo-size: 5.55rem;
      --edu-title-size: 1.14rem;
    }

    .education .education-card {
      gap: 0.16rem;
      padding: 0.95rem 0.8rem;
    }

    .education-text-bullets .edu-points {
      font-size: 0.76rem;
    }

    .education-text-bullets .edu-points li {
      grid-template-columns: 1fr;
      gap: 0.18rem;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .education-card__logo-mark {
      transition: none;
    }

    .education .education-card:hover .education-card__logo-mark {
      transform: none;
    }
  }
}

/* ===================== EXPERIENCE SECTION ===================== */
@layer components {
  .experience {
    background: var(--color-bg-subtle);
    color: var(--color-text);
  }

  .experience__grid {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }

  .experience__intro {
    max-width: 68ch;
  }

  .experience__title {
    margin-bottom: var(--space-5);
    font-size: var(--fs-h2);
    font-weight: var(--fw-medium);
  }

  .experience__summary {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
  }

  .experience__list {
    display: grid;
  }

  .exp-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(14rem, 30vw, 25rem);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
    padding-block: clamp(1.6rem, 3.5vw, 2.35rem);
    border-top: 1px solid var(--color-border);
  }

  .exp-item:last-child {
    border-bottom: 1px solid var(--color-border);
  }

  .exp-item--featured {
    background: rgba(255, 255, 255, 0.28);
    box-shadow:
      inset 0 18px 22px -26px rgba(0, 0, 0, 0.32),
      inset 0 -18px 22px -26px rgba(0, 0, 0, 0.3);
  }

  .exp-item__content {
    display: grid;
    grid-template-columns: clamp(7.4rem, 12vw, 10.5rem) minmax(0, 1fr);
    gap: clamp(1rem, 2.6vw, 1.75rem);
    align-items: center;
    min-width: 0;
  }

  .exp-item__logo-mark {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: clamp(6.8rem, 10vw, 8.3rem);
    transition: transform var(--duration-base) var(--ease-standard);
  }

  .exp-item:hover .exp-item__logo-mark {
    transform: translateY(-0.18rem) scale(1.035);
  }

  .exp-item__logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  .exp-item__copy {
    min-width: 0;
  }

  .exp-date {
    margin: 0 0 var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .exp-item__title {
    display: grid;
    gap: 0.12rem;
    margin: 0;
    font-family: var(--ff-heading);
    line-height: var(--lh-snug);
  }

  .exp-item__role {
    color: var(--color-heading);
    font-size: var(--fs-lead);
    font-weight: var(--fw-semibold);
  }

  .exp-item__company {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
  }

  .exp-item__text {
    max-width: 58ch;
    margin: var(--space-3) 0 0;
    color: var(--color-text);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
  }

  .exp-item__link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: var(--space-3);
    padding-bottom: 0.18rem;
    color: var(--color-heading);
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    border-bottom: 1px solid currentColor;
    text-decoration: none;
  }

  .exp-item__link::after {
    content: "";
    width: 1.45rem;
    height: 1px;
    margin-left: var(--space-2);
    background: currentColor;
    opacity: 0.7;
    transition:
      opacity var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .exp-item__link:hover::after,
  .exp-item__link:focus-visible::after {
    opacity: 0.85;
    transform: translateX(0.2rem);
  }

  .exp-item__link:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 4px;
  }

  .exp-item__media {
    align-self: stretch;
    margin: 0;
    min-width: 0;
    overflow: hidden;
  }

  .exp-item__media picture {
    display: block;
    height: 100%;
  }

  .exp-item__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: clamp(9rem, 14vw, 12rem);
    object-fit: cover;
    filter: grayscale(0.12) contrast(1.02);
    transition: transform 650ms var(--ease-standard);
  }

  .exp-item:hover .exp-item__media img {
    transform: scale(1.045);
  }

  @media (max-width: 1050px) {
    .experience__intro {
      text-align: left;
    }

    .experience__title {
      text-align: center;
    }
  }

  @media (max-width: 760px) {
    .experience__grid {
      gap: var(--space-6);
    }

    .exp-item {
      grid-template-columns: 1fr;
      gap: var(--space-4);
      padding-block: var(--space-6);
    }

    .experience__summary {
      text-align: center;
    }

    .exp-item__content {
      grid-template-columns: clamp(5.4rem, 24vw, 6.25rem) minmax(0, 1fr);
      gap: var(--space-3);
    }

    .exp-item__logo-mark {
      width: clamp(5rem, 22vw, 5.8rem);
    }

    .exp-date {
      margin-bottom: var(--space-1);
    }

    .exp-item__text {
      margin-top: var(--space-2);
    }

    .exp-item__link {
      margin-top: var(--space-3);
    }

    .exp-item__media {
      display: none;
    }
  }

  @media (max-width: 390px) {
    .exp-item__content {
      grid-template-columns: clamp(4.9rem, 23vw, 5.5rem) minmax(0, 1fr);
      gap: var(--space-2);
    }

    .exp-item__logo-mark {
      width: clamp(4.5rem, 21vw, 5rem);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .exp-item__logo-mark,
    .exp-item__media img {
      transition: none;
    }

    .exp-item:hover .exp-item__logo-mark,
    .exp-item:hover .exp-item__media img {
      transform: none;
    }
  }
}

/* ===================== FRAMEWORK SECTION (FULL CSS) ===================== */
@layer components {
.logo-band{
  display: grid;
  grid-template-columns: clamp(220px, 28vw, 380px) 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 16px 0;
}

.logo-band__label{
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  opacity: 0.75;
  line-height: 1.35;
}

.logo-marquee{
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;      
  padding: 16px 0;
}

.logo-marquee{
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0%,
    #000 10%,
    #000 90%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg,
    transparent 0%,
    #000 10%,
    #000 90%,
    transparent 100%
  );
}

/* === Fallback edge fade (overlay gradients) ===
   If your background is NOT white, change --fade-bg below.
*/
:root{
  --fade-bg: 255,255,255;
}

.logo-marquee::before,
.logo-marquee::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width: 80px;
  pointer-events:none;
  z-index: 2;

  background: linear-gradient(to right,
    rgba(var(--fade-bg), 1),
    rgba(var(--fade-bg), 0)
  );

  opacity: 0; 
}

.logo-marquee::after{
  right:0;
  left:auto;

  background: linear-gradient(to left,
    rgba(var(--fade-bg), 1),
    rgba(var(--fade-bg), 0)
  );
}

@supports not ((mask-image: linear-gradient(#000,#000)) or (-webkit-mask-image: linear-gradient(#000,#000))){
  .logo-marquee::before,
  .logo-marquee::after{
    opacity: 1;
  }
}


.logo-track{
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;

  
  gap: clamp(2.5rem, 6vw, 7.5rem);

  
  animation: marquee 22s linear infinite;
}


.logo-track img{
  height: 44px;         
  width: auto;
  display: block;
  opacity: 0.9;

  filter: grayscale(1);
}

.logo-band__label{
  text-align: left;
}

@keyframes marquee{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce){
  .logo-track{ animation: none; }
}

@media (max-width: 700px){
  .logo-band{
    grid-template-columns: 1fr;
    gap: 0.75rem;
    grid-template-columns: 1fr; 
    justify-items: center;        
  }

  .logo-band__label{
    text-align: center;
    max-width: 55ch;              
  }
}
}

/* ===================== TESTIMONIALS SECTION ===================== */
@layer components {
  .section.testimonials {
    background: var(--color-bg-subtle);
  }

  .testimonials__grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: clamp(30px, 4vw, 64px);
    align-items: start;
  }

  .testimonials__intro {
    border-left: 2px solid var(--color-border);
    padding-left: var(--space-6);
  }

  .testimonials__title {
    margin-bottom: var(--space-5);
    font-size: var(--fs-h2);
    font-weight: var(--fw-medium);
  }

  .testimonials__summary {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
  }

  .testimonials__carousel {
    overflow: hidden;
    width: 100%;
    min-width: 0;
  }

  .testimonials__track {
    display: flex;
    align-items: stretch;
    transition: transform var(--duration-base) var(--ease-standard);
    will-change: transform;
  }

  .testimonial {
    flex: 0 0 100%;
    min-width: 0;
    min-height: clamp(10rem, 10vw, 10rem);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2.25rem) 0;
    background: transparent;
  }

  .testimonial:not(.is-active) {
    pointer-events: none;
  }

  .testimonial blockquote {
    flex: 1 1 auto;
    margin: 0 0 var(--space-3);
  }

  .testimonial__text {
    max-width: 82ch;
    margin: 0;
    color: var(--color-text);
    font-size: var(--fs-body);
    font-weight: var(--fw-medium);
    line-height: var(--lh-relaxed);
  }

  .testimonial__text::before {
    content: open-quote;
    margin-right: 0.08em;
    color: var(--color-heading);
    font-size: 1.55em;
    line-height: 0;
    vertical-align: -0.2em;
  }

  .testimonial__text::after {
    content: close-quote;
    margin-left: 0.06em;
    color: var(--color-heading);
    font-size: 1.55em;
    line-height: 0;
    vertical-align: -0.32em;
  }

  .testimonial__footer {
    display: grid;
    grid-template-columns: auto minmax(21rem, 24rem) minmax(0, 1fr) auto;
    grid-template-areas: "logo person . controls";
    align-items: center;
    column-gap: clamp(0.85rem, 2vw, 1.35rem);
    margin-top: 0;
    padding-top: var(--space-3);
    border-top: 0;
  }

  .testimonial__person {
    grid-area: person;
    display: grid;
    gap: var(--space-1);
    min-width: 0;
  }

  .testimonial__name-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
  }

  .testimonial__author {
    display: block;
    color: var(--color-heading);
    font-family: var(--ff-heading);
    font-size: var(--fs-lead);
    font-style: normal;
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
  }

  .testimonial__linkedin {
    display: inline-grid;
    place-items: center;
    width: 17px;
    aspect-ratio: 1;
    color: var(--color-heading);
    opacity: 0.68;
  }

  .testimonial__linkedin svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
  }

  .testimonial__subline {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    flex-wrap: nowrap;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-snug);
    overflow-wrap: normal;
    white-space: nowrap;
  }

  .testimonial__role {
    color: inherit;
  }

  .testimonial__company-name {
    color: var(--color-text);
    font-weight: var(--fw-medium);
  }

  .testimonial__company-mark {
    grid-area: logo;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    inline-size: clamp(6.75rem, 8vw, 7.75rem);
    block-size: clamp(2rem, 2.35vw, 2.25rem);
    padding-right: clamp(0.95rem, 2.8vw, 1.25rem);
    border-right: 1px solid var(--color-border);
    min-width: 0;
  }

  .testimonial__company-logo {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: contain;
    color: var(--color-heading);
    opacity: 0.9;
  }

  svg.testimonial__company-logo {
    fill: currentColor;
  }


  .testimonial__controls {
    grid-area: controls;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    flex: 0 0 auto;
    justify-self: end;
  }

  .testimonial__arrow {
    display: grid;
    place-items: center;
    width: 32px;
    aspect-ratio: 1;
    padding: 0;
    color: var(--color-heading);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    transition:
      border-color var(--duration-fast) var(--ease-standard),
      color var(--duration-fast) var(--ease-standard),
      background var(--duration-fast) var(--ease-standard);
  }

  .testimonial__arrow:hover,
  .testimonial__arrow:focus-visible {
    color: var(--color-heading);
    border-color: var(--color-border-strong);
    background: var(--color-bg-subtle);
  }

  .testimonial__arrow:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 2px;
  }

  .testimonial__arrow svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .testimonial__count {
    min-width: 2.25rem;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    text-align: center;
  }

  @media (max-width: 1050px) {
    .testimonials__grid {
      grid-template-columns: 1fr;
    }

    .testimonials__intro {
      border-left: 0;
      padding-left: 0;
      text-align: left;
    }

    .testimonials__title {
      text-align: left;
    }
  }

  @media (max-width: 700px) {
    .testimonials__intro,
    .testimonials__title,
    .testimonials__summary {
      text-align: center;
    }

    .testimonials__summary {
      max-width: 34rem;
      margin-inline: auto;
    }

    .testimonials__grid {
      gap: var(--space-6);
    }

    .testimonial {
      min-height: 0;
      padding: 0 0 var(--space-1);
    }

    .testimonial blockquote {
      flex: 0 1 auto;
      margin: 0 0 var(--space-5);
    }

    .testimonial__text {
      max-width: 34rem;
      margin-inline: auto;
      font-size: 0.95rem;
      line-height: 1.68;
      text-align: center;
    }

    .testimonial__footer {
      grid-template-columns: 1fr;
      grid-template-areas:
        "person"
        "logo"
        "controls";
      row-gap: var(--space-3);
      column-gap: 0;
      align-items: center;
      justify-items: center;
      padding-top: var(--space-4);
      border-top: 1px solid var(--color-border-faint);
    }

    .testimonial__person {
      justify-items: center;
      min-width: 0;
      text-align: center;
    }

    .testimonial__name-row {
      justify-content: center;
      gap: var(--space-2);
    }

    .testimonial__author {
      font-size: 1.04rem;
      text-align: center;
    }

    .testimonial__linkedin {
      width: 18px;
      opacity: 0.82;
    }

    .testimonial__company-mark {
      inline-size: min(10rem, 52vw);
      block-size: clamp(1.65rem, 5.4vw, 1.8rem);
      padding-right: 0;
      border-right: 0;
      justify-content: center;
    }

    .testimonial__controls {
      gap: var(--space-2);
      justify-self: center;
      margin-top: var(--space-1);
    }

    .testimonial__arrow {
      width: 36px;
    }

    .testimonial__count {
      min-width: 2.25rem;
    }

    .testimonial__subline {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.12rem 0.35rem;
      max-width: 20rem;
      text-align: center;
      white-space: normal;
    }
  }

  @media (max-width: 390px) {
    .testimonial__text {
      font-size: 0.9rem;
    }

    .testimonial__company-mark {
      inline-size: min(8.8rem, 50vw);
      block-size: clamp(1.55rem, 5.8vw, 1.65rem);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .testimonials__track {
      transition: none;
    }
  }
}

/* ===================== PROJECTS SECTION ===================== */
@layer components {
  .section.projects {
    background: var(--color-bg-subtle);
    color: var(--color-text);
  }

  .projects__layout {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .projects__head {
    max-width: 70ch;
  }

  .projects__head h2 {
    margin-bottom: var(--space-5);
    font-size: var(--fs-h2);
    font-weight: var(--fw-medium);
  }

  .projects__summary {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
  }

  .projects__filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: calc(var(--space-5) * -1) 0 0;
  }

  .projects__filter {
    position: relative;
    padding: 0 0 0.28rem;
    color: var(--color-text-muted);
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    -webkit-appearance: none;
    appearance: none;
  }

  .projects__filter::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    opacity: 0;
    transform: scaleX(0.65);
    transform-origin: left;
    transition:
      opacity var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .projects__filter:hover,
  .projects__filter:focus-visible,
  .projects__filter.is-active {
    color: var(--color-heading);
  }

  .projects__filter:hover::after,
  .projects__filter:focus-visible::after,
  .projects__filter.is-active::after {
    opacity: 0.75;
    transform: scaleX(1);
  }

  .projects__filter:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 4px;
  }

  .projects__divider {
    display: none;
  }

  .projects__carousel {
    min-width: 0;
  }

  .projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: clamp(0.9rem, 2vw, 1.25rem);
  }

  .project-card-container {
    aspect-ratio: 1;
    min-width: 0;
    perspective: 1200px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .project-card-container.is-hidden {
    display: none;
  }

  .project-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 1;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transition: transform 650ms var(--ease-standard);
  }

  .project-card-container.active .project-card {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
  }

  .project-card__face {
    position: absolute;
    inset: 0;
    display: grid;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: var(--color-bg);
    transform-style: preserve-3d;
    transition:
      opacity 160ms var(--ease-standard),
      visibility 160ms var(--ease-standard);
  }

  .project-card__face--front {
    place-items: end start;
    color: #fff;
    opacity: 1;
    transform: rotateY(0deg);
    visibility: visible;
  }

  .project-card__face--back {
    align-items: stretch;
    color: var(--color-text);
    opacity: 0;
    transform: rotateY(180deg);
    visibility: hidden;
  }

  .project-card-container.active .project-card__face--front {
    opacity: 0;
    visibility: hidden;
  }

  .project-card-container.active .project-card__face--back {
    opacity: 1;
    visibility: visible;
  }

  .project-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .project-card__image {
    transform: scale(1.02);
    transition: transform 650ms var(--ease-standard);
  }

  .project-card-container.active .project-card__image {
    transform: scale(1.07);
  }

  .project-card__shade {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12) 62%),
      rgba(0, 0, 0, 0.2);
  }

  .project-card__front-copy,
  .project-card__back-copy {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    padding: clamp(0.9rem, 1.8vw, 1.2rem);
  }

  .project-card__front-copy {
    width: 100%;
  }

  .project-card__back-copy {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: clamp(0.55rem, 1.1vw, 0.8rem);
    align-content: stretch;
    min-height: 100%;
    overflow: hidden;
  }

  .project-card__back-head {
    display: grid;
    gap: var(--space-1);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
  }

  .project-card__kicker {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
  }

  .project-card__back-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--color-heading);
    font-family: var(--ff-heading);
    font-size: clamp(1rem, 1.55vw, 1.22rem);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .project-card__year {
    margin: 0;
    color: currentColor;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    opacity: 0.78;
  }

  .project-card__title {
    margin: var(--space-1) 0 0;
    color: currentColor;
    font-family: var(--ff-heading);
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
  }

  .project-card__desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-snug);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .project-card__specs {
    display: grid;
    align-content: start;
    gap: 0.3rem;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    padding: 0;
    color: var(--color-text);
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
    list-style: none;
  }

  .project-card__specs li {
    position: relative;
    overflow: hidden;
    padding-left: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .project-card__specs li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 0.32rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--color-heading);
  }

  .project-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .chip {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.55rem;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    line-height: 1;
    white-space: nowrap;
  }

  .project-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: end;
    width: 100%;
    min-height: 2.55rem;
    margin-top: var(--space-1);
    padding: 0.64rem 0.85rem;
    color: var(--color-bg);
    border: 1px solid var(--color-heading);
    border-radius: var(--radius-sm);
    background: var(--color-heading);
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    text-decoration: none;
    cursor: pointer;
    transition:
      color var(--duration-fast) var(--ease-standard),
      border-color var(--duration-fast) var(--ease-standard),
      background var(--duration-fast) var(--ease-standard);
  }

  .project-card__hint {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-4) 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
  }

  .project-card__hint::after {
    content: "";
    width: 1.5rem;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
  }

  .project-card__btn::after {
    content: "";
    width: 1.45rem;
    height: 1px;
    margin-left: var(--space-2);
    background: currentColor;
    opacity: 0.72;
    transition:
      opacity var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .project-card__btn:hover::after,
  .project-card__btn:focus-visible::after {
    opacity: 0.9;
    transform: translateX(0.2rem);
  }

  .project-card__btn:hover,
  .project-card__btn:focus-visible {
    color: var(--color-heading);
    background: transparent;
  }

  .project-card__btn:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 4px;
  }

  .projects__dots {
    display: none;
  }

  @media (min-width: 72rem) {
    .projects__grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  @media (min-width: 701px) {
    .projects__dots {
      display: none !important;
    }
  }

  @media (max-width: 700px) {
    .projects__layout {
      gap: var(--space-6);
    }

    .projects__filters {
      justify-content: center;
      gap: var(--space-2) var(--space-3);
      margin-top: calc(var(--space-3) * -1);
      text-align: center;
    }

    .projects__filter {
      min-height: 2.5rem;
      padding: 0.6rem 0.35rem 0.42rem;
      font-size: var(--fs-xs);
    }

    .projects__summary {      
      text-align: center;
    }


    .projects__carousel {
      position: relative;
      margin-inline: 0;
    }

    .projects__grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-3);
      overflow: visible;
      padding: 0;
    }

    .project-card-container {
      scroll-snap-align: none;
    }

    .project-card {
      aspect-ratio: 1;
      min-height: 0;
      height: auto;
    }

    .projects__dots {
      display: none !important;
    }

    .project-card__front-copy,
    .project-card__back-copy {
      padding: var(--space-3);
    }

    .project-card__back-copy {
      gap: var(--space-1);
      min-height: 100%;
    }

    .project-card__title {
      font-size: clamp(0.9rem, 3.8vw, 1.05rem);
    }

    .project-card__back-head {
      padding-bottom: var(--space-2);
    }

    .project-card__back-title {
      font-size: clamp(0.88rem, 3.5vw, 1rem);
    }

    .project-card__desc {
      display: -webkit-box;
      overflow: hidden;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .project-card__specs {
      display: none;
    }

    .project-card__meta {
      display: none;
    }

    .project-card__year,
    .project-card__kicker,
    .project-card__desc,
    .project-card__btn {
      font-size: var(--fs-xs);
    }

    .project-card__btn {
      min-height: 2.45rem;
      padding: 0.62rem 0.75rem;
    }

    .project-card__hint {
      margin-top: var(--space-2);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .project-card,
    .project-card__image,
    .project-card__btn::after {
      transition: none;
    }
  }
}


/* ===================== CONTACT PAGE ===================== */
@layer components {
  .contact-page {
    background: var(--color-bg);
    color: var(--color-text);
  }

  .contact-hero {
    background: var(--color-bg-subtle);
  }

  .contact-hero__inner {
    display: grid;
    gap: var(--space-4);
    padding-block: clamp(3rem, 7vw, 6rem);
  }

  .contact-hero h1 {
    max-width: 12ch;
    margin: 0;
    color: var(--color-heading);
    font-size: 8rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0;
    line-height: 0.9;
  }

  .contact-page__container {
    width: min(var(--container-max), calc(100% - 2rem));
    margin: 0 auto;
    padding-block: clamp(2.75rem, 6vw, 5rem);
  }

  .contact-form__eyebrow {
    margin: 0;
    color: var(--color-kicker);
    font-family: var(--ff-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .contact-page__grid {
    display: grid;
    grid-template-columns: minmax(18rem, 0.82fr) minmax(24rem, 1fr);
    gap: clamp(2rem, 6vw, 5.5rem);
    align-items: center;
  }

  .contact-page__left,
  .contact-page__right {
    min-width: 0;
  }

  .contact-page__right {
    display: grid;
    align-content: start;
  }

  .business-card__wrap {
    display: grid;
    justify-items: start;
    width: min(100%, 28.5rem);
  }

  .business-card {
    width: 100%;
    display: grid;
    justify-items: start;
    gap: var(--space-3);
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .business-card__scene {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 85 / 55;
    isolation: isolate;
    -webkit-perspective: 1800px;
    perspective: 1800px;
    perspective-origin: 50% 42%;
    transition: transform var(--duration-base) var(--ease-standard);
  }

  .business-card__scene::after {
    content: "";
    position: absolute;
    inset: auto 8% -9%;
    z-index: 0;
    height: 15%;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(15, 17, 21, 0.28) 0%, rgba(15, 17, 21, 0) 72%);
    filter: blur(18px);
    opacity: 0.88;
    transform: scale(0.94);
    transition:
      transform var(--duration-slow) var(--ease-standard),
      opacity var(--duration-slow) var(--ease-standard);
  }

  .business-card__stage {
    display: block;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform var(--duration-slow) cubic-bezier(0.22, 0.8, 0.24, 1);
  }

  .business-card__face {
    position: absolute;
    inset: 0;
    display: block;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
  }

  .business-card__face--front {
    transform: rotateY(0deg) translateZ(0.06px);
  }

  .business-card__face--back {
    transform: rotateY(180deg) translateZ(0.06px);
  }

  .business-card__media {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  @media (hover: hover) and (pointer: fine) {
    .business-card:hover .business-card__scene,
    .business-card:focus-visible .business-card__scene {
      transform: translateY(-0.3rem);
    }

    .business-card:hover .business-card__scene::after,
    .business-card:focus-visible .business-card__scene::after {
      opacity: 1;
      transform: scale(1);
    }

    .business-card:hover .business-card__stage,
    .business-card:focus-visible .business-card__stage {
      transform: rotateY(180deg);
    }
  }

  .business-card:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 6px;
  }

  .business-card.is-flipped .business-card__scene {
    transform: translateY(-0.3rem);
  }

  .business-card.is-flipped .business-card__scene::after {
    opacity: 1;
    transform: scale(1);
  }

  .business-card.is-flipped .business-card__stage {
    transform: rotateY(180deg);
  }

  .business-card__hint {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0 0 0.28rem;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
    transition:
      opacity var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard),
      color var(--duration-fast) var(--ease-standard),
      border-color var(--duration-fast) var(--ease-standard);
  }

  .business-card__hint-text {
    display: inline-flex;
    align-items: center;
  }

  .hint--mobile {
    display: none;
  }

  @media (hover: hover) and (pointer: fine) {
    .business-card:hover .business-card__hint,
    .business-card:focus-visible .business-card__hint {
      color: var(--color-heading);
      border-bottom-color: var(--color-border-strong);
    }

    .business-card:hover .business-card__hint,
    .business-card.has-interacted .business-card__hint {
      opacity: 0;
      transform: translateY(0.25rem);
    }
  }

  .business-card.is-flipped .business-card__hint {
    opacity: 0;
    transform: translateY(0.25rem);
  }

  .contact-form__head {
    display: grid;
    gap: var(--space-2);
    max-width: 42rem;
    margin-bottom: var(--space-6);
    padding-top: var(--space-4);
    
  }

  .contact-form__head h2 {
    margin: 0;
    color: var(--color-heading);
    font-size: var(--fs-h2);
    font-weight: var(--fw-medium);
    letter-spacing: 0;
    line-height: var(--lh-tight);
  }

  .contact-form {
    display: grid;
    gap: var(--space-4);
    width: min(42rem, 100%);
  }

  .contact-form__required-note,
  .contact-form__privacy {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
  }

  .contact-form__privacy {
    max-width: 58ch;
  }

  .contact-form__privacy a {
    color: var(--color-heading);
    font-weight: var(--fw-medium);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }

  .contact-form__trap {
    position: absolute;
    left: -100vw;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .contact-form__row--2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
  }

  .field {
    display: grid;
    gap: var(--space-2);
    min-width: 0;
  }

  .field__label {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-1);
    color: var(--color-text);
    font-family: var(--ff-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .field__required {
    color: var(--color-heading);
    font-weight: var(--fw-bold);
  }

  .field__input {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 0;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    line-height: var(--lh-snug);
    transition:
      border-color var(--duration-fast) var(--ease-standard),
      box-shadow var(--duration-fast) var(--ease-standard);
  }

  .field__input::placeholder {
    color: var(--color-text-faint);
  }

  .field__input:focus {
    border-bottom-color: var(--color-border-strong);
    box-shadow: 0 1px 0 var(--color-border-strong);
  }

  .field__input:required:invalid:not(:placeholder-shown) {
    border-bottom-color: var(--color-border-strong);
  }

  .field__textarea {
    min-height: 9.5rem;
    resize: vertical;
    line-height: var(--lh-normal);
  }

  .contact-form__submit {
    justify-self: start;
    min-height: 2.75rem;
    margin-top: var(--space-1);
    padding-inline: var(--space-6);
  }

  @media (max-width: 900px) {
    .contact-hero h1 {
      font-size: 5rem;
    }

    .contact-page__grid {
      grid-template-columns: 1fr;
      gap: var(--space-12);
    }

    .business-card__wrap {
      justify-items: center;
    }

    .business-card__wrap {
      width: min(100%, 30rem);
    }

    .hint--desktop {
      display: none;
    }

    .hint--mobile {
      display: inline;
    }

    .contact-form,
    .contact-form__head {
      width: 100%;
      max-width: none;
    }

    .contact-form__row--2 {
      grid-template-columns: 1fr;
    }

    .field__input {
      font-size: 1rem;
    }
  }

  @media (max-width: 560px) {
    .contact-hero__inner {
      justify-items: center;
      text-align: center;
    }

    .contact-hero h1 {
      font-size: 3.2rem;
      margin-inline: auto;
      text-align: center;
    }

    .contact-page__container {
      width: min(var(--container-max), calc(100% - 1.5rem));
      padding-block: var(--space-12);
    }

    .contact-page__grid {
      gap: var(--space-10);
    }

    .business-card__wrap {
      width: 100%;
    }

    .contact-page__right {
      justify-items: center;
      text-align: center;
    }

    .contact-form__head {
      margin-bottom: var(--space-6);
      justify-items: center;
      text-align: center;
    }

    .contact-form {
      width: min(100%, 32rem);
      margin-inline: auto;
    }

    .field {
      justify-items: center;
      width: 100%;
    }

    .field__label {
      justify-self: center;
      text-align: center;
    }

    .field__input {
      text-align: center;
    }

    .field__textarea {
      text-align: center;
    }

    .contact-form__required-note,
    .contact-form__privacy {
      margin-inline: auto;
      text-align: center;
    }

    .contact-form__submit {
      width: 100%;
      justify-content: center;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .business-card__scene,
    .business-card__scene::after,
    .business-card__stage,
    .business-card__hint,
    .field__input {
      transition: none;
    }
  }
}

/* ===================== PRIVACY PAGE ===================== */
@layer components {
  .privacy-page {
    background: var(--color-bg);
  }

  .privacy-hero {
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
  }

  .privacy-hero__inner {
    display: grid;
    gap: var(--space-4);
    padding-block: clamp(3rem, 7vw, 6rem);
  }

  .privacy-hero h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(3.2rem, 9vw, 8rem);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    line-height: 0.9;
  }

  .privacy-hero__summary {
    max-width: 64ch;
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-lead);
    line-height: var(--lh-normal);
  }

  .privacy-hero__updated {
    margin: var(--space-2) 0 0;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .privacy-notice {
    background: var(--color-bg);
  }

  .privacy-notice__grid {
    display: grid;
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
    padding-block: clamp(3rem, 7vw, 6rem);
  }

  .privacy-toc {
    position: sticky;
    top: calc(var(--header-h) + var(--space-8));
    display: grid;
    gap: var(--space-3);
    padding-left: var(--space-5);
    border-left: 2px solid var(--color-border);
  }

  .privacy-toc__label {
    margin: 0 0 var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .privacy-toc a {
    width: fit-content;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    line-height: var(--lh-snug);
  }

  .privacy-toc a:hover,
  .privacy-content a:hover {
    color: var(--color-heading);
  }

  .privacy-content {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
    max-width: 78ch;
  }

  .privacy-block {
    display: grid;
    gap: var(--space-4);
    padding-top: clamp(1.25rem, 3vw, 2rem);
    border-top: 1px solid var(--color-border);
  }

  .privacy-block--lead {
    padding-top: 0;
    border-top: 0;
  }

  .privacy-block h2 {
    margin: 0;
    color: var(--color-heading);
    font-family: var(--ff-heading);
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-snug);
    line-height: var(--lh-tight);
    text-align: left;
  }

  .privacy-block p {
    max-width: none;
    margin: 0;
    color: var(--color-text);
    font-size: var(--fs-body);
    line-height: var(--lh-relaxed);
  }

  .privacy-content a {
    color: var(--color-heading);
    border-bottom: 1px solid currentColor;
    text-decoration: none;
  }

  .privacy-definition {
    display: grid;
    margin: 0;
    border-top: 1px solid var(--color-border);
  }

  .privacy-definition div {
    display: grid;
    grid-template-columns: minmax(9rem, 0.34fr) minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border);
  }

  .privacy-definition dt {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .privacy-definition dd {
    margin: 0;
    color: var(--color-text);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
  }

  .privacy-list,
  .privacy-rights {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .privacy-list li,
  .privacy-rights li {
    position: relative;
    padding-left: 1.15rem;
    color: var(--color-text);
    font-size: var(--fs-body);
    line-height: var(--lh-relaxed);
  }

  .privacy-list li::before,
  .privacy-rights li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.78em;
    width: 0.35rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--color-heading);
  }

  .privacy-list strong {
    color: var(--color-heading);
    font-weight: var(--fw-semibold);
  }

  .privacy-list--divided {
    gap: 0;
    border-top: 1px solid var(--color-border);
  }

  .privacy-list--divided li {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-4) 0 var(--space-4) 1.15rem;
    border-bottom: 1px solid var(--color-border);
  }

  .privacy-list--divided span {
    color: var(--color-heading);
    font-family: var(--ff-heading);
    font-size: var(--fs-lead);
    font-weight: var(--fw-medium);
    line-height: var(--lh-snug);
  }

  .privacy-list--divided p {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
  }

  .privacy-table {
    display: grid;
    border-top: 1px solid var(--color-border);
  }

  .privacy-table [role="row"] {
    display: grid;
    grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border);
  }

  .privacy-table [role="columnheader"] {
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .privacy-table [role="cell"] {
    color: var(--color-text);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
  }

  .privacy-block--references {
    color: var(--color-text-muted);
  }

  .privacy-block--references p {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
  }

  @media (max-width: 900px) {
    .privacy-notice__grid {
      grid-template-columns: 1fr;
      gap: var(--space-8);
    }

    .privacy-toc {
      position: static;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-2) var(--space-4);
      padding: var(--space-4) 0 0;
      border-top: 1px solid var(--color-border);
      border-left: 0;
    }

    .privacy-toc__label {
      grid-column: 1 / -1;
    }
  }

  @media (max-width: 620px) {
    .privacy-hero h1 {
      font-size: clamp(2.8rem, 16vw, 4.75rem);
    }

    .privacy-notice__grid {
      padding-block: var(--space-12);
    }

    .privacy-toc {
      grid-template-columns: 1fr;
    }

    .privacy-definition div,
    .privacy-table [role="row"] {
      grid-template-columns: 1fr;
      gap: var(--space-2);
    }
  }
}

/* ===================== EXTRAS PAGE ===================== */
@layer components {
  .extras-page {
    background: var(--color-bg);
    color: var(--color-text);
  }

  .extras-hero {
    background: var(--color-bg-subtle);
  }

  .extras-hero__inner {
    display: grid;
    gap: var(--space-4);
    padding-block: clamp(3rem, 7vw, 6rem);
  }

  .extras-hero h1 {
    max-width: 12ch;
    margin: 0;
    color: var(--color-heading);
    font-size: clamp(3.2rem, 9vw, 8rem);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    line-height: 0.9;
  }

  .extras-hero__summary {
    max-width: 62ch;
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-lead);
    line-height: var(--lh-normal);
  }

  .extras-intro {
    padding: clamp(3rem, 7vw, 6rem) 0;
    background: var(--color-bg);
  }

  .extras-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 0.75fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
  }

  .extras-intro__media,
  .extras-moment__media {
    margin: 0;
    overflow: hidden;
    
    background: var(--color-bg-subtle);
  }

  .extras-intro__media {
    aspect-ratio: 4 / 3;
  }

  .extras-intro__media picture,
  .extras-intro__media img,
  .extras-moment__media picture,
  .extras-moment__media img {
    display: block;
    width: 100%;
    height: 100%;
  }

  .extras-intro__media img,
  .extras-moment__media img {
    object-fit: cover;
    transition: transform var(--duration-base) var(--ease-standard);
  }

  .extras-intro__media:hover img,
  .extras-moment:hover .extras-moment__media img {
    transform: scale(1.025);
  }

  .extras-intro__copy {
    display: grid;
    gap: var(--space-4);
  }

  .extras-intro__copy h2,
  .extras-moments__head h2 {
    margin: 0;
    color: var(--color-heading);
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-tight);
    line-height: var(--lh-tight);
  }

  .extras-intro__copy p {
    max-width: 68ch;
    margin: 0;
    color: var(--color-text);
    font-size: var(--fs-body);
    line-height: var(--lh-relaxed);
  }

  .extras-moments {
    padding: clamp(3rem, 7vw, 6rem) 0;
    background: var(--color-bg-subtle);
  }

  .extras-moments__head {
    display: grid;
    gap: var(--space-3);
    max-width: 70ch;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  }

  .extras-moments__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 3vw, 1.35rem);
  }

  .extras-moment {
    display: grid;
    gap: var(--space-4);
    align-content: start;
    min-width: 0;
  }

  .extras-moment--wide {
    grid-column: span 1;
  }

  .extras-moment__media {
    aspect-ratio: 5 / 4;
  }

  .extras-moment--wide .extras-moment__media {
    aspect-ratio: 3 / 2;
  }

  .extras-moment__copy {
    display: grid;
    gap: var(--space-2);
  }

  .extras-moment h3 {
    margin: 0;
    color: var(--color-heading);
    font-family: var(--ff-heading);
    font-size: var(--fs-lead);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
  }

  .extras-moment p {
    max-width: 52ch;
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
  }

  .extras-closing {
    padding: clamp(2.5rem, 6vw, 5rem) 0;
    background: var(--color-bg);
  }

  .extras-closing__inner {
    max-width: 72ch;
  }

  .extras-closing p {
    margin: 0;
    color: var(--color-heading);
    font-family: var(--ff-heading);
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-snug);
    line-height: var(--lh-normal);
  }

  @media (max-width: 900px) {
    .extras-intro__grid {
      grid-template-columns: 1fr;
    }
    .extras-hero__summary {
      text-align: center;
    }

    .extras-intro__media {
      width: calc(100% + var(--space-2));
      margin-inline: calc(var(--space-2) / -2);
    }
  }

  @media (max-width: 700px) {
    .extras-hero__inner {
      padding-block: clamp(2.5rem, 14vw, 4rem);
    }

    .extras-hero h1 {
      font-size: clamp(3rem, 18vw, 4.8rem);
      text-align: center;
    }

    .extras-moments__grid {
      grid-template-columns: 1fr;
      gap: var(--space-8);
    }

    .extras-moment,
    .extras-moments__head,
    .extras-closing__inner {
      text-align: left;
    }

    .extras-moment__media,
    .extras-moment--wide .extras-moment__media {
      aspect-ratio: 4 / 3;
    }
  }
}

/* ===================== EXPERIENCE PAGE SECTIONS (CLEANED + CONSISTENT) ===================== */
@layer components {

  /* Page wrapper */
  .page--experience{
    background: var(--color-bg1);
    color: var(--color-text);
  }
  .page-hero{
    background-attachment: scroll;

    min-height: clamp(260px, 60vh, 320px);
    position: relative;
    display: grid;
    align-items: end;

    background-image: var(--hero-img);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  @media (hover: hover) and (pointer: fine){
    .page-hero{ background-attachment: fixed; }
  }

  .page-hero--video{
    position: relative;
    overflow: hidden;
  }

  .page-hero__bg{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .page-hero__overlay{
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
      -90deg,
      rgba(0,0,0,0.60) 0%,
      rgba(0,0,0,0.35) 35%,
      rgba(0,0,0,0.93) 100%
    );
  }

  .page-hero__inner{
    position: relative;
    z-index: 2;

    padding: clamp(2rem, 5vw, 4rem) var(--gutter);
    color: #ffffff;

    width: min(var(--container-max), 100%);
    margin-inline: auto;
  }

  .page-hero__kicker{
    margin: 0 0 0.5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.9;
    font-size: 1rem;
  }

  .page-hero__title{
    margin: 0;
    font-size: clamp(2rem, 8vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
  }

  .page-hero__sub{
    margin: 0.75rem 0 0;
    max-width: 65ch;
    opacity: 0.9;
  }

  .page-hero__meta{
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .page-hero__meta .tag{
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(6px);
  }

  @media (prefers-reduced-motion: reduce){
    .page-hero{ background-attachment: scroll !important; }
    .page-hero__bg{ transform: none; }
  }

  /* --------------------- DISCLOSURE --------------------- */
  .page-disclosure{
    padding: clamp(1.25rem, 3vw, 2rem) 0 0;
    background: var(--color-bg);
  }

  .page-disclosure__inner{
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: clamp(1rem, 2.5vw, 1.75rem);
    align-items: center;
    padding-block: clamp(1rem, 2.5vw, 1.35rem);
    background: var(--color-bg-subtle);
  }

  .page-disclosure__label{
    margin: 0;
    color: var(--color-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .page-disclosure__text{
    max-width: none;
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
    overflow-wrap: anywhere;
  }

  /* --------------------- STORY SECTIONS --------------------- */
  .story{
    padding: clamp(2.5rem, 5vw, 4rem) 0;
  }

  .story__title{
    font-size: clamp(1.7rem, 2.5vw, 3rem);;
  }

  .story__grid{
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(1rem, 4vw, 3rem);
    align-items: center;
  }

  .story--reverse .story__grid{
    grid-template-columns: 0.9fr 1.1fr;
  }

  .story--reverse .media{ order: 2; }
  .story--reverse .story__content{ order: 1; }

  .story__text{
    margin: 0 0 1rem;
    line-height: var(--lh-normal);
    color: var(--color-text);
    max-width: 95ch;
  }

  .story__bullets{
    margin: 0;
    padding-left: 1.2rem;
    color: var(--color-text);
  }

  .story__bullets li{
    margin: 0.35rem 0;
  }

  .story__link{
    color: var(--color-text);
    text-decoration: underline;
    font-weight: 500;
  }

  .page--experience .story__link{
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 0.15rem;
    padding-bottom: 0.18rem;
    color: var(--color-heading);
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    border-bottom: 1px solid currentColor;
    text-decoration: none;
  }

  .page--experience .story__link::after{
    content: "";
    width: 1.45rem;
    height: 1px;
    margin-left: var(--space-2);
    background: currentColor;
    opacity: 0.7;
    transition:
      opacity var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .page--experience .story__link:hover::after,
  .page--experience .story__link:focus-visible::after{
    opacity: 0.85;
    transform: translateX(0.2rem);
  }

  .page--experience .story__link:focus-visible{
    outline: 2px solid var(--color-border-strong);
    outline-offset: 4px;
  }

  /* Media card */
  .media{
    position: relative;
    isolation: isolate;
    margin: 0;
    overflow: hidden;
    background: var(--color-bg-subtle);
    box-shadow:
      inset 0 0 0 1px rgba(0,0,0,0.08),
      0 16px 36px -30px rgba(0,0,0,0.45);
  }

  .media--16x9{ aspect-ratio: 16 / 9; }
  .media--4x3{ aspect-ratio: 4 / 3; }
  .media--panorama{ aspect-ratio: 4125 / 1262; }

  .media img,
  .media picture,
  .media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .media img {
    transition: transform var(--duration-base) var(--ease-standard);
  }

  .media:hover img {
    transform: scale(1.018);
  }

  .media--logo-cloud {
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  .media--logo-cloud img.media--logo-cloud__icon {
    position: absolute;
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 18px rgba(0,0,0,0.12));
    transform: none;
    transition:
      transform var(--duration-fast) var(--ease-standard),
      filter var(--duration-fast) var(--ease-standard);
  }

  .media--logo-cloud:hover img.media--logo-cloud__icon {
    filter: drop-shadow(0 18px 22px rgba(0,0,0,0.16));
  }

  .media--logo-cloud__icon--rpa {
    top: 10%;
    left: 10%;
    max-width: 29%;
  }

  .media--logo-cloud__icon--cea {
    right: 9%;
    top: 18%;
    max-width: 35%;
  }

  .media--logo-cloud__icon--python {
    left: 18%;
    bottom: 10%;
    max-width: 23%;
  }

  .media--logo-cloud__icon--om {
    right: 20%;
    bottom: 11%;
    max-width: 22%;
  }

  .story--wide-media {
    padding-top: clamp(0.75rem, 2vw, 1.5rem);
  }

  .story__wide-media {
    width: 100vw;
    max-width: none;
    margin-inline: calc(50% - 50vw);
  }

  .media figcaption {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    margin: 0;
    padding: clamp(0.55rem, 1.4vw, 0.8rem);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    line-height: var(--lh-snug);
    background: linear-gradient(
      to top,
      rgba(0,0,0,0.72) 0%,
      rgba(0,0,0,0.4) 58%,
      rgba(0,0,0,0) 100%
    );
    text-shadow: 0 1px 14px rgba(0,0,0,0.55);
  }

  /* Callouts under story content */
  .story__callouts{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .story__icon{
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
  }

  .callout{
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 0.9rem;
  }

  .callout__title{
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #444;
  }

  .callout__text{
    margin: 0;
    color: #666;
    line-height: 1.5;
  }

  /* --------------------- RELATED SECTION --------------------- */
  .related{
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    background: var(--color-bg1);
  }

  .related__head{ margin-bottom: 1.25rem; }

  .related__title{
    margin: 0 0 0.35rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--color-heading);
  }

  .related__lead{
    margin: 0;
    color: var(--color-text);
    max-width: 70ch;
  }

  .card-icon{
    position: absolute;
    left: 18px;
    top: 18px;
    width: 20px;
    height: 20px;
  }

  /* --------------------- RESPONSIVE --------------------- */
  @media (max-width: 900px){
    .story__grid,
    .story--reverse .story__grid{
      grid-template-columns: 1fr;
      gap: 1.35rem;
      align-items: baseline;
    }

    .story .media,
    .story--reverse .media{
      order: 1;
      width: calc(100% + var(--space-2));
      margin-inline: calc(var(--space-2) / -2);
    }

    .story .story__content,
    .story--reverse .story__content{
      order: 2;
    }

    .page-hero{
      min-height: 0;
      height: auto;
      /* give room for content without relying on min-height */
      padding-top: 3.5rem;
      padding-bottom: 1.25rem;
      background-position: center;
    }

    .page-hero__inner{
      padding: 0 var(--gutter);
    }

    .page-hero__overlay{
      background: linear-gradient(
        to top,
        rgba(0,0,0,0.92) 0%,
        rgba(0,0,0,0.65) 55%,
        rgba(0,0,0,0.12) 100%
      );
    }

    .page-hero__kicker{
      font-size: var(--fs-body);
      letter-spacing: 0.1em;
    }

    .page-hero__sub{
      color: rgba(255,255,255,0.92);
    }

    .page-hero__title{
      font-size: clamp(1rem, 6.5vw, 2rem);
    }

    .page-hero__meta{
      justify-content: flex-start;
      gap: 0.45rem;
      margin-top: 0.9rem;
    }

    .page-hero__meta .tag{
      font-size: 0.8rem;
      padding: 0.32rem 0.65rem;
    }

    /* If you want the hero background to “zoom” less on mobile */
    .page-hero{
      background-size: cover;
      background-position: center 15%;
    }
  }

  @media (max-width: 700px){
    .page-disclosure{
      padding-top: var(--space-5);
    }

    .page-disclosure__inner{
      grid-template-columns: 1fr;
      gap: var(--space-2);
      align-items: center;
      justify-items: center;
      padding-block: var(--space-4);
      text-align: center;
    }

    .page-disclosure__text{
      max-width: none;
      margin-inline: auto;
    }

    .story__callouts{ grid-template-columns: 1fr; }
    .journey__step:not(:last-child)::after{ display:none; }

    .media figcaption {
      display: none;
    }

    .story .story__content,
    .story--reverse .story__content {
      text-align: center;
    }

    .story__title,
    .story__text {
      margin-inline: auto;
    }

    .story__bullets {
      width: fit-content;
      margin-inline: auto;
      text-align: left;
    }

    .page--experience .content-bullets ul {
      width: min(100%, 24rem);
      margin: var(--space-2) auto var(--space-5);
      gap: 0.35rem;
      line-height: var(--lh-snug);
    }

    .page--experience .content-bullets ul li {
      padding-bottom: 0.45rem;
      font-size: var(--fs-small);
    }

    .page--experience .content-bullets ul li::after {
      width: 2rem;
      margin-top: 0.45rem;
    }

    .page--experience .story__link {
      margin-inline: auto;
    }

    .related__head{
      text-align: center;
    }

    .related__lead{
      margin-inline: auto;
    }
  }

}

/* ===================== PROJECT DETAIL PAGES ===================== */
@layer components {
  .page--project {
    background: var(--color-bg);
    color: var(--color-text);
  }

  .page--project .story:nth-of-type(even) {
    background: var(--color-bg-subtle);
  }

  .hei-exploded-band {
    padding: clamp(0.75rem, 3vw, 1.5rem) 0;
  }

  .hei-exploded-band__stage {
    position: relative;
    aspect-ratio: 1170 / 586;
    overflow: visible;
  }

  .hei-exploded-band__image {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 50%;
    height: auto;
    max-width: none;
    opacity: 0.78;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(270deg);
    transform-origin: center;
  }

  .project-meta {
    padding: clamp(1.25rem, 3vw, 2rem) 0 0;
    background: var(--color-bg);
  }

  .project-meta__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.46fr);
    gap: clamp(1rem, 3vw, 1.75rem);
    align-items: stretch;
  }

  .facts,
  .project-meta__note {
    display: grid;
    align-content: start;
    gap: var(--space-3);
    padding: clamp(1rem, 2.5vw, 1.35rem);
    background: var(--color-bg-subtle);
  }

  .facts__title,
  .project-meta__label {
    margin: 0;
    color: var(--color-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .facts__list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
  }

  .facts__row {
    display: grid;
    grid-template-columns: minmax(6.5rem, 0.32fr) minmax(0, 1fr);
    gap: clamp(0.75rem, 2vw, 1.25rem);
    align-items: baseline;
  }

  .facts__row dt {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-snug);
  }

  .facts__row dd {
    min-width: 0;
    margin: 0;
    color: var(--color-heading);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    line-height: var(--lh-snug);
  }

  .project-meta__note p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
  }

  .project-meta__note a {
    color: var(--color-heading);
    font-weight: var(--fw-medium);
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }

  .toc {
    display: none;
  }

  .page--project .story__bullets,
  .case__bullets {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--color-text);
    line-height: var(--lh-normal);
  }

  .page--project .story__bullets li,
  .case__bullets li {
    margin: 0.35rem 0;
  }

  .case {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    background: var(--color-bg);
  }

  .case--alt {
    background: var(--color-bg-subtle);
  }

  .case__grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(1rem, 4vw, 3rem);
    align-items: center;
  }

  .case__grid--reverse {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .case__grid--reverse .media {
    order: 2;
  }

  .case__grid--reverse .case__content {
    order: 1;
  }

  .case__title {
    margin: 0 0 var(--space-3);
    color: var(--color-heading);
    font-size: clamp(1.7rem, 2.5vw, 3rem);
    font-weight: var(--fw-medium);
    line-height: var(--lh-tight);
  }

  .case__text {
    max-width: 72ch;
    margin: 0 0 var(--space-3);
    color: var(--color-text);
    line-height: var(--lh-normal);
  }

  .codebox {
    margin-top: var(--space-4);
    overflow: auto;
    background: var(--color-bg-subtle);
  }

  .codebox__head {
    padding: 0.8rem 1rem 0;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
  }

  .codebox pre {
    margin: 0;
    padding: 1rem;
  }

  .results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .result {
    display: grid;
    gap: var(--space-1);
    padding: 0.9rem 0;
  }

  .result__kpi {
    color: var(--color-heading);
    font-family: var(--ff-heading);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1;
  }

  .result__label {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-snug);
  }

  .thesis-feature,
  .pid-section {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
  }

  .thesis-feature {
    background: var(--color-bg);
  }

  .project-meta + .thesis-feature--subtle {
    border-top: 1.65rem solid var(--color-bg);
  }

  .thesis-feature--subtle {
    background: var(--color-bg-subtle);
  }

  .thesis-feature__grid,
  .pid-section__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 0.62fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
  }

  .pid-section__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.66fr);
  }

  .thesis-feature__copy,
  .pid-section__copy {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
  }

  .thesis-feature__title,
  .pid-section__title {
    margin: 0;
    color: var(--color-heading);
    font-size: clamp(1.7rem, 2.5vw, 3rem);
    font-weight: var(--fw-medium);
    line-height: var(--lh-tight);
  }

  .thesis-feature__text,
  .pid-section__text {
    max-width: 68ch;
    margin: 0;
    color: var(--color-text);
    line-height: var(--lh-normal);
  }

  .thesis-feature__points,
  .pid-section__notes {
    display: grid;
    gap: var(--space-2);
    margin: var(--space-2) 0 0;
    padding: 0;
    list-style: none;
  }

  .thesis-feature__points li,
  .pid-section__notes div {
    display: grid;
    gap: 0.16rem;
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
  }

  .thesis-feature__points li {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
  }

  .pid-section__notes dt {
    color: var(--color-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: var(--lh-snug);
    text-transform: uppercase;
  }

  .pid-section__notes dd {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
  }

  .thesis-report {
    display: grid;
    justify-items: center;
    perspective: 3000px;
    perspective-origin: center;
  }

  .thesis-book {
    --thesis-spine-width: 0.94rem;
    --thesis-book-depth: calc(var(--thesis-spine-width) / 2);
    position: relative;
    display: block;
    width: min(100%, 21.4rem);
    aspect-ratio: 210 / 297;
    border-radius: 2px var(--radius-sm) var(--radius-sm) 2px;
    background: linear-gradient(45deg, hsl(0 0% 94%) 0%, hsl(30 18% 98%) 100%);
    box-shadow: 13px 13px 18px 0 rgba(0, 0, 0, 0.18);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform var(--duration-slow) var(--ease-standard);
    will-change: transform;
  }

  .thesis-book::before {
    content: "";
    position: absolute;
    inset: auto 1rem -1rem 0.75rem;
    z-index: -1;
    height: 1.2rem;
    background: rgba(0, 0, 0, 0.16);
    border-radius: var(--radius-pill);
    filter: blur(14px);
  }

  .thesis-book__front,
  .thesis-report__cover,
  .thesis-book__spine {
    display: block;
    position: absolute;
  }

  .thesis-book__front {
    inset: 0;
    z-index: 10;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform-origin: 0% 50%;
    -webkit-transform-origin: 0% 50%;
    transition: transform var(--duration-slow) var(--ease-standard);
    transform: translate3d(0, 0, var(--thesis-book-depth));
  }

  .thesis-report__cover {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 0 3px 3px 0;
    background: var(--color-bg);
    box-shadow: inset 4px 0 10px rgba(0, 0, 0, 0.1);
  }

  .thesis-book__front::after {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    left: -1px;
    width: 1px;
  }

  .thesis-report__cover::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0.28rem;
    bottom: 0;
    width: 3px;
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 1px 0 3px rgba(255, 255, 255, 0.1);
  }

  .thesis-book__pages {
    display: none;
  }

  .thesis-book__spine {
    width: var(--thesis-spine-width);
    left: calc(0px - var(--thesis-book-depth));
    height: 100%;
    overflow: hidden;
    background: hsl(0 0% 92%);
    transform: rotate3d(0, 1, 0, -90deg);
    -webkit-transform: rotate3d(0, 1, 0, -90deg);
  }

  .thesis-book__spine picture,
  .thesis-book__spine img,
  .thesis-report__cover picture,
  .thesis-report__cover img {
    display: block;
    width: 100%;
    height: 100%;
  }

  .thesis-book__spine img {
    object-fit: cover;
    object-position: center;
  }

  .thesis-report__cover img {
    object-fit: cover;
  }

  @media (hover: hover) and (pointer: fine) {
    .thesis-report:hover .thesis-book {
      transform: rotate3d(0, 1, 0, 35deg);
    }
  }

  @media (hover: none), (pointer: coarse) {
    .thesis-report.is-peeked .thesis-book {
      transform: rotate3d(0, 1, 0, 18deg) translate3d(0.18rem, 0, 0);
    }
  }

  .pid-section {
    background: var(--color-bg);
  }

  .pid-card {
    overflow: hidden;
    padding: clamp(0.85rem, 2vw, 1.2rem);

  }

  .pid-card__image {
    display: block;
    width: 100%;
    height: auto;
  }

  .pid-diagram {
    display: block;
    width: 100%;
    height: auto;
    color: var(--color-heading);
  }

  .pid-diagram text {
    fill: currentColor;
    font-family: var(--ff-heading);
    font-size: 20px;
    font-weight: var(--fw-medium);
  }

  .pid-diagram marker path {
    fill: currentColor;
  }

  .pid-diagram__line path,
  .pid-diagram__instrument path {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
  }

  .pid-diagram__equipment rect,
  .pid-diagram__equipment path,
  .pid-diagram__instrument rect,
  .pid-diagram__instrument circle {
    fill: var(--color-bg);
    stroke: currentColor;
    stroke-linejoin: round;
    stroke-width: 4;
  }

  .pid-diagram__dash {
    stroke-dasharray: 8 10;
    opacity: 0.62;
  }

  .project-gallery-section {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    background: var(--color-bg);
  }

  .project-gallery-section--subtle {
    background: var(--color-bg-subtle);
  }

  .project-gallery__head {
    display: grid;
    gap: var(--space-2);
    max-width: 74ch;
    margin-bottom: clamp(1rem, 3vw, 1.6rem);
  }

  .project-gallery__title,
  .project-assets__title {
    margin: 0;
    color: var(--color-heading);
    font-size: clamp(1.7rem, 2.5vw, 3rem);
    font-weight: var(--fw-medium);
    line-height: var(--lh-tight);
  }

  .project-gallery__summary {
    display: none;
  }

  .project-assets__summary {
    max-width: 70ch;
    margin: 0;
    color: var(--color-text-muted);
    line-height: var(--lh-normal);
  }

  .mini-gallery,
  .inline-media {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.55rem, 1.4vw, 0.85rem);
  }

  .project-gallery {
    --gallery-gap: clamp(0.45rem, 1vw, 0.75rem);
    --gallery-motion-duration: 960ms;
    --gallery-row: clamp(5.15rem, 7.2vw, 7.35rem);
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(4, var(--gallery-row));
    grid-auto-rows: var(--gallery-row);
    gap: var(--gallery-gap);
    align-items: stretch;
  }

  .inline-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-gallery__feature,
  .project-gallery__item,
  .gallery__item,
  .inline-media__item {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-width: 0;
    margin: 0;
    background: var(--color-bg);

    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.08),
      0 14px 34px -30px rgba(0, 0, 0, 0.45);
  }

  .project-gallery__feature {
    grid-column: 1 / span 6;
    grid-row: 1 / span 4;
  }

  .project-gallery__thumbs {
    grid-column: 7 / span 6;
    grid-row: 1 / span 4;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: var(--gallery-row);
    gap: var(--gallery-gap);
    min-width: 0;
    min-height: 0;
    align-content: start;
    overflow: hidden;
  }

  .project-gallery--overflow .project-gallery__thumbs {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.15rem;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .project-gallery__item {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    will-change: transform;
    transition:
      box-shadow var(--gallery-motion-duration) var(--ease-standard),
      opacity var(--gallery-motion-duration) var(--ease-standard);
  }

  .project-gallery__item.is-hidden {
    display: none;
  }

  .project-gallery__item:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 4px;
  }

  .project-gallery--count-1 .project-gallery__feature {
    grid-column: 1 / -1;
    grid-row: 1 / span 4;
  }

  .project-gallery--count-1 .project-gallery__thumbs {
    display: none;
  }

  .project-gallery--count-1 .project-gallery__item {
    display: none;
  }

  .project-gallery--interactive .project-gallery__item:not(.is-active) {
    cursor: pointer;
    opacity: 0.92;
  }

  .project-gallery--interactive .project-gallery__item:not(.is-active):hover,
  .project-gallery--interactive .project-gallery__item:not(.is-active):focus-visible {
    opacity: 1;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.14),
      0 18px 42px -34px rgba(0, 0, 0, 0.55);
  }

  .project-gallery__feature picture,
  .project-gallery__item picture,
  .gallery__item picture,
  .mini-gallery picture,
  .inline-media__item picture,
  .project-gallery__feature img,
  .project-gallery__item img,
  .gallery__item img,
  .mini-gallery img,
  .inline-media__item img {
    display: block;
    width: 100%;
    overflow: hidden;
    background: var(--color-bg-subtle);
  }

  .gallery__item picture,
  .mini-gallery picture {
    aspect-ratio: 1 / 1;
  }

  .project-gallery__feature picture,
  .project-gallery__item picture {
    height: 100%;
  }

  .mini-gallery picture {
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.08),
      0 14px 34px -30px rgba(0, 0, 0, 0.45);
  }

  .inline-media__item picture,
  .inline-media__item img {
    aspect-ratio: 16 / 10;
  }

  .project-gallery__feature img,
  .project-gallery__item img,
  .gallery__item img,
  .mini-gallery img,
  .inline-media__item img {
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-base) var(--ease-standard);
  }

  .project-gallery__feature::after,
  .project-gallery__item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(
        to top,
        rgba(0, 0, 0, 0.42) 0%,
        rgba(0, 0, 0, 0.12) 34%,
        rgba(0, 0, 0, 0) 62%
      );
    opacity: 0.75;
    transition: opacity var(--gallery-motion-duration) var(--ease-standard);
  }

  .project-gallery__feature::after,
  .project-gallery__item::after {
    opacity: 1;
  }

  .project-gallery__item:hover img,
  .gallery__item:hover img,
  .mini-gallery picture:hover img,
  .inline-media__item:hover img {
    transform: scale(1.025);
  }

  .project-gallery__item figcaption {
    display: none;
  }

  .project-gallery__item figcaption,
  .gallery__item figcaption,
  .inline-media__item figcaption {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    margin: 0;
    padding: clamp(0.55rem, 1.4vw, 0.8rem);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    line-height: var(--lh-snug);
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.42) 58%,
      rgba(0, 0, 0, 0) 100%
    );
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
  }

  .gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1rem);
  }

  .project-assets {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    background: var(--color-bg-subtle);
  }

  .project-assets__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(18rem, 0.56fr);
    gap: clamp(1rem, 4vw, 3rem);
    align-items: start;
  }

  .project-assets__copy {
    display: grid;
    gap: var(--space-2);
  }

  .project-assets__list,
  .links__row {
    display: grid;
    gap: var(--space-2);
  }

  .project-assets--repo .project-assets__list {
    justify-items: end;
    align-content: start;
  }

  .project-asset,
  .linkbtn {
    display: grid;
    gap: 0.18rem;
    padding: 0.85rem 0;
    color: var(--color-heading);
    text-decoration: none;
    background: transparent;
    transition:
      color var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
  }

  .project-asset + .project-asset,
  .linkbtn + .linkbtn {
    border-top: 1px solid var(--color-border);
  }

  .project-asset:hover,
  .project-asset:focus-visible,
  .linkbtn:hover,
  .linkbtn:focus-visible {
    color: var(--color-text);
    transform: translateX(0.15rem);
  }

  .project-asset:focus-visible,
  .linkbtn:focus-visible {
    outline: 2px solid var(--color-border-strong);
    outline-offset: 4px;
  }

  .project-asset__label {
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
  }

  .project-asset__icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    fill: currentColor;
  }

  .project-asset__eyebrow {
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    line-height: 1;
    text-transform: uppercase;
  }

  .project-asset__repo-head {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
  }

  .project-asset__repo-copy {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
  }

  .project-asset--repo {
    width: min(100%, 19rem);
    grid-template-columns: minmax(0, 1fr) clamp(4.1rem, 18vw, 4.9rem);
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
  }

  .project-asset--repo + .project-asset--repo {
    border-top: 1px solid var(--color-border);
  }

  .project-asset--repo:hover,
  .project-asset--repo:focus-visible {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-0.08rem);
  }

  .project-asset__icon--repo {
    width: 1.1rem;
    height: 1.1rem;
  }

  .project-asset__preview {
    display: block;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
    aspect-ratio: 1 / 1;
  }

  .project-asset__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-base) var(--ease-standard);
  }

  .project-asset--repo:hover .project-asset__preview img,
  .project-asset--repo:focus-visible .project-asset__preview img {
    transform: scale(1.02);
  }

  .project-asset__meta {
    color: var(--color-text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-snug);
  }

  .yt-lite {
    position: relative;
  }

  .yt-lite__btn {
    all: unset;
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
  }

  .yt-lite__thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .yt-lite__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 3rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }

  .page--project .media--contain {
    background: var(--color-bg);
  }

  .page--project .media--contain picture,
  .page--project .media--contain img,
  .page--project .media--contain video {
    object-fit: contain;
    object-position: center;
  }

  .page--project .media--contain:hover img {
    transform: none;
  }

  .page--project .media--plain {
    overflow: visible;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .page--project .media--plain picture,
  .page--project .media--plain img,
  .page--project .media--plain video {
    background: transparent;
  }

  .page--project .media--plain:hover img {
    transform: none;
  }

  .page--project .media__credit {
    margin-top: 0.65rem;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    line-height: var(--lh-normal);
  }

  .page--project .media__credit a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.16em;
  }

  .media__yt {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
  }

  @media (max-width: 900px) {
    .hei-exploded-band {
      padding: clamp(0.5rem, 3vw, 1rem) 0;
    }

    .hei-exploded-band__stage {
      aspect-ratio: 1170 / 586;
    }

    .hei-exploded-band__image {
      opacity: 0.78;
    }

    .project-meta__grid,
    .case__grid,
    .case__grid--reverse,
    .project-assets__grid,
    .thesis-feature__grid,
    .pid-section__grid {
      grid-template-columns: 1fr;
    }

    .case__grid--reverse .media,
    .case__grid--reverse .case__content {
      order: initial;
    }

    .project-gallery,
    .mini-gallery,
    .gallery {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-template-rows: none;
      grid-auto-rows: auto;
    }

    .project-gallery__thumbs {
      grid-column: 1 / -1;
      grid-row: auto;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-template-rows: none;
      grid-auto-rows: auto;
      overflow: visible;
      padding-right: 0;
    }

    .project-gallery__feature,
    .project-gallery__thumbs,
    .project-gallery.project-gallery--interactive .project-gallery__item[data-gallery-slot] {
      grid-column: auto !important;
      grid-row: auto !important;
    }

    .project-gallery__feature {
      grid-column: 1 / -1 !important;
    }

    .project-gallery__feature picture,
    .project-gallery__item picture {
      height: auto;
    }

    .project-gallery__feature picture {
      aspect-ratio: 16 / 10;
    }

    .project-assets--repo .project-assets__list {
      justify-items: start;
    }

    .project-asset--repo {
      width: min(100%, 100%);
    }

    .project-gallery__item picture {
      aspect-ratio: 1 / 1;
    }

    .thesis-report {
      justify-items: start;
    }
  }

  @media (max-width: 700px) {
    .project-meta {
      padding-top: var(--space-5);
    }

    .facts,
    .project-meta__note {
      justify-items: center;
      padding: var(--space-4) 0;
      background: transparent;
      text-align: center;
    }

    .project-meta__note {
      border-top: 1px solid var(--color-border);
    }

    .facts__list,
    .pid-section__notes {
      justify-items: center;
    }

    .facts__row {
      grid-template-columns: 1fr;
      gap: 0.15rem;
      justify-items: center;
      text-align: center;
    }

    .facts__row dt,
    .facts__row dd,
    .project-meta__note p,
    .pid-section__notes dt,
    .pid-section__notes dd,
    .pid-section__notes div {
      text-align: center;
    }

    .project-meta__note p {
      margin-inline: auto;
      max-width: 34ch;
    }

    .project-gallery-section,
    .project-assets,
    .case,
    .thesis-feature,
    .pid-section {
      padding: clamp(2.25rem, 10vw, 3.25rem) 0;
    }

    .project-gallery__head {
      gap: var(--space-3);
      margin-bottom: var(--space-4);
    }

    .project-gallery__summary {
      display: block;
      max-width: 34ch;
      color: var(--color-text-muted);
      font-size: var(--fs-small);
      line-height: var(--lh-normal);
    }

    .story .story__content,
    .story--reverse .story__content,
    .thesis-feature__copy,
    .pid-section__copy,
    .project-gallery__head,
    .project-assets__copy {
      text-align: center;
      justify-items: center;
    }

    .story__title,
    .story__text,
    .thesis-feature__text,
    .pid-section__text,
    .project-gallery__summary,
    .project-assets__summary {
      margin-inline: auto;
    }

    .story__bullets,
    .thesis-feature__points,
    .pid-section__notes {
      width: min(100%, 34rem);
      margin-inline: auto;
      text-align: center;
    }

    .thesis-report {
      justify-items: center;
    }

    .thesis-book {
      --thesis-spine-width: 0.82rem;
      width: min(100%, 18.6rem);
      transform: none;
    }

    .thesis-report.is-peeked .thesis-book {
      transform: rotate3d(0, 1, 0, 14deg) translate3d(0.1rem, 0, 0);
    }

    .pid-card {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    .pid-card__image {
      min-width: 34rem;
    }

    .pid-diagram {
      min-width: 34rem;
    }

    .project-gallery,
    .mini-gallery,
    .gallery,
    .inline-media {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-2);
    }

    .project-gallery.project-gallery--interactive {
      display: block;
    }

    .project-gallery__feature {
      display: none;
    }

    .project-gallery.project-gallery--count-1 .project-gallery__thumbs {
      display: grid;
    }

    .project-gallery.project-gallery--count-1 .project-gallery__item,
    .project-gallery.project-gallery--interactive .project-gallery__thumbs .project-gallery__item.is-hidden {
      display: block;
    }

    .project-gallery__thumbs {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: minmax(82vw, 82vw);
      grid-template-columns: none;
      grid-template-rows: none;
      grid-auto-rows: auto;
      gap: var(--space-3);
      overflow-x: auto;
      overflow-y: visible;
      padding-bottom: var(--space-2);
      scroll-padding-inline: var(--space-1);
      scroll-snap-type: x mandatory;
      overscroll-behavior-x: contain;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    .project-gallery__thumbs::-webkit-scrollbar {
      display: none;
    }

    .project-gallery__thumbs .project-gallery__item {
      scroll-snap-align: start;
      scroll-snap-stop: always;
      overflow: hidden;
      border: 1px solid var(--color-border);
      box-shadow: var(--shadow-sm);
    }

    .project-gallery__thumbs .project-gallery__item::after {
      opacity: 0;
    }

    .project-gallery__thumbs .project-gallery__item picture {
      aspect-ratio: 4 / 3;
      height: auto;
    }

    .project-gallery__thumbs .project-gallery__item img {
      transform: none;
    }

    .project-gallery__item figcaption {
      display: none;
    }

    .results {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 420px) {
    .mini-gallery,
    .gallery,
    .inline-media {
      gap: 0.45rem;
    }

    .project-gallery__thumbs {
      grid-auto-columns: minmax(86vw, 86vw);
      gap: var(--space-2);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .thesis-book {
      transition: none;
    }

    .project-gallery {
      --gallery-motion-duration: 1ms;
    }

    .project-gallery__feature,
    .project-gallery__item,
    .project-gallery__feature img,
    .project-gallery__item img,
    .project-gallery__item figcaption,
    .project-gallery__feature::after,
    .project-gallery__item::after {
      transition: none;
    }
  }
}


/* ===================== SCROLL REVEAL ANIMATIONS ===================== */

/* base state */
.reveal{
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 560ms ease,
    transform 560ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}

/* fly-in variants */
.reveal--left{ transform: translateX(-28px); }
.reveal--right{ transform: translateX(28px); }

/* morph variant */
.reveal--morph{
  transform: translateY(22px) scale(0.96);
  filter: blur(6px);
  transition:
    opacity 640ms ease,
    transform 640ms cubic-bezier(.2,.8,.2,1),
    filter 640ms ease;
}

/* visible state */
.reveal.is-visible{
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* section-level reveal for premium page flow */
.section-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 580ms ease,
    transform 660ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}

.section-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.section-reveal--drift-left {
  transform: translate3d(-22px, 12px, 0);
}

.section-reveal--drift-right {
  transform: translate3d(22px, 12px, 0);
}

.section-reveal--stagger {
  opacity: 1;
  transform: none;
}

.section-reveal--stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms ease,
    transform 660ms cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--section-reveal-index, 0) * 70ms);
  will-change: opacity, transform;
}

.section-reveal--stagger > *:nth-child(1) { --section-reveal-index: 0; }
.section-reveal--stagger > *:nth-child(2) { --section-reveal-index: 1; }
.section-reveal--stagger > *:nth-child(3) { --section-reveal-index: 2; }
.section-reveal--stagger > *:nth-child(4) { --section-reveal-index: 3; }

.section-reveal--stagger.is-visible > * {
  opacity: 1;
  transform: none;
}

/* accessibility: reduce motion */
@media (prefers-reduced-motion: reduce){
  .reveal,
  .reveal--left,
  .reveal--right,
  .reveal--morph,
  .section-reveal,
  .section-reveal--stagger > *{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .intro-nav,
  .intro-hero {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Keyframes */
@keyframes navDrop {
  from { transform: translateY(-48px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

@keyframes heroRise {
  from { transform: translateY(22px); }
  to   { transform: translateY(0); }
}

/* Apply animations */
.intro-nav {
  opacity: 0;
  animation: navDrop 920ms cubic-bezier(.6,.9,.2,1) 60ms forwards;
  will-change: transform, opacity;
}

.intro-hero {
  animation: heroRise 620ms cubic-bezier(.2,.8,.8,1) 320ms forwards;
  will-change: transform;
}
