@font-face {
      font-family: 'Absans';
      src: url('../fonts/Absans-Regular.woff2') format('woff2');
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --font-absans: 'Absans', system-ui, sans-serif;
      --font-dm-sans: 'DM Sans', system-ui, sans-serif;
      --font-inter: 'Inter', system-ui, sans-serif;
      --white: #ffffff;
      --text-primary: #1a1a1a;
      --text-secondary: #888888;
      --accent-red: #c0392b;
      --focus-ring: var(--accent-red);
      --highlight-bg: #f5c6b8;
      --card-bg: #d8d8d8;
      --tag-border: #c8c8c8;
      --page-pad: clamp(20px, 4vw, 48px);
      --content-width: 1400px;
      --max-width: min(1400px, calc(100vw - 2 * var(--page-pad)));
      /* Spacing scale (shreym.com / Framer-style rhythm) */
      --space-2xs: 4px;
      --space-xs: 8px;
      --space-sm: 12px;
      --space-md: 16px;
      --space-lg: 24px;
      --space-xl: 32px;
      --space-2xl: 48px;
      --space-3xl: 64px;
      --space-4xl: 96px;
      --section-gap: clamp(64px, 8vw, 96px);
      --text-stack: var(--space-xs);
      --text-to-media: clamp(32px, 4vw, 48px);
    }
    html { font-size: 16px; scroll-behavior: smooth; }
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
    }
    body {
      font-family: var(--font-dm-sans);
      background: var(--white);
      color: var(--text-primary);
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
    }
    a { text-decoration: none; color: inherit; }

    /* Visible keyboard focus (skills: better-accessibility) */
    :focus { outline: none; }
    :focus-visible {
      outline: 2px solid var(--focus-ring);
      outline-offset: 3px;
    }

    /* NAV */
    nav {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: clamp(20px, 4vw, 56px);
      padding: var(--space-lg) var(--page-pad) 0;
    }
    .nav-link {
      font-family: var(--font-absans);
      font-size: 20px;
      font-weight: 400;
      color: #666666;
      letter-spacing: 0.01em;
      transition: color 0.2s cubic-bezier(0.2, 0, 0, 1);
      white-space: nowrap;
      position: relative;
      padding: 10px 4px 8px;
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      box-sizing: border-box;
    }
    .nav-link::after {
      content: "";
      position: absolute;
      left: 4px;
      right: 4px;
      bottom: 4px;
      height: 1.5px;
      background: var(--accent-red);
      transform: scaleX(0);
      transform-origin: left center;
      transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
    }
    .nav-link:hover {
      color: var(--accent-red);
    }
    .nav-link:hover::after {
      transform: scaleX(1);
    }
    .nav-link:focus-visible {
      outline-offset: 2px;
      border-radius: 4px;
    }

    /* Avatar + revolving name stacked as one brand mark */
    .nav-brand {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
      line-height: 0;
      color: inherit;
    }
    .nav-avatar {
      width: auto;
      height: 90px;
      object-fit: contain;
      display: block;
    }

    /* HERO */
    .hero {
      max-width: var(--max-width);
      margin: var(--space-2xl) auto var(--space-xl);
      padding: var(--space-md) var(--page-pad);
    }

    .hero-line1 {
      font-family: var(--font-absans);
      font-size: 26px;
      font-weight: 400;
      line-height: 1.2;
      letter-spacing: -0.01em;
      text-wrap: balance;
    }

    /* Name ticker under the avatar */
    .name-rotator {
      position: relative;
      display: block;
      width: 150px;
      height: 28px;
      overflow: hidden;
      margin: 0 auto;
      flex-shrink: 0;
    }
    .name-rotator img {
      position: absolute;
      left: 50%;
      top: 0;
      width: 150px;
      height: 28px;
      margin-left: -75px;
      object-fit: contain;
      object-position: center center;
      opacity: 0;
      transform: translateY(28px);
      will-change: transform, opacity;
    }

    .name-rotator img.entering {
      animation: tickerIn 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    }
    .name-rotator img.visible {
      opacity: 1;
      transform: translateY(0);
    }
    .name-rotator img.leaving {
      animation: tickerOut 0.2s cubic-bezier(0.55, 0, 0.78, 0.4) forwards;
    }
    @keyframes tickerIn {
      from { opacity: 0; transform: translateY(28px); }
      to   { opacity: 1; transform: translateY(0);    }
    }
    @keyframes tickerOut {
      from { opacity: 1; transform: translateY(0);    }
      to   { opacity: 0; transform: translateY(-28px);}
    }

    .hero-body {
      font-family: var(--font-absans);
      font-size: 22px;
      font-weight: 400;
      line-height: 1.5;
      color: var(--text-primary);
      margin-top: 0;
      max-width: min(62ch, 100%);
      text-wrap: pretty;
    }
    .highlight {
      background: var(--highlight-bg);
      padding: 1px 4px; border-radius: 2px;
    }
    .hero-subtitle {
      font-family: var(--font-dm-sans);
      font-size: 15px;
      font-weight: 400;
      font-style: italic;
      color: var(--text-secondary);
      margin-top: var(--space-xs);
      line-height: 1.3;
    }

    /* WORK GRID */
    .work {
      max-width: var(--max-width);
      margin: var(--space-xl) auto 0;
      padding: 0 var(--page-pad);
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-3xl) var(--space-xl);
    }
    @media (max-width: 640px) { .work { grid-template-columns: 1fr; } }
    .card { display: block; cursor: pointer; color: inherit; }
    .card--locked {
      cursor: default;
      pointer-events: none;
      user-select: none;
    }
    .card--locked .card-image {
      pointer-events: auto;
    }
    .card-image {
      width: 100%; aspect-ratio: 16 / 10;
      border-radius: 6px; overflow: hidden;
      background-color: var(--card-bg);
      background-image: repeating-linear-gradient(
        -45deg, transparent, transparent 6px,
        rgba(255,255,255,0.5) 6px, rgba(255,255,255,0.5) 7px
      );
      transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s cubic-bezier(0.2, 0, 0, 1);
      outline: 1px solid oklch(0 0 0 / 0.1);
      outline-offset: -1px;
    }
    .card:hover .card-image {
      transform: translateY(-3px);
      box-shadow: 0 8px 28px rgba(0,0,0,0.10);
    }
    .card--locked:hover .card-image {
      transform: none;
      box-shadow: none;
    }
    .card-image img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      display: block;
      background: #f0eef5;
    }
    .card-image:has(img) {
      background-image: none;
      background-color: #f0eef5;
    }

    /* Card Slideshow */
    .card-slideshow {
      position: relative;
    }
    .card-slideshow .slide {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      background: #f0eef5;
      opacity: 0;
      transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
      pointer-events: none;
      will-change: opacity;
      z-index: 1;
    }
    .card-slideshow .slide.active {
      opacity: 1;
      pointer-events: auto;
      z-index: 2;
    }
    .card-slideshow .slide.shuffling-out {
      opacity: 0;
      z-index: 1;
    }

    /* Slide Indicator Dots */
    .slideshow-indicators {
      position: absolute;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 5px;
      padding: 3px 6px;
      background: rgba(0, 0, 0, 0.28);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      border-radius: 12px;
      z-index: 3;
      pointer-events: none;
    }
    .slideshow-indicators .indicator {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.45);
      transition: width 0.45s ease, background 0.45s ease, border-radius 0.45s ease;
    }
    .slideshow-indicators .indicator.active {
      width: 14px;
      border-radius: 4px;
      background: #ffffff;
    }

    @media (prefers-reduced-motion: reduce) {
      .card-slideshow .slide {
        transition: opacity 0.35s ease;
      }
    }
    .card-client {
      font-family: var(--font-inter);
      font-size: 15px;
      font-weight: 500;
      color: #999999;
      margin-top: var(--space-sm);
    }
    .card-title {
      font-family: var(--font-absans);
      font-size: 16px;
      font-weight: 400;
      color: var(--text-primary);
      margin-top: var(--space-2xs);
      line-height: 1.45;
      text-wrap: pretty;
    }
    .card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-sm); }
    .tag {
      font-family: var(--font-absans);
      font-size: 14px;
      font-weight: 400;
      color: var(--text-primary); background: var(--white);
      border: 1px solid var(--tag-border);
      border-radius: 20px; padding: 3px 12px; white-space: nowrap;
    }

    /* FOOTER */
    footer {
      max-width: var(--max-width);
      margin: var(--section-gap) auto 0;
      padding: 0 var(--page-pad) var(--space-3xl);
      display: flex; align-items: center; justify-content: space-between;
    }
    .footer-thanks {
      font-family: "Snell Roundhand", "Bradley Hand", "Apple Chancery", "Segoe Script", cursive;
      font-style: normal;
      font-size: clamp(18px, 2.4vw, 24px);
      font-weight: 400;
      color: var(--accent-red);
    }
    .footer-linkedin {
      display: flex; align-items: center; justify-content: center;
      width: 36px; height: 36px; background: #0a66c2;
      border-radius: 5px; transition: opacity 0.2s; flex-shrink: 0;
    }
    .footer-linkedin:hover { opacity: 0.8; }
    .footer-linkedin svg { width: 20px; height: 20px; fill: #fff; }

    @media (max-width: 540px) {
      .nav-link { font-size: 16px; }
      .nav-avatar { height: 72px; }
      .hero-line1 { font-size: 20px; }
      .hero-body  { font-size: 20px; }
      .hero-subtitle { font-size: 13px; }
      .work { margin-top: var(--space-lg); }
      .name-rotator { width: 120px; height: 22px; }
      .name-rotator img {
        width: 120px;
        height: 22px;
        margin-left: -60px;
        transform: translateY(22px);
      }
      @keyframes tickerIn  { from { opacity:0; transform: translateY(22px); } to { opacity:1; transform: translateY(0); } }
      @keyframes tickerOut { from { opacity:1; transform: translateY(0); } to { opacity:0; transform: translateY(-22px); } }
    }
