*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg: #f0ede8;
    --ink: #241715;
    --accent: #D90024;
    --ink-mid: #555;
    --ink-light: #999;
    --white: #ffffff;
    --nav-bg: rgba(240, 237, 232, 0.85);
    --card-bg: #ffffff;
    --border: rgba(0,0,0,0.06);
    --border-strong: rgba(0,0,0,0.12);
    /* Inverse tokens — always opposite of page */
    --inverse-bg: #241715;
    --inverse-ink: #f0ede8;
    --inverse-ink-soft: rgba(240,237,232,0.6);
    --inverse-ink-muted: rgba(240,237,232,0.35);
    --inverse-ink-faint: rgba(240,237,232,0.12);
    --inverse-ink-subtle: rgba(240,237,232,0.06);
    --radius: 20px;
    --radius-sm: 12px;
    --nav-h: 64px;
  }

  :root[data-theme="dark"] {
    --bg: #1a1310;
    --ink: #f0ede8;
    --accent: #ff3a4f;
    --ink-mid: #b8b0a8;
    --ink-light: #6b635c;
    --white: #2a201c;
    --nav-bg: rgba(26, 19, 16, 0.85);
    --card-bg: #2a201c;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.15);
    /* Inverse flips too */
    --inverse-bg: #f0ede8;
    --inverse-ink: #241715;
    --inverse-ink-soft: rgba(36,23,21,0.7);
    --inverse-ink-muted: rgba(36,23,21,0.45);
    --inverse-ink-faint: rgba(36,23,21,0.15);
    --inverse-ink-subtle: rgba(36,23,21,0.06);
  }

  html { scroll-behavior: smooth; background: var(--bg); transition: background 0.4s ease; }

  body {
    background: transparent;
    color: var(--ink);
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    transition: color 0.4s ease;
  }

  /* ── NAV ── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(240, 237, 232, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    background: var(--nav-bg);
    transition: background 0.3s, border-color 0.3s;
  }

  .nav-logo {
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
    transition: opacity 0.2s, color 0.4s ease;
  }
  .nav-logo:hover { opacity: 0.6; }
  .nav-logo svg {
    height: 32px;
    width: auto;
    fill: currentColor;
    display: block;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.4s ease, border-color 0.3s, transform 0.3s;
  }
  .theme-toggle:hover {
    background: var(--ink);
    color: var(--bg);
  }
  .theme-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .theme-toggle .icon-moon { display: none; }
  :root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
  :root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

  .nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
  }

  .nav-links a {
    text-decoration: none;
    color: var(--ink-mid);
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    transition: color 0.2s;
    position: relative;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0; right: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
  }

  .nav-links a:hover { color: var(--ink); }
  .nav-links a:hover::after { transform: scaleX(1); }

  /* hamburger */
  .hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
  }
  .hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.3s, opacity 0.3s;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .mobile-menu a {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: opacity 0.2s;
  }
  .mobile-menu a:hover { opacity: 0.5; }

  /* ── LAYOUT ── */
  .page {
    padding-top: var(--nav-h);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  section {
    padding: 5rem 0;
  }

  /* ── HERO ── */
  #home {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 75vh;
    min-height: 480px;
    max-height: 700px;
    background: #241715;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
  }

  .hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
    opacity: 0.35;
    mix-blend-mode: luminosity;
    z-index: 1;
  }

  /* Animated ink blobs */
  .hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.88;
    animation: blobFloat 8s ease-in-out infinite;
  }
  .hero-blob-1 { width: 400px; height: 400px; background: #1a1a1a; top: -100px; left: -80px; animation-delay: 0s; }
  .hero-blob-2 { width: 320px; height: 320px; background: #2a1a10; bottom: -60px; right: 10%; animation-delay: -3s; }
  .hero-blob-3 { width: 260px; height: 260px; background: #0a0a20; top: 30%; left: 40%; animation-delay: -5s; }

  @keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.97); }
  }

  .hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
  }

  .hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
    padding: 6px 14px;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    width: fit-content;
  }
  .hero-tag-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  .hero-title {
    font-family: 'Manufacturing Consent', 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: clamp(3rem, 9vw, 7rem);
    line-height: 1;
    letter-spacing: 0;
    color: #ffffff;
    max-width: 700px;
  }

  .hero-title em {
    font-style: normal;
    font-weight: 400;
    color: var(--accent)
  }

  .hero-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .hero-desc {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    font-weight: 300;
    max-width: 320px;
    line-height: 1.7;
  }

  .hero-services {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .hero-service {
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    font-weight: 300;
  }

  .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    padding: 12px 20px 12px 24px;
    border-radius: 100px;
    transition: background 0.2s, transform 0.2s;
  }
  .cta-btn:hover { background: #e8e4df; transform: scale(1.02); }
  .cta-btn-arrow {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
  }

  /* ── SECTION LABELS ── */
  .section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-light);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
  }
  .section-label::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--ink-light);
  }

  .section-title {
    font-family: 'Manufacturing Consent', 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0;
    line-height: 1.15;
    margin-bottom: 3rem;
    max-width: 640px;
  }

  .section-title em {
    font-style: normal;
    font-weight: 400;
    color: var(--accent);
  }

  /* ── EDUCATION ── */
  #education { background: none; }

  .edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
  }

  .edu-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .edu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  }

  .edu-year {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--ink-light);
    text-transform: uppercase;
    margin-bottom: 1rem;
  }

  .edu-degree {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
    line-height: 1.2;
  }

  .edu-school {
    color: var(--ink-mid);
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 1rem;
  }

  .edu-detail {
    color: var(--ink-light);
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .edu-icon {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
  }

  /* ── CERTIFICATIONS ACCORDION ── */
  .cert-accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    overflow: hidden;
    transition: border-color 0.2s;
  }
  .cert-accordion:hover { border-color: var(--border-strong); }

  .cert-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.01em;
    transition: background 0.2s;
  }
  .cert-toggle:hover { background: rgba(0,0,0,0.02); }

  .cert-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }
  .cert-toggle-icon { font-size: 1rem; }

  .cert-count {
    font-size: 0.68rem;
    font-weight: 400;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--bg);
    color: var(--ink-mid);
    letter-spacing: 0.04em;
  }

  .cert-chevron {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    color: var(--ink-light);
  }
  .cert-accordion.open .cert-chevron { transform: rotate(180deg); }

  .cert-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .cert-accordion.open .cert-panel { max-height: 300px; }

  .cert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    border-top: 1px solid var(--border);
  }

  .cert-item-left { display: flex; flex-direction: column; gap: 0.15rem; }

  .cert-name {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--ink);
  }

  .cert-issuer {
    font-size: 0.72rem;
    color: var(--ink-light);
    font-weight: 300;
  }

  .cert-year-badge {
    font-size: 0.7rem;
    font-weight: 400;
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--bg);
    color: var(--ink-mid);
    letter-spacing: 0.03em;
    white-space: nowrap;
  }

  /* ── WORK ── */

  .work-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(0,0,0,0.08);
  }

  .work-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 1rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transition: background 0.2s;
    cursor: default;
  }
  .work-item:hover .work-company { opacity: 0.6; }

  .work-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
  }

  .work-company {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
    transition: opacity 0.2s;
  }

  .work-badge {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.15);
    color: var(--ink-mid);
  }

  .work-role {
    color: var(--ink-mid);
    font-size: 0.875rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
  }

  .work-desc {
    color: var(--ink-light);
    font-size: 0.82rem;
    max-width: 520px;
    line-height: 1.7;
  }

  .work-period {
    font-size: 0.78rem;
    color: var(--ink-light);
    white-space: nowrap;
    padding-top: 0.3rem;
  }

  /* skill tags */
  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.75rem;
  }
  .tag {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--bg);
    color: var(--ink-mid);
  }

  /* ── SKILLS ── */
  .skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .skills-column {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.2s;
  }
  .skills-column:hover { border-color: var(--border-strong); }

  .skills-heading {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 1.25rem;
  }

  .skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .skills-list li {
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--ink);
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left 0.2s;
  }
  .skills-list li:last-child { border-bottom: none; }
  .skills-list li:hover { padding-left: 0.5rem; }

  /* ── PORTFOLIO ── */
  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .portfolio-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .portfolio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-radius: 100px;
    padding: 0.85rem 1.5rem;
  }

  .portfolio-header-left {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    min-width: 0;
  }

  .portfolio-name {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
    letter-spacing: -0.01em;
  }

  .portfolio-year {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--ink-light);
  }

  .portfolio-dots {
    display: flex;
    gap: 4px;
    color: var(--ink-light);
    font-size: 1.1rem;
    line-height: 0;
    letter-spacing: 2px;
  }

  .portfolio-image {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: #d8d4cf;
    position: relative;
    transition: transform 0.4s ease;
  }
  .portfolio-item:hover .portfolio-image { transform: translateY(-4px); }

  .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* ── ABOUT ── */
  #about {
    background: none;
  }

  .about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }

  .about-photo {
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
  }

  .about-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
  }

  .about-photo-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem;
  }

  .about-photo-initials {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1rem;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -65%);
  }

  .about-photo-name {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    text-align: center;
  }

  .about-photo-title {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    margin-top: 0.2rem;
  }

  .about-text .section-title { max-width: 100%; }

  .about-bio {
    color: var(--ink-mid);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 1.5rem;
  }

  .about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
  }

  .about-stat {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    text-align: center;
  }
  .about-stat-num {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -0.04em;
    display: block;
  }
  .about-stat-lbl {
    font-size: 0.72rem;
    color: var(--ink-light);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  /* ── CONTACT ── */

  .contact-card {
    background: var(--inverse-bg);
    color: var(--inverse-ink);
    border-radius: var(--radius);
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: background 0.4s ease, color 0.4s ease;
  }

  .contact-title {
    font-family: 'Manufacturing Consent', 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--inverse-ink);
  }
  .contact-title em { font-style: normal; font-weight: 400; color: var(--inverse-ink-muted); }

  .contact-sub {
    color: var(--inverse-ink-muted);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
  }

  .contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--inverse-ink-soft);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 300;
    transition: color 0.2s;
  }
  .contact-link:hover { color: var(--inverse-ink); }
  .contact-link-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--inverse-ink-faint);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  /* ── FOOTER ── */
  footer {
    text-align: center;
    padding: 2rem;
    color: var(--ink-light);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    border-top: 1px solid rgba(0,0,0,0.06);
  }

  /* ── REVEAL ANIMATION ── */
  .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .js-enabled .reveal.visible {
    opacity: 1;
    transform: none;
  }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }

  /* ── RESPONSIVE ── */
  @media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }

    .hero-content { padding: 1.5rem; }
    .hero-title { font-size: clamp(2.5rem, 12vw, 4rem); }
    .hero-services { display: none; }
    .hero-desc { max-width: 100%; }

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

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

    .work-item { grid-template-columns: 1fr; }
    .work-period { text-align: left; }

    .about-inner { grid-template-columns: 1fr; }
    .about-photo { aspect-ratio: 4/5; max-height: 420px; }

    .about-stats { grid-template-columns: repeat(3, 1fr); }

    .contact-card { padding: 2rem 1.5rem; }

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

  @media (max-width: 480px) {
    section { padding: 3.5rem 0; }
    .about-stats { grid-template-columns: 1fr 1fr; }
    .about-stats .about-stat:last-child { grid-column: span 2; }
  }
  /* ── SCROLL FADE / PROGRESSIVE BLUR ── */
  .scroll-fade {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    pointer-events: none;
    z-index: 50;
  }
.scroll-fade {
  transition: opacity 0.35s ease;
}
  .scroll-fade__layer {
    position: absolute;
    inset: 0;
  }
  .scroll-fade__layer:nth-child(1) {
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    mask-image: linear-gradient(to bottom, transparent 0%, black 12.5%, black 25%, transparent 37.5%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12.5%, black 25%, transparent 37.5%);
  }
  .scroll-fade__layer:nth-child(2) {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    mask-image: linear-gradient(to bottom, transparent 12.5%, black 25%, black 37.5%, transparent 50%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 12.5%, black 25%, black 37.5%, transparent 50%);
  }
  .scroll-fade__layer:nth-child(3) {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    mask-image: linear-gradient(to bottom, transparent 25%, black 37.5%, black 50%, transparent 62.5%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 25%, black 37.5%, black 50%, transparent 62.5%);
  }
  .scroll-fade__layer:nth-child(4) {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    mask-image: linear-gradient(to bottom, transparent 37.5%, black 50%, black 62.5%, transparent 75%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 37.5%, black 50%, black 62.5%, transparent 75%);
  }
  .scroll-fade__layer:nth-child(5) {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    mask-image: linear-gradient(to bottom, transparent 50%, black 62.5%, black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 50%, black 62.5%, black 100%);
  }
  .scroll-fade__tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--bg) 100%);
  }
  /* ── ASCII WAVE BACKGROUND ── */
  .ascii-wave {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.09;
  }
  /* Wave sits at z-index -1 behind everything. Content stays in the
     root stacking context so backdrop-filter on .scroll-fade can blur it. */
  body > nav { z-index: 100; }
  body > .scroll-fade { z-index: 50; }
  @media (prefers-reduced-motion: reduce) {
    .ascii-wave { opacity: 0.06; }
  }