*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --mint:     #44EBE4;
    --sand:     #EAA885;
    --taupe:    #AB978C;
    --rosegrey: #B69695;
    --brown:    #6B5B4E;
    --deep:     #244140;
    --deeper:   #172B2A;
    --text:     #F0EDEA;
    --muted:    #8FA8A7;
  }

  html { scroll-behavior: smooth; }

  body {
    background: var(--deeper);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
  }

  /* ── NAV ── */
  nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 48px;
    background: rgba(23,43,42,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(68,235,228,0.08);
  }
  .nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 1.1rem;
    color: var(--mint); letter-spacing: -0.02em;
  }
  .nav-links { display: flex; gap: 36px; list-style: none; }
  .nav-links a {
    font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--muted); text-decoration: none;
    transition: color 0.2s;
  }
  .nav-links a:hover { color: var(--mint); }

  /* ── HERO ── */
  .hero {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 120px 48px 80px;
    position: relative; overflow: hidden;
  }
  .hero-bg-accent {
    position: absolute; top: -200px; right: -200px;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(68,235,228,0.07) 0%, transparent 70%);
    pointer-events: none;
  }
  .hero-bg-accent2 {
    position: absolute; bottom: -100px; left: 30%;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(234,168,133,0.06) 0%, transparent 70%);
    pointer-events: none;
  }

  .terminal-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem; color: var(--mint);
    margin-bottom: 28px; opacity: 0;
    animation: fadeUp 0.6s 0.2s forwards;
  }
  .terminal-line::before { content: '> '; opacity: 0.5; }

  .hero-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 7vw, 6.5rem);
    font-weight: 700; line-height: 0.95;
    letter-spacing: -0.04em;
    opacity: 0; animation: fadeUp 0.7s 0.5s forwards;
  }
  .hero-name em {
    font-style: normal;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--sand);
  }

  .hero-title {
    margin-top: 24px;
    font-size: 1rem; font-weight: 400; color: var(--taupe);
    letter-spacing: 0.12em; text-transform: uppercase;
    opacity: 0; animation: fadeUp 0.7s 0.75s forwards;
  }

  .hero-desc {
    margin-top: 28px; max-width: 520px;
    font-size: 1.05rem; line-height: 1.75; color: var(--muted);
    opacity: 0; animation: fadeUp 0.7s 0.95s forwards;
  }

  .hero-cta {
    margin-top: 44px; display: flex; gap: 16px; flex-wrap: wrap;
    opacity: 0; animation: fadeUp 0.7s 1.1s forwards;
  }
  .btn-primary {
    padding: 14px 32px;
    background: var(--mint); color: var(--deeper);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em;
    border: none; border-radius: 2px; cursor: pointer;
    text-decoration: none; transition: background 0.2s, transform 0.15s;
  }
  .btn-primary:hover { background: #6df4ef; transform: translateY(-2px); }
  .btn-ghost {
    padding: 14px 32px;
    background: transparent; color: var(--sand);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500; font-size: 0.9rem;
    border: 1px solid rgba(234,168,133,0.4);
    border-radius: 2px; cursor: pointer;
    text-decoration: none; transition: border-color 0.2s, color 0.2s, transform 0.15s;
  }
  .btn-ghost:hover { border-color: var(--sand); transform: translateY(-2px); }

  /* ── SCROLL INDICATOR ── */
  .scroll-hint {
    position: absolute; bottom: 40px; left: 48px;
    display: flex; align-items: center; gap: 12px;
    font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted); opacity: 0; animation: fadeUp 0.7s 1.4s forwards;
  }
  .scroll-line {
    width: 40px; height: 1px; background: var(--muted); transform-origin: left;
    animation: extendLine 1s 1.6s forwards;
    transform: scaleX(0);
  }

  /* ── SECTION SHARED ── */
  section { padding: 100px 48px; }
  .section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--mint); margin-bottom: 16px;
  }
  .section-label::before { content: '// '; opacity: 0.5; }
  .section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700; letter-spacing: -0.03em;
    line-height: 1.1; margin-bottom: 48px;
  }

  /* ── ABOUT ── */
  .about { background: var(--deep); }
  .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; max-width: 1100px; }
  .about-text p { color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
  .about-text p strong { color: var(--text); font-weight: 500; }

  .skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
  .skill-tag {
    padding: 10px 16px;
    background: rgba(68,235,228,0.06);
    border: 1px solid rgba(68,235,228,0.15);
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem; color: var(--mint);
    transition: background 0.2s;
  }
  .skill-tag:hover { background: rgba(68,235,228,0.12); }

  .about-stats { display: flex; flex-direction: column; gap: 32px; }
  .stat-block { border-left: 2px solid var(--sand); padding-left: 20px; }
  .stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem; font-weight: 700; color: var(--sand);
    letter-spacing: -0.04em; line-height: 1;
  }
  .stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

  /* ── PROJECTS ── */
  .projects { background: var(--deeper); }
  .projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; max-width: 1200px; }
  .project-card {
    background: var(--deep);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 32px;
    position: relative; overflow: hidden;
    transition: transform 0.25s, border-color 0.25s;
    cursor: default;
  }
  .project-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--card-accent, var(--mint));
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.3s;
  }
  .project-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.12); }
  .project-card:hover::before { transform: scaleX(1); }

  .project-card:nth-child(1) { --card-accent: var(--mint); }
  .project-card:nth-child(2) { --card-accent: var(--sand); }
  .project-card:nth-child(3) { --card-accent: var(--rosegrey); }

  .project-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; color: var(--card-accent, var(--mint));
    letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px;
  }
  .project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem; font-weight: 600;
    margin-bottom: 12px; letter-spacing: -0.02em;
  }
  .project-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
  .project-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
  .stack-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem; color: var(--taupe);
    background: rgba(171,151,140,0.1);
    border: 1px solid rgba(171,151,140,0.2);
    padding: 4px 10px; border-radius: 20px;
  }
  .project-links { display: flex; gap: 16px; }
  .project-link {
    font-size: 0.8rem; font-weight: 500;
    color: var(--card-accent, var(--mint));
    text-decoration: none; letter-spacing: 0.04em;
    transition: opacity 0.2s;
  }
  .project-link:hover { opacity: 0.7; }
  .project-link::after { content: ' →'; }

  /* ── PROJECTS PREVIEW ── */
  .projects-preview {
    display: flex; flex-direction: column; align-items: flex-start; gap: 28px;
    max-width: 560px;
  }
  .projects-preview-text {
    font-size: 1.05rem; color: var(--muted); line-height: 1.75;
  }

  /* ── EXPERIENCE ── */
  .experience { background: var(--deep); }
  .timeline { max-width: 700px; display: flex; flex-direction: column; gap: 0; }
  .timeline-item { display: grid; grid-template-columns: 120px 1fr; gap: 32px; padding-bottom: 48px; position: relative; }
  .timeline-item:not(:last-child)::after {
    content: ''; position: absolute;
    left: 119px; top: 8px; bottom: 0;
    width: 1px; background: rgba(255,255,255,0.06);
  }
  .timeline-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem; color: var(--muted);
    padding-top: 3px; text-align: right;
  }
  .timeline-dot {
    position: absolute; left: 111px; top: 6px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--sand); border: 2px solid var(--deep);
  }
  .timeline-role {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem; font-weight: 600; margin-bottom: 4px;
  }
  .timeline-company { font-size: 0.85rem; color: var(--sand); margin-bottom: 12px; }
  .timeline-body { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

  /* ── CONTACT ── */
  .contact {
    background: var(--deeper);
    display: flex; flex-direction: column; align-items: center;
    text-align: center; padding: 120px 48px;
  }
  .contact .section-heading { font-size: clamp(2rem, 4vw, 3.5rem); max-width: 600px; }
  .contact-sub { color: var(--muted); max-width: 440px; margin: 0 auto 48px; line-height: 1.8; }
  .contact-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
  .contact-link {
    display: flex; align-items: center; gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem; font-weight: 500; letter-spacing: 0.04em;
    color: var(--muted); text-decoration: none;
    padding: 12px 24px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px;
    transition: color 0.2s, border-color 0.2s;
  }
  .contact-link:hover { color: var(--mint); border-color: rgba(68,235,228,0.3); }

  /* ── FOOTER ── */
  footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 28px 48px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.78rem; color: var(--brown);
  }
  footer span { font-family: 'JetBrains Mono', monospace; }

  /* ── ANIMATIONS ── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes extendLine {
    to { transform: scaleX(1); }
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 768px) {
    nav { padding: 16px 24px; }
    .nav-links { display: none; }
    section, .hero, .contact { padding: 80px 24px; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .timeline-item { grid-template-columns: 80px 1fr; gap: 16px; }
    .timeline-item::after { left: 79px; }
    .timeline-dot { left: 71px; }
    footer { flex-direction: column; gap: 8px; text-align: center; }
    .scroll-hint { display: none; }
  }

  /* ── JS-DRIVEN STYLES ── */

  /* Nav shrink on scroll */
  nav.nav--scrolled {
    padding-top: 12px;
    padding-bottom: 12px;
    background: rgba(23,43,42,0.97);
  }

  /* Active nav link */
  .nav-links a.active { color: var(--mint); }

  /* Scroll reveal */
  .reveal-ready {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s var(--reveal-delay, 0ms) ease,
                transform 0.55s var(--reveal-delay, 0ms) ease;
  }
  .reveal-ready.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  }

  /* ── SKIP LINK ── */
  .skip-link {
    position: absolute; top: -100px; left: 16px;
    padding: 8px 16px;
    background: var(--mint); color: var(--deeper);
    font-size: 0.85rem; font-weight: 600;
    border-radius: 2px; z-index: 999;
    transition: top 0.2s; text-decoration: none;
  }
  .skip-link:focus { top: 16px; }

  /* ── FOOTER BACK LINK ── */
  .footer-back {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem; color: var(--muted);
    text-decoration: none; transition: color 0.2s;
  }
  .footer-back:hover { color: var(--mint); }

  /* ── PAGE HEADER (projects.html) ── */
  .page-header {
    min-height: 40vh;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 140px 48px 64px;
    position: relative; overflow: hidden;
  }
  .page-header .hero-bg-accent {
    position: absolute; top: -200px; right: -200px;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(68,235,228,0.07) 0%, transparent 70%);
    pointer-events: none;
  }
  .page-header-sub {
    max-width: 520px;
    font-size: 1rem; color: var(--muted); line-height: 1.75;
    margin-top: 0; margin-bottom: 0;
  }
  .page-header .section-heading { margin-bottom: 16px; }

  /* ── PROJECTS LIST PAGE ── */
  .projects-list { padding: 48px 48px 100px; background: var(--deeper); }
  .projects-list .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px; max-width: 1200px;
  }

  /* ── PROJECT HERO ── */
  .project-hero {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 120px 48px 80px;
    position: relative; overflow: hidden;
    background: var(--deeper);
  }
  .project-hero-inner {
    max-width: 760px;
    display: flex; flex-direction: column;
  }

  .back-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem; color: var(--muted);
    text-decoration: none; letter-spacing: 0.06em;
    margin-bottom: 32px; display: inline-block;
    transition: color 0.2s;
  }
  .back-link:hover { color: var(--mint); }

  .project-tag--large { font-size: 0.78rem; margin-bottom: 20px; }

  .project-hero .hero-name {
    font-size: clamp(3rem, 7vw, 6rem);
    margin-bottom: 24px;
    opacity: 1; animation: none;
  }
  .project-hero .hero-desc {
    font-size: 1.05rem; line-height: 1.75;
    color: var(--muted); max-width: 520px;
    margin-top: 0; margin-bottom: 36px;
    opacity: 1; animation: none;
  }

  /* ── PROJECT META ROW ── */
  .project-meta {
    display: flex; gap: 40px; flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .meta-item { display: flex; flex-direction: column; gap: 4px; }
  .meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted);
  }
  .meta-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem; font-weight: 500; color: var(--text);
  }

  /* ── HERO LINKS ── */
  .project-hero-links {
    display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  }

  /* ── PROJECT SECTIONS ── */
  .project-section { padding: 80px 48px; background: var(--deeper); }
  .project-section--alt { background: var(--deep); }
  .project-section-inner { max-width: 760px; }
  .project-section-inner p { color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
  .project-section-inner p:last-child { margin-bottom: 0; }
  .project-section-inner .section-heading { margin-bottom: 24px; }
  .project-section-inner code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em; color: var(--mint);
    background: rgba(68,235,228,0.08);
    padding: 2px 6px; border-radius: 2px;
  }

  /* ── FEATURE LIST ── */
  .feature-list { list-style: none; display: flex; flex-direction: column; gap: 28px; margin-top: 8px; }
  .feature-item { display: flex; gap: 20px; align-items: flex-start; }
  .feature-icon { color: var(--mint); font-size: 1rem; flex-shrink: 0; margin-top: 3px; }
  .feature-item strong {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 4px;
  }
  .feature-item p { font-size: 0.9rem; color: var(--muted); line-height: 1.65; margin: 0; }

  /* ── TECH GRID ── */
  .tech-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px; margin-top: 32px;
  }
  .tech-card {
    background: rgba(68,235,228,0.04);
    border: 1px solid rgba(68,235,228,0.12);
    border-radius: 4px; padding: 20px;
    display: flex; flex-direction: column; gap: 6px;
    transition: background 0.2s, border-color 0.2s;
  }
  .tech-card:hover { background: rgba(68,235,228,0.08); border-color: rgba(68,235,228,0.25); }
  .tech-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem; color: var(--mint); font-weight: 500;
  }
  .tech-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

  /* ── CTA SECTION ── */
  .project-cta-section { padding: 100px 48px; background: var(--deeper); text-align: center; }
  .project-cta-inner {
    margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
  }
  .project-cta-inner p { color: var(--muted); margin-bottom: 8px; }
  .project-cta-inner .project-hero-links { margin-top: 8px; justify-content: center; }

  /* ── RESPONSIVE (project pages) ── */
  @media (max-width: 768px) {
    .page-header { padding: 120px 24px 48px; }
    .projects-list { padding: 32px 24px 80px; }
    .project-hero { padding: 100px 24px 60px; min-height: auto; }
    .project-section { padding: 60px 24px; }
    .project-cta-section { padding: 60px 24px; }
    .project-meta { gap: 24px; }
    .tech-grid { grid-template-columns: 1fr 1fr; }
    .project-hero-links { flex-direction: column; align-items: flex-start; }
    .project-cta-inner .project-hero-links { align-items: center; }
  }
  @media (max-width: 480px) {
    .tech-grid { grid-template-columns: 1fr; }
  }