  :root {
    --bg: #000000;
    --bg-alt: #050505;
    --white: #F5F5F7;
    --grey: #8A8A93;
    --grey-dim: #55555C;
    --purple: #8B6BFF;
    --purple-bright: #A98BFF;
    --purple-dim: #4A3B8C;
    --border: rgba(139, 107, 255, 0.35);
    --border-faint: rgba(255, 255, 255, 0.08);
    --nav-h: 76px;

    --font-display: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
  }

  * { box-sizing: border-box; }

  html {
    scroll-behavior: smooth;
  }

  html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    width: 100%;
  }

  body {
    font-family: var(--font-body);
    color: var(--white);
  }

  section {
    scroll-margin-top: var(--nav-h);
  }

  ::selection {
    background: var(--purple);
    color: #000;
  }

  /* ─── Navbar ───────────────────────────────────────────────── */

  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 64px);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-faint);
  }

  .logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .logo::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--purple-bright);
    box-shadow: 0 0 10px 2px var(--purple);
    display: inline-block;
  }

  .nav-items {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 36px);
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
  }

  .nav-items li {
    display: flex;
    align-items: center;
    height: 100%;
  }

  /* All nav links share a fixed height box so their content
     sits on the exact same vertical center — no more drift
     between plain text links and the bordered Contact button. */
  .nav-items li a {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 40px;
    line-height: 1;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--grey);
    text-decoration: none;
    transition: color 0.25s ease;
  }

  .nav-items li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 6px;
    width: 0%;
    height: 1px;
    background: var(--purple-bright);
    transition: width 0.25s ease;
  }

  .nav-items li a:hover,
  .nav-items li a:focus-visible {
    color: var(--white);
  }

  .nav-items li a:hover::after,
  .nav-items li a:focus-visible::after {
    width: 100%;
  }

  .nav-items li a:focus-visible {
    outline: 1px solid var(--purple-bright);
    outline-offset: 4px;
    border-radius: 2px;
  }

  .nav-contact a {
    box-sizing: border-box;
    padding: 0 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--white);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  }

  .nav-contact a::after {
    display: none;
  }

  .nav-contact a:hover,
  .nav-contact a:focus-visible {
    color: var(--white);
    border-color: var(--purple-bright);
    background: rgba(139, 107, 255, 0.1);
    box-shadow: 0 0 18px rgba(139, 107, 255, 0.25);
  }

  .nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }

  /* ─── Shared section scaffolding ──────────────────────────── */

  .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 64px);
  }

  .section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 56px;
  }

  .section-head .index {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--purple-bright);
    letter-spacing: 0.1em;
  }

  .section-head .line {
    flex: 1;
    height: 1px;
    background: var(--border-faint);
  }

  .section-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.01em;
    margin: 0;
    white-space: nowrap;
  }

  /* ─── Hero Section ─────────────────────────────────────────── */

  .hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: #000000;
  }

  #bh-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
  }

  #bh-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  #bh-fg-canvas {
    pointer-events: none;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.75) 100%);
    pointer-events: none;
    z-index: 2;
  }

  .hero-content {
    position: relative;
    z-index: 5;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
  }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--purple-bright);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .eyebrow::before,
  .eyebrow::after {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--purple-dim);
  }

  .hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 7vw, 88px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0;
    max-width: 16ch;
    color: var(--white);
  }

  .hero-title .accent {
    color: var(--purple-bright);
    font-style: italic;
    font-weight: 500;
  }

  .hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(15px, 1.6vw, 18px);
    color: var(--grey);
    max-width: 46ch;
    margin: 24px 0 36px;
    line-height: 1.6;
  }

  .hero-actions {
    display: flex;
    align-items: center;
    gap: 18px;
  }

  .btn-primary, .btn-secondary {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.03em;
    text-decoration: none;
    padding: 13px 28px;
    border-radius: 999px;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
  }

  .btn-primary {
    color: #000000;
    background: var(--white);
    border: 1px solid var(--white);
  }

  .btn-primary:hover,
  .btn-primary:focus-visible {
    background: var(--purple-bright);
    border-color: var(--purple-bright);
    box-shadow: 0 0 24px rgba(139, 107, 255, 0.4);
    transform: translateY(-1px);
  }

  .btn-secondary {
    color: var(--white);
    border: 1px solid var(--border);
    background: transparent;
  }

  .btn-secondary:hover,
  .btn-secondary:focus-visible {
    border-color: var(--purple-bright);
    background: rgba(139, 107, 255, 0.08);
  }

  .scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .scroll-hint::after {
    content: "";
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, var(--purple-bright), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
  }

  @keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
  }

  /* ─── About Section ────────────────────────────────────────── */

  .about {
    background: var(--bg-alt);
    padding: 140px 0 120px;
    border-top: 1px solid var(--border-faint);
  }

  .about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
    align-items: start;
  }

  .about-text p {
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.55;
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 400;
    margin: 0 0 20px;
  }

  .about-text p .accent {
    color: var(--purple-bright);
  }

  .about-text .muted {
    color: var(--grey);
    font-size: clamp(15px, 1.4vw, 17px);
  }

  .skills-bars {
    display: flex;
    flex-direction: column;
    gap: 22px;
    border-left: 1px solid var(--border-faint);
    padding-left: 32px;
  }

  .skill-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
  }

  .skill-bar-head .skill-name {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--white);
  }

  .skill-bar-head .skill-percent {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--grey);
  }

  .skill-bar-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
  }

  .skill-bar-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple-dim), var(--purple-bright));
    box-shadow: 0 0 12px rgba(139, 107, 255, 0.35);
    transition: width 1.4s cubic-bezier(0.16, 0.84, 0.44, 1);
  }

  /* ─── Works Section ────────────────────────────────────────── */

  .works {
    background: var(--bg);
    padding: 120px 0;
    border-top: 1px solid var(--border-faint);
  }

  .works-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
  }

  .filter-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--grey);
    background: transparent;
    border: 1px solid var(--border-faint);
    border-radius: 999px;
    padding: 9px 18px;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  }

  .filter-btn:hover,
  .filter-btn:focus-visible {
    color: var(--white);
    border-color: var(--border);
  }

  .filter-btn.active {
    color: #000000;
    background: var(--purple-bright);
    border-color: var(--purple-bright);
  }

  .works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .work-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-faint);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
    text-decoration: none;
    color: inherit;
    display: block;
  }

  .work-card.hidden {
    display: none;
  }

  .work-card:hover {
    background: #0B0710;
    border-color: var(--border);
  }

  /* Scroll-in reveal: with a 3-up grid, left-column cards slide from the
     left, right-column cards slide from the right, and the middle
     column rises up from below — matching each card's actual position. */
  .works-grid .work-card:nth-child(3n+1) {
    opacity: 0;
    transform: translateX(-70px);
  }

  .works-grid .work-card:nth-child(3n+2) {
    opacity: 0;
    transform: translateY(50px);
  }

  .works-grid .work-card:nth-child(3n) {
    opacity: 0;
    transform: translateX(70px);
  }

  .works-grid.revealed .work-card {
    opacity: 1;
    transform: translate(0, 0);
  }

  .works-grid .work-card:nth-child(1) { transition-delay: 0.5s; }
  .works-grid .work-card:nth-child(2) { transition-delay: 0.55s; }
  .works-grid .work-card:nth-child(3) { transition-delay: 0.6s; }
  .works-grid .work-card:nth-child(4) { transition-delay: 0.65s; }
  .works-grid .work-card:nth-child(5) { transition-delay: 0.7s; }
  .works-grid .work-card:nth-child(6) { transition-delay: 0.75s; }
  .works-grid .work-card:nth-child(7) { transition-delay: 0.8s; }
  .works-grid .work-card:nth-child(8) { transition-delay: 0.85s; }
  .works-grid .work-card:nth-child(9) { transition-delay: 0.9s; }
  .works-grid .work-card:nth-child(10) { transition-delay: 0.95s; }

  .work-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
      radial-gradient(circle at 30% 20%, rgba(139,107,255,0.35), transparent 55%),
      linear-gradient(160deg, #0d0912 0%, #000000 70%);
    border-bottom: 1px solid var(--border-faint);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .work-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(circle at 50% 50%, black 10%, transparent 75%);
  }

  .work-thumb svg {
    position: relative;
    width: 34px;
    height: 34px;
    stroke: var(--purple-bright);
    opacity: 0.9;
    transition: transform 0.35s ease;
  }

  .work-card:hover .work-thumb svg {
    transform: scale(1.08);
  }

  /* Fixed tool icon (tool.png) — same icon for every tool card,
     sitting on the same decorative gradient background as before. */
  .work-thumb-icon {
    position: relative;
    width: 34px;
    height: 34px;
    object-fit: contain;
    opacity: 0.9;
    transition: transform 0.35s ease;
  }

  .work-card:hover .work-thumb-icon {
    transform: scale(1.08);
  }

  .work-thumb-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
  }

  .work-card:hover .work-thumb-img {
    transform: scale(1.05);
  }

  .work-body {
    padding: 18px 20px 20px;
  }

  .work-card .work-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--grey);
    margin-bottom: 12px;
  }

  .work-card .work-meta .tag {
    color: var(--purple-bright);
  }

  .work-card h3 {
    font-family: var(--font-display);
    font-size: clamp(15px, 1.4vw, 17px);
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
  }

  .work-card p {
    font-size: 12.5px;
    color: var(--grey);
    line-height: 1.5;
    margin: 0 0 16px;
  }

  .work-card .work-link {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--white);
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 11px 16px;
    transition: border-color 0.25s ease, background 0.25s ease;
  }

  .work-card:hover .work-link {
    border-color: var(--purple-bright);
    background: rgba(139, 107, 255, 0.1);
  }

  .work-card .work-link .arrow {
    transition: transform 0.25s ease;
    display: inline-block;
  }

  .work-card:hover .work-link .arrow {
    transform: translate(3px, -3px);
  }

  /* ─── Resume Section ───────────────────────────────────────── */

  .resume {
    background: var(--bg-alt);
    padding: 120px 0;
    border-top: 1px solid var(--border-faint);
  }

  .resume-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 8px;
  }

  .timeline {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
  }

  /* Scroll-in reveal: each timeline entry rises up into its final place. */
  .timeline .timeline-item {
    opacity: 0;
    transform: translateY(56px);
    transition: opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
  }

  .timeline.revealed .timeline-item {
    opacity: 1;
    transform: translateY(0);
  }

  .timeline .timeline-item:nth-child(1) { transition-delay: 0.5s; }
  .timeline .timeline-item:nth-child(2) { transition-delay: 0.58s; }
  .timeline .timeline-item:nth-child(3) { transition-delay: 0.66s; }
  .timeline .timeline-item:nth-child(4) { transition-delay: 0.74s; }

  .timeline-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 32px;
    padding: 28px 0;
    border-top: 1px solid var(--border-faint);
  }

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

  .timeline-item .period {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--purple-bright);
    padding-top: 4px;
  }

  .timeline-item h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 6px;
  }

  .timeline-item .org {
    color: var(--grey);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
    max-width: 60ch;
  }

  /* ─── Contact Section ──────────────────────────────────────── */

  .contact {
    background: var(--bg);
    padding: 140px 0 100px;
    border-top: 1px solid var(--border-faint);
  }

  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 72px;
    align-items: start;
  }

  /* Scroll-in reveal: intro column slides from the left,
     the form card slides from the right. */
  .contact-grid .contact-intro {
    opacity: 0;
    transform: translateX(-70px);
    transition: opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1) 0.5s, transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1) 0.5s;
  }

  .contact-grid .contact-form-card {
    opacity: 0;
    transform: translateX(70px);
    transition: opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1) 0.5s, transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1) 0.5s;
  }

  .contact-grid.revealed .contact-intro,
  .contact-grid.revealed .contact-form-card {
    opacity: 1;
    transform: translateX(0);
  }

  .contact h2.big {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(30px, 4.2vw, 48px);
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    max-width: 14ch;
  }

  .contact-intro p {
    font-size: 15px;
    color: var(--grey);
    line-height: 1.7;
    max-width: 40ch;
    margin: 0 0 32px;
  }

  .contact-email {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: clamp(17px, 2vw, 20px);
    color: var(--purple-bright);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
    transition: color 0.25s ease, border-color 0.25s ease;
  }

  .contact-email:hover,
  .contact-email:focus-visible {
    color: var(--white);
    border-color: var(--white);
  }

  .contact-meta {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .contact-meta span {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--grey);
  }

  .contact-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 32px;
  }

  .contact-socials a {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--grey);
    text-decoration: none;
    transition: color 0.25s ease;
  }

  .contact-socials a:hover,
  .contact-socials a:focus-visible {
    color: var(--purple-bright);
  }

  /* ─── Contact Form ─────────────────────────────────────────── */

  .contact-form-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-faint);
    border-radius: 20px;
    padding: 40px;
    position: relative;
  }

  .contact-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .form-group label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey);
  }

  .form-group input,
  .form-group textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-faint);
    border-radius: 10px;
    padding: 13px 14px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  }

  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: var(--grey-dim);
  }

  .form-group input:focus,
  .form-group textarea:focus {
    border-color: var(--purple-bright);
    background: rgba(139, 107, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(139, 107, 255, 0.12);
  }

  .form-group textarea {
    min-height: 130px;
    resize: vertical;
    font-family: var(--font-body);
  }

  .form-submit {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
  }

  .form-submit button {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.03em;
    color: #000000;
    background: var(--white);
    border: 1px solid var(--white);
    border-radius: 999px;
    padding: 13px 28px;
    cursor: pointer;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  }

  .form-submit button:hover,
  .form-submit button:focus-visible {
    background: var(--purple-bright);
    border-color: var(--purple-bright);
    box-shadow: 0 0 24px rgba(139, 107, 255, 0.4);
    transform: translateY(-1px);
  }

  .form-note {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--grey-dim);
  }

  .form-success {
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(139, 107, 255, 0.08);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--white);
    line-height: 1.6;
  }

  .form-success.visible {
    display: flex;
  }

  .form-success .icon {
    color: var(--purple-bright);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1;
    margin-top: 2px;
  }

  .form-error {
    display: none;
    font-family: var(--font-body);
    font-size: 13px;
    color: #FF8A8A;
    padding: 12px 14px;
    border: 1px solid rgba(255, 138, 138, 0.35);
    border-radius: 10px;
    background: rgba(255, 138, 138, 0.06);
  }

  .form-error.visible {
    display: block;
  }

  .form-submit button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
  }

  .contact-form.hidden {
    display: none;
  }

  /* Utility classes replacing former inline style="" attributes,
     so the CSP style-src can drop 'unsafe-inline'. */
  .resume-head .section-head {
    margin-bottom: 0;
  }

  .resume-head .btn-secondary {
    white-space: nowrap;
  }

  .visually-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  footer {
    background: var(--bg);
    border-top: 1px solid var(--border-faint);
    padding: 24px clamp(20px, 5vw, 64px);
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--grey-dim);
  }

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

  @media (max-width: 900px) and (min-width: 761px) {
    .works-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 760px) {
    .nav-items {
      position: fixed;
      top: 0;
      right: 0;
      height: 100vh;
      width: min(72vw, 300px);
      background: rgba(0,0,0,0.96);
      border-left: 1px solid var(--border);
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      gap: 28px;
      padding: 40px;
      transform: translateX(100%);
      transition: transform 0.35s ease;
      z-index: 20;
    }

    .nav-items.open {
      transform: translateX(0%);
    }

    .nav-items li {
      height: auto;
    }

    .nav-toggle {
      display: flex;
      z-index: 21;
    }

    .hero-actions {
      flex-direction: column;
      width: 100%;
      max-width: 280px;
    }

    .btn-primary, .btn-secondary {
      width: 100%;
      text-align: center;
    }

    .about-grid {
      grid-template-columns: 1fr;
      gap: 40px;
    }

    .skills-bars {
      border-left: none;
      border-top: 1px solid var(--border-faint);
      padding-left: 0;
      padding-top: 28px;
    }

    .works-grid {
      grid-template-columns: 1fr;
    }

    .work-body {
      padding: 28px 24px 32px;
    }

    .contact-grid {
      grid-template-columns: 1fr;
      gap: 48px;
    }

    .contact-form-card {
      padding: 28px 24px;
    }

    .form-row {
      grid-template-columns: 1fr;
      gap: 22px;
    }

    .timeline-item {
      grid-template-columns: 1fr;
      gap: 8px;
    }

    footer {
      flex-direction: column;
      gap: 8px;
      text-align: center;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .scroll-hint::after { animation: none; }
    html { scroll-behavior: auto; }
    .works-grid .work-card {
      opacity: 1;
      transform: none;
      transition: none;
    }
    .skill-bar-fill { transition: none; }
    .timeline .timeline-item {
      opacity: 1;
      transform: none;
      transition: none;
    }
    .contact-grid .contact-intro,
    .contact-grid .contact-form-card {
      opacity: 1;
      transform: none;
      transition: none;
    }
  }
