:root {
      --ink:       #0e0d0b;
      --deep:      #151310;
      --card:      #1a1815;
      --border:    #2a2520;
      --muted:     #5a5248;
      --parchment: #c8b89a;
      --gold:      #b8934a;
      --ember:     #c0472a;
      --sage:      #4a7a5a;
      --text:      #e8ddd0;
      --dim:       #8a7d6e;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }

    body {
      background: var(--ink);
      color: var(--text);
      font-family: 'Inter', sans-serif;
      font-weight: 300;
      overflow-x: hidden;
      line-height: 1.6;
    }

    /* ─── NOISE TEXTURE OVERLAY ─── */
    body::before {
      content: '';
      position: fixed; inset: 0; z-index: 0; pointer-events: none;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
      opacity: 0.4;
    }

    * { position: relative; z-index: 1; }

    /* ─── NAV ─── */
    nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 200;
      display: flex; justify-content: space-between; align-items: center;
      padding: 1.4rem 5rem;
      border-bottom: 1px solid var(--border);
      background: rgba(14,13,11,0.92);
      backdrop-filter: blur(12px);
    }
    .nav-logo {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.35rem;
      font-weight: 300;
      letter-spacing: 0.08em;
      color: var(--parchment);
      text-decoration: none;
    }
    .nav-logo span { color: var(--gold); }
    .nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
    .nav-links a {
      font-size: 0.72rem;
      font-weight: 400;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--dim);
      text-decoration: none;
      transition: color 0.2s;
    }
    .nav-links a:hover { color: var(--parchment); }
    .nav-cta {
      padding: 0.5rem 1.2rem;
      border: 1px solid var(--border);
      color: var(--gold) !important;
      border-color: rgba(184,147,74,0.3) !important;
      border-radius: 2px;
      transition: background 0.2s !important;
    }
    .nav-cta:hover { background: rgba(184,147,74,0.08) !important; color: var(--gold) !important; }

    /* ─── HERO ─── */
    .hero {
      min-height: 100vh;
      display: flex; flex-direction: column; justify-content: flex-end;
      padding: 0 5rem 6rem;
      border-bottom: 1px solid var(--border);
      overflow: hidden;
    }
    .hero-bg {
      position: absolute; inset: 0; z-index: 0;
      background:
        radial-gradient(ellipse 80% 60% at 70% 50%, rgba(184,147,74,0.04) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(192,71,42,0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--ink) 0%, var(--deep) 100%);
    }
    .hero-rule {
      width: 48px; height: 1px;
      background: var(--gold);
      margin-bottom: 2rem;
      animation: expand 1.2s ease both 0.3s;
    }
    .hero-eyebrow {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.72rem;
      letter-spacing: 0.2em;
      color: var(--gold);
      margin-bottom: 1.5rem;
      animation: fadeUp 0.8s ease both 0.4s;
    }
    .hero-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: clamp(3.5rem, 7vw, 8rem);
      font-weight: 300;
      line-height: 1.0;
      color: var(--parchment);
      margin-bottom: 1rem;
      animation: fadeUp 0.9s ease both 0.5s;
    }
    .hero-title em {
      font-style: italic;
      color: var(--text);
      opacity: 0.5;
    }
    .hero-sub {
      font-size: 1rem;
      color: var(--dim);
      max-width: 520px;
      margin-bottom: 3rem;
      line-height: 1.8;
      animation: fadeUp 0.9s ease both 0.6s;
    }
    .hero-tags {
      display: flex; gap: 1rem; flex-wrap: wrap;
      animation: fadeUp 0.9s ease both 0.7s;
    }
    .tag {
      font-size: 0.7rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      padding: 0.4rem 0.9rem;
      border: 1px solid var(--border);
      color: var(--muted);
      border-radius: 2px;
    }
    .tag.writing { border-color: rgba(184,147,74,0.3); color: var(--gold); }
    .tag.dev     { border-color: rgba(74,122,90,0.3);  color: var(--sage); }
    .tag.horror  { border-color: rgba(192,71,42,0.3);  color: var(--ember); }

    .hero-scroll {
      position: absolute; bottom: 2.5rem; right: 5rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.65rem; letter-spacing: 0.2em;
      color: var(--muted); text-transform: uppercase;
      writing-mode: vertical-rl;
      display: flex; align-items: center; gap: 0.8rem;
    }
    .hero-scroll::before {
      content: '';
      width: 1px; height: 40px;
      background: var(--border);
    }

    /* ─── SECTIONS BASE ─── */
    section { padding: 6rem 5rem; border-bottom: 1px solid var(--border); }
    .section-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.65rem; letter-spacing: 0.25em;
      text-transform: uppercase; color: var(--muted);
      margin-bottom: 0.8rem;
      display: flex; align-items: center; gap: 1rem;
    }
    .section-label::before {
      content: attr(data-index);
      color: var(--border);
      font-size: 0.6rem;
    }
    .section-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: clamp(2.2rem, 4vw, 3.8rem);
      font-weight: 300;
      line-height: 1.15;
      color: var(--parchment);
      margin-bottom: 3rem;
    }
    .section-title em { font-style: italic; color: var(--dim); }

    /* ─── WRITING SECTION ─── */
    .writing { background: var(--deep); }
    .writing-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5px;
      background: var(--border);
      border: 1px solid var(--border);
    }
    .book-card {
      background: var(--card);
      padding: 2.5rem 2rem;
      transition: background 0.3s;
      cursor: default;
    }
    .book-card:hover { background: #1f1d19; }
    .book-status {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.6rem; letter-spacing: 0.2em;
      text-transform: uppercase;
      margin-bottom: 1.5rem;
      display: flex; align-items: center; gap: 0.5rem;
    }
    .status-dot {
      width: 5px; height: 5px; border-radius: 50%;
      display: inline-block;
    }
    .status-dot.active   { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
    .status-dot.complete { background: var(--sage); }
    .status-dot.wip      { background: var(--ember); opacity: 0.7; }
    .book-genre {
      font-size: 0.68rem; letter-spacing: 0.15em;
      text-transform: uppercase; color: var(--muted);
      margin-bottom: 0.6rem;
    }
    .book-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.6rem; font-weight: 400;
      color: var(--parchment); line-height: 1.2;
      margin-bottom: 0.4rem;
    }
    .book-type {
      font-size: 0.8rem; color: var(--muted);
      margin-bottom: 1.2rem;
    }
    .book-desc {
      font-size: 0.88rem; line-height: 1.8;
      color: var(--dim); margin-bottom: 1.8rem;
    }
    .book-link {
      font-size: 0.7rem; letter-spacing: 0.15em;
      text-transform: uppercase; color: var(--gold);
      text-decoration: none;
      border-bottom: 1px solid rgba(184,147,74,0.3);
      padding-bottom: 2px;
      transition: border-color 0.2s;
    }
    .book-link:hover { border-color: var(--gold); }
    .progress-bar {
      width: 100%;
      height: 8px;
      border-radius: 4px;
      background: var(--border);
      margin-top: 1rem;
      appearance: none;
    }
    .progress-bar::-webkit-progress-bar {
      background: var(--border);
      border-radius: 4px;
    }
    .progress-bar::-webkit-progress-value {
      background: var(--gold);
      border-radius: 4px;
    }
    .progress-bar::-moz-progress-bar {
      background: var(--gold);
      border-radius: 4px;
    }

    /* ─── DEV SECTION ─── */
    .dev-layout {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 4rem;
      align-items: start;
    }
    .skills-block { position: sticky; top: 6rem; }
    .skills-block p {
      font-size: 0.9rem; line-height: 1.9;
      color: var(--dim); margin-bottom: 2rem;
    }
    .skill-group { margin-bottom: 2rem; }
    .skill-group-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.6rem; letter-spacing: 0.2em;
      text-transform: uppercase; color: var(--muted);
      margin-bottom: 0.8rem;
    }
    .skill-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .chip {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.68rem; padding: 0.3rem 0.7rem;
      border: 1px solid var(--border);
      color: var(--dim); border-radius: 2px;
      background: var(--card);
    }
    .chip.highlight { border-color: rgba(74,122,90,0.35); color: var(--sage); }

    .timeline { display: flex; flex-direction: column; gap: 0; }
    .job {
      padding: 2rem 0 2rem 2rem;
      border-left: 1px solid var(--border);
      position: relative;
    }
    .job::before {
      content: '';
      position: absolute; left: -4px; top: 2.4rem;
      width: 7px; height: 7px; border-radius: 50%;
      background: var(--border);
      transition: background 0.3s;
    }
    .job:hover::before { background: var(--gold); }
    .job:first-child::before { background: var(--gold); box-shadow: 0 0 8px rgba(184,147,74,0.4); }
    .job-meta {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.62rem; letter-spacing: 0.15em;
      color: var(--muted); margin-bottom: 0.5rem;
      display: flex; gap: 1rem; flex-wrap: wrap;
    }
    .job-meta .current { color: var(--gold); }
    .job-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.4rem; font-weight: 400;
      color: var(--parchment); margin-bottom: 0.2rem;
    }
    .job-company {
      font-size: 0.8rem; color: var(--muted);
      margin-bottom: 1rem;
    }
    .job-desc {
      font-size: 0.88rem; line-height: 1.85;
      color: var(--dim);
    }

    /* ─── ABOUT / WORDS SECTION ─── */
    .about-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 5rem; align-items: start;
    }
    .about-text p {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.4rem; font-weight: 300; font-style: italic;
      line-height: 1.8; color: var(--dim);
      margin-bottom: 1.8rem;
    }
    .about-text p strong {
      font-style: normal; font-weight: 400;
      color: var(--parchment);
    }
    .about-aside { padding-top: 0.5rem; }
    .aside-block {
      padding: 1.5rem;
      border: 1px solid var(--border);
      background: var(--card);
      margin-bottom: 1.2rem;
      border-radius: 2px;
    }
    .aside-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.6rem; letter-spacing: 0.2em;
      text-transform: uppercase; color: var(--muted);
      margin-bottom: 0.8rem;
    }
    .aside-block a {
      display: block; font-size: 0.85rem;
      color: var(--dim); text-decoration: none;
      padding: 0.3rem 0;
      transition: color 0.2s;
    }
    .aside-block a:hover { color: var(--parchment); }
    .aside-block a::before { content: '↗ '; font-size: 0.7rem; color: var(--gold); }

    /* ─── CONTACT ─── */
    .contact { background: var(--deep); }
    .contact-inner {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6rem; align-items: start;
    }
    .contact-blurb {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.15rem; font-style: italic;
      line-height: 1.9; color: var(--dim);
    }
    .contact-details { display: flex; flex-direction: column; gap: 0; }
    .contact-row {
      display: flex; justify-content: space-between;
      align-items: center;
      padding: 1.2rem 0;
      border-bottom: 1px solid var(--border);
    }
    .contact-row:first-child { border-top: 1px solid var(--border); }
    .contact-row-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.62rem; letter-spacing: 0.18em;
      text-transform: uppercase; color: var(--muted);
    }
    .contact-row a {
      font-size: 0.88rem; color: var(--parchment);
      text-decoration: none; transition: color 0.2s;
    }
    .contact-row a:hover { color: var(--gold); }

    /* ─── FOOTER ─── */
    footer {
      padding: 2rem 5rem;
      display: flex; justify-content: space-between; align-items: center;
      background: var(--ink);
    }
    footer p {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.62rem; letter-spacing: 0.1em;
      color: var(--border);
    }
    .footer-sig {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.1rem; font-style: italic;
      color: var(--muted);
    }

    /* ─── ANIMATIONS ─── */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes expand {
      from { width: 0; }
      to   { width: 48px; }
    }

    .reveal {
      opacity: 0; transform: translateY(18px);
      transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.visible { opacity: 1; transform: none; }

    /* ─── RESPONSIVE ─── */
    @media (max-width: 960px) {
      nav { padding: 1rem 2rem; }
      .hero { padding: 0 2rem 5rem; }
      section { padding: 4rem 2rem; }
      .writing-grid { grid-template-columns: 1fr; }
      .dev-layout { grid-template-columns: 1fr; }
      .skills-block { position: static; }
      .about-grid { grid-template-columns: 1fr; gap: 3rem; }
      .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
      footer { flex-direction: column; gap: 0.8rem; text-align: center; padding: 2rem; }
      .nav-links { display: none; }
    }
