@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300;1,9..144,400&family=Epilogue:wght@300;400;500&family=JetBrains+Mono:wght@400;500&display=swap');
    

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

    :root {
      --cream: #F5F0E8;
      --ink: #1A1612;
      --ink-muted: #5C5650;
      --accent: #C45C2A;
      --accent-soft: #E8A882;
      --accent-pale: #F5E0D3;
      --rule: #D8D0C4;
      --mono-bg: #EDE8DF;
      --serif: 'Fraunces', Georgia, serif;
      --sans: 'Epilogue', sans-serif;
      --mono: 'JetBrains Mono', monospace;
    }

    html { scroll-behavior: smooth; }

    body {
      background: var(--cream);
      color: var(--ink);
      font-family: var(--sans);
      font-weight: 300;
      line-height: 1.65;
      cursor: none;
    }

    /* Custom cursor */
    .cursor {
      position: fixed;
      width: 10px; height: 10px;
      background: var(--accent);
      border-radius: 50%;
      pointer-events: none;
      z-index: 9999;
      transition: transform 0.15s ease, opacity 0.2s;
      transform: translate(-50%, -50%);
    }
    .cursor-ring {
      position: fixed;
      width: 32px; height: 32px;
      border: 1.5px solid var(--accent);
      border-radius: 50%;
      pointer-events: none;
      z-index: 9998;
      transform: translate(-50%, -50%);
      transition: left 0.08s ease, top 0.08s ease, transform 0.2s ease, opacity 0.2s;
      opacity: 0.5;
    }

    /* Grain overlay */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      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");
      pointer-events: none;
      z-index: 9990;
      opacity: 0.4;
    }

    /* Scroll fade-in */
    .reveal {
      opacity: 0;
      transform: translateY(28px);
      transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.visible {
      opacity: 1;
      transform: none;
    }

    /* Nav */
    nav {
      position: fixed; top: 0; left: 0; right: 0;
      z-index: 100;
      display: flex; align-items: center; justify-content: space-between;
      padding: 1.25rem 4rem;
      background: rgba(245, 240, 232, 0.88);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--rule);
    }
    .nav-logo {
      font-family: var(--serif);
      font-size: 1.2rem;
      font-weight: 600;
      color: var(--ink);
      text-decoration: none;
      letter-spacing: -0.02em;
    }
    .nav-links {
      display: flex; gap: 2.5rem; list-style: none;
    }
    .nav-links a {
      font-family: var(--mono);
      font-size: 0.72rem;
      text-decoration: none;
      color: var(--ink-muted);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      transition: color 0.2s;
    }
    .nav-links a:hover { color: var(--accent); }

    /* Hamburger button */
    .hamburger {
      display: none;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
      z-index: 200;
    }
    .hamburger span {
      display: block;
      width: 22px;
      height: 1.5px;
      background: var(--ink);
      transition: transform 0.3s ease, opacity 0.3s ease;
      transform-origin: center;
    }
    .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 nav drawer */
    .nav-drawer {
      display: none;
      position: fixed;
      top: 57px; left: 0; right: 0;
      background: rgba(245, 240, 232, 0.97);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--rule);
      flex-direction: column;
      padding: 1.5rem 1.5rem;
      gap: 0;
      z-index: 99;
      transform: translateY(-10px);
      opacity: 0;
      transition: transform 0.25s ease, opacity 0.25s ease;
    }
    .nav-drawer.open {
      transform: translateY(0);
      opacity: 1;
    }
    .nav-drawer li {
      list-style: none;
      border-bottom: 1px solid var(--rule);
    }
    .nav-drawer li:last-child { border-bottom: none; }
    .nav-drawer a {
      display: block;
      padding: 1rem 0;
      font-family: var(--mono);
      font-size: 0.78rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      text-decoration: none;
      color: var(--ink);
      transition: color 0.2s;
    }
    .nav-drawer a:hover { color: var(--accent); }

    @media (max-width: 768px) {
      .nav-links { display: none; }
      .hamburger { display: flex; }
      .nav-drawer { display: flex; }
      nav { padding: 1rem 1.25rem; }
    }

    /* Main layout */
    main { padding-top: 80px; }

    section {
      padding: 7rem 4rem;
      max-width: 1100px;
      margin: 0 auto;
    }

    /* Section label */
    .section-label {
      font-family: var(--mono);
      font-size: 0.68rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 1rem;
      display: flex; align-items: center; gap: 0.75rem;
    }
    .section-label::after {
      content: '';
      flex: 1;
      max-width: 48px;
      height: 1px;
      background: var(--accent-soft);
    }

    /* Divider */
    .section-divider {
      border: none;
      border-top: 1px solid var(--rule);
      max-width: 1100px;
      margin: 0 auto;
    }

    /* ── HERO ── */
    #hero {
      min-height: calc(100vh - 80px);
      display: grid;
      grid-template-columns: 1fr 1fr;
      align-items: center;
      gap: 4rem;
      padding-top: 6rem;
    }
    .hero-text h1 {
      font-family: var(--serif);
      font-size: clamp(3rem, 6vw, 5.5rem);
      font-weight: 300;
      line-height: 1.05;
      letter-spacing: -0.03em;
      margin-bottom: 1.5rem;
    }
    .hero-text h1 em {
      font-style: italic;
      color: var(--accent);
    }
    .hero-tagline {
      font-size: 1rem;
      color: var(--ink-muted);
      max-width: 420px;
      line-height: 1.75;
      margin-bottom: 2.5rem;
    }
    .hero-ctas {
      display: flex; gap: 1rem; flex-wrap: wrap;
    }
    .btn-primary {
      background: var(--ink);
      color: var(--cream);
      padding: 0.75rem 1.75rem;
      font-family: var(--mono);
      font-size: 0.72rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      text-decoration: none;
      border: 1.5px solid var(--ink);
      transition: background 0.2s, color 0.2s;
    }
    .btn-primary:hover {
      background: var(--accent);
      border-color: var(--accent);
    }
    .btn-ghost {
      background: transparent;
      color: var(--ink);
      padding: 0.75rem 1.75rem;
      font-family: var(--mono);
      font-size: 0.72rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      text-decoration: none;
      border: 1.5px solid var(--rule);
      transition: border-color 0.2s, color 0.2s;
    }
    .btn-ghost:hover {
      border-color: var(--ink);
      color: var(--ink);
    }
    .hero-aside {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 1.5rem;
    }
    .hero-stat-block {
      border: 1px solid var(--rule);
      padding: 2rem;
      width: 100%;
      max-width: 340px;
      background: white;
      position: relative;
    }
    .hero-stat-block::before {
      content: '';
      position: absolute;
      top: -1px; left: 2rem;
      width: 48px; height: 3px;
      background: var(--accent);
    }
    .stat-row {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      padding: 0.6rem 0;
      border-bottom: 1px solid var(--rule);
    }
    .stat-row:last-child { border-bottom: none; }
    .stat-label {
      font-family: var(--mono);
      font-size: 0.65rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ink-muted);
    }
    .stat-value {
      font-family: var(--serif);
      font-size: 1.1rem;
      font-weight: 400;
      color: var(--ink);
      text-align: right;
    }
    .availability-badge {
      font-family: var(--mono);
      font-size: 0.65rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--accent);
      display: flex; align-items: center; gap: 0.5rem;
    }
    .availability-badge::before {
      content: '';
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--accent);
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.3; }
    }

    /* ── PROJECTS ── */
    #projects h2 {
      font-family: var(--serif);
      font-size: clamp(2rem, 4vw, 3rem);
      font-weight: 300;
      letter-spacing: -0.02em;
      margin-bottom: 0.5rem;
    }
    #projects .section-intro {
      color: var(--ink-muted);
      max-width: 560px;
      margin-bottom: 3.5rem;
    }
    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 1.5px;
      background: var(--rule);
      border: 1.5px solid var(--rule);
    }
    .project-card {
      background: var(--cream);
      padding: 2rem;
      position: relative;
      overflow: hidden;
      transition: background 0.25s;
    }
    .project-card:hover { background: white; }
    .project-card::after {
      content: '';
      position: absolute;
      bottom: 0; left: 0;
      width: 0; height: 2px;
      background: var(--accent);
      transition: width 0.35s ease;
    }
    .project-card:hover::after { width: 100%; }
    .project-number {
      font-family: var(--mono);
      font-size: 0.6rem;
      color: var(--ink-muted);
      letter-spacing: 0.1em;
      margin-bottom: 1rem;
      opacity: 0.5;
    }
    .project-name {
      font-family: var(--serif);
      font-size: 1.3rem;
      font-weight: 400;
      margin-bottom: 0.5rem;
      letter-spacing: -0.01em;
    }
    .project-desc {
      font-size: 0.875rem;
      color: var(--ink-muted);
      line-height: 1.65;
      margin-bottom: 1.25rem;
    }
    .project-tags {
      display: flex; flex-wrap: wrap; gap: 0.4rem;
      margin-bottom: 1.25rem;
    }
    .tag {
      font-family: var(--mono);
      font-size: 0.62rem;
      letter-spacing: 0.06em;
      background: var(--mono-bg);
      color: var(--ink-muted);
      padding: 0.2rem 0.6rem;
      border-radius: 2px;
    }
    .project-link {
      font-family: var(--mono);
      font-size: 0.68rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--accent);
      text-decoration: none;
      display: inline-flex; align-items: center; gap: 0.4rem;
    }
    .project-link:hover { text-decoration: underline; }
    .project-link-arrow { font-size: 0.9rem; }

    /* ── LEARNING ── */
    #learning {
      background: var(--ink);
      color: var(--cream);
      max-width: 100%;
      padding: 7rem 4rem;
    }
    #learning > div {
      max-width: 1100px;
      margin: 0 auto;
    }
    #learning .section-label { color: var(--accent-soft); }
    #learning .section-label::after { background: var(--accent-soft); opacity: 0.3; }
    #learning h2 {
      font-family: var(--serif);
      font-size: clamp(2rem, 4vw, 3rem);
      font-weight: 300;
      letter-spacing: -0.02em;
      margin-bottom: 0.5rem;
      color: var(--cream);
    }
    #learning .section-intro {
      color: rgba(245,240,232,0.5);
      max-width: 560px;
      margin-bottom: 3.5rem;
    }
    .learning-list {
      display: flex;
      flex-direction: column;
      gap: 0;
      border: 1px solid rgba(245,240,232,0.1);
    }
    .learning-item {
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: start;
      padding: 1.75rem 2rem;
      border-bottom: 1px solid rgba(245,240,232,0.08);
      gap: 2rem;
      transition: background 0.2s;
    }
    .learning-item:last-child { border-bottom: none; }
    .learning-item:hover { background: rgba(245,240,232,0.04); }
    .learning-topic {
      font-family: var(--serif);
      font-size: 1.15rem;
      font-weight: 400;
      color: var(--cream);
      margin-bottom: 0.3rem;
      letter-spacing: -0.01em;
    }
    .learning-desc {
      font-size: 0.85rem;
      color: rgba(245,240,232,0.5);
      line-height: 1.6;
    }
    .learning-depth {
      font-family: var(--mono);
      font-size: 0.62rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 0.25rem 0.7rem;
      border-radius: 2px;
      white-space: nowrap;
      margin-top: 0.15rem;
    }
    .depth-docs {
      background: rgba(196,92,42,0.15);
      color: var(--accent-soft);
      border: 1px solid rgba(196,92,42,0.3);
    }
    .depth-building {
      background: rgba(245,240,232,0.08);
      color: rgba(245,240,232,0.6);
      border: 1px solid rgba(245,240,232,0.15);
    }
    .depth-deployed {
      background: rgba(100,180,120,0.12);
      color: #8ecfa0;
      border: 1px solid rgba(100,180,120,0.25);
    }

    /* ── WRITING ── */
    .writing-section h1,
    .writing-section h2 {
      font-family: var(--serif);
      font-size: clamp(2rem, 4vw, 3rem);
      font-weight: 300;
      letter-spacing: -0.02em;
      margin-bottom: 0.5rem;
    }
    .writing-section .section-intro {
      color: var(--ink-muted);
      max-width: 560px;
      margin-bottom: 3.5rem;
    }
    .writing-archive {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 1.25rem;
    }
    .writing-archive-link {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-family: var(--mono);
      font-size: 0.68rem;
      letter-spacing: 0.08em;
      color: var(--accent);
      text-decoration: none;
    }
    .writing-archive-link span {
      transition: transform 0.2s;
    }
    .writing-archive-link:hover {
      text-decoration: underline;
    }
    .writing-archive-link:hover span {
      transform: translateX(4px);
    }
    .writing-list {
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .writing-item {
      display: grid;
      grid-template-columns: 120px 1fr auto;
      align-items: baseline;
      gap: 2rem;
      padding: 1.75rem 0;
      border-bottom: 1px solid var(--rule);
      text-decoration: none;
      color: inherit;
      transition: all 0.2s;
    }
    .writing-item:first-child { border-top: 1px solid var(--rule); }
    .writing-item:hover .writing-title { color: var(--accent); }
    .writing-date {
      font-family: var(--mono);
      font-size: 0.65rem;
      letter-spacing: 0.06em;
      color: var(--ink-muted);
      padding-top: 0.15rem;
    }
    .writing-title {
      font-family: var(--serif);
      font-size: 1.2rem;
      font-weight: 400;
      letter-spacing: -0.01em;
      transition: color 0.2s;
      margin-bottom: 0.25rem;
    }
    .writing-excerpt {
      font-size: 0.82rem;
      color: var(--ink-muted);
    }
    .writing-arrow {
      font-family: var(--mono);
      font-size: 0.9rem;
      color: var(--ink-muted);
      transition: color 0.2s, transform 0.2s;
    }
    .writing-item:hover .writing-arrow {
      color: var(--accent);
      transform: translateX(4px);
    }

    /* ── POST ── */
    .post {
      max-width: 720px;
      /* Vertical longhand only: horizontal padding stays on the base
         section rule so it tracks the responsive breakpoints. */
      padding-top: 5rem;
      padding-bottom: 7rem;
    }
    .post-header {
      border-bottom: 1px solid var(--rule);
      padding-bottom: 1.5rem;
      margin-bottom: 2.5rem;
    }
    .post-title {
      font-family: var(--serif);
      font-size: clamp(2rem, 4vw, 2.75rem);
      font-weight: 300;
      line-height: 1.15;
      letter-spacing: -0.02em;
      margin-bottom: 0.75rem;
    }
    .post-date {
      font-family: var(--mono);
      font-size: 0.65rem;
      letter-spacing: 0.06em;
      color: var(--ink-muted);
    }
    .post-body h1,
    .post-body h2,
    .post-body h3,
    .post-body h4 {
      font-family: var(--serif);
      font-weight: 400;
      letter-spacing: -0.01em;
      margin-top: 2.5rem;
      margin-bottom: 0.75rem;
    }
    .post-body h1 { font-size: 1.8rem; }
    .post-body h2 { font-size: 1.5rem; }
    .post-body h3 { font-size: 1.2rem; }
    .post-body h4 { font-size: 1rem; }
    .post-body > :first-child { margin-top: 0; }
    .post-body p { margin-bottom: 1.25rem; }
    .post-body ul,
    .post-body ol {
      padding-left: 1.5rem;
      margin-bottom: 1.25rem;
    }
    .post-body li { margin-bottom: 0.4rem; }
    .post-body a {
      color: var(--accent);
      text-decoration: underline;
      transition: opacity 0.2s;
    }
    .post-body a:hover { opacity: 0.7; }
    .post-body strong {
      font-weight: 500;
      color: var(--ink);
    }
    .post-body blockquote {
      border-left: 3px solid var(--accent-soft);
      background: white;
      padding: 1rem 1.25rem;
      margin: 1.5rem 0;
    }
    .post-body blockquote > :last-child { margin-bottom: 0; }
    .post-body code {
      font-family: var(--mono);
      font-size: 0.85em;
      background: var(--mono-bg);
      padding: 0.1em 0.4em;
      border-radius: 2px;
    }
    /* Colors stay with the Shiki theme (catppuccin-latte); only the
       frame around the code block is styled here. */
    .post-body pre {
      overflow-x: auto;
      padding: 1.25rem 1.5rem;
      border: 1px solid var(--rule);
      border-radius: 3px;
      font-size: 0.85rem;
      line-height: 1.6;
      margin: 1.5rem 0;
    }
    .post-body pre code {
      background: none;
      padding: 0;
      font-size: inherit;
    }
    .post-body img {
      max-width: 100%;
      height: auto;
    }
    .post-body hr {
      border: none;
      border-top: 1px solid var(--rule);
      margin: 2rem 0;
    }
    .post-body table {
      display: block;
      overflow-x: auto;
      font-size: 0.85rem;
      margin: 1.5rem 0;
    }
    .post-body th,
    .post-body td {
      border: 1px solid var(--rule);
      padding: 0.5rem 0.75rem;
      text-align: left;
    }

    /* ── ABOUT ── */
    #about h2 {
      font-family: var(--serif);
      font-size: clamp(2rem, 4vw, 3rem);
      font-weight: 300;
      letter-spacing: -0.02em;
      margin-bottom: 1.5rem;
    }
    .about-bio {
      font-size: 0.95rem;
      color: var(--ink-muted);
      line-height: 1.8;
      margin-bottom: 2.5rem;
    }
    .about-bio strong {
      color: var(--ink);
      font-weight: 500;
    }
    .about-links {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }
    .about-link {
      font-family: var(--mono);
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ink);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      transition: color 0.2s;
    }
    .about-link:hover { color: var(--accent); }
    .about-link-icon { opacity: 0.5; font-size: 0.9rem; }
    .contact-block {
      border: 1px solid var(--rule);
      padding: 2.5rem;
      background: white;
      position: relative;
    }
    .contact-block::before {
      content: '';
      position: absolute;
      top: -1px; right: 2rem;
      width: 48px; height: 3px;
      background: var(--accent);
    }
    .contact-heading {
      font-family: var(--serif);
      font-size: 1.5rem;
      font-weight: 300;
      letter-spacing: -0.02em;
      margin-bottom: 0.75rem;
    }
    .contact-text {
      font-size: 0.875rem;
      color: var(--ink-muted);
      line-height: 1.7;
      margin-bottom: 2rem;
    }
    .contact-email {
      font-family: var(--serif);
      font-size: 1.1rem;
      font-style: italic;
      color: var(--accent);
      text-decoration: none;
      display: block;
      margin-bottom: 1.5rem;
      transition: opacity 0.2s;
    }
    .contact-email:hover { opacity: 0.7; }

    /* Footer */
    footer {
      border-top: 1px solid var(--rule);
      padding: 2rem 4rem;
      max-width: 1100px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .footer-copy {
      font-family: var(--mono);
      font-size: 0.65rem;
      letter-spacing: 0.06em;
      color: var(--ink-muted);
    }
    .footer-back {
      font-family: var(--mono);
      font-size: 0.65rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ink-muted);
      text-decoration: none;
      transition: color 0.2s;
    }
    .footer-back:hover { color: var(--accent); }

    /* ── RESPONSIVE ── */

    /* Prevent horizontal overflow globally */
    html, body { overflow-x: hidden; }

    @media (max-width: 1024px) {
      nav { padding: 1rem 2rem; }
      section { padding: 5rem 2rem; }
      #hero { gap: 2.5rem; }
      #about { gap: 3rem; }
      #learning { padding: 5rem 2rem; }
      footer { padding: 2rem; }
    }

    @media (max-width: 768px) {
      /* Nav */
      nav { padding: 1rem 1.25rem; }
      .nav-links { gap: 1.25rem; }
      .nav-links a { font-size: 0.65rem; }

      /* Sections */
      section { padding: 4rem 1.25rem; }
      #learning { padding: 4rem 1.25rem; }
      #learning > div { max-width: 100%; }

      /* Hero */
      #hero {
        grid-template-columns: 1fr;
        padding-top: 3rem;
        gap: 2rem;
      }
      .hero-aside { align-items: stretch; }
      .hero-stat-block { max-width: 100%; }

      /* Projects */
      .projects-grid { grid-template-columns: 1fr; }

      /* Learning */
      .learning-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
      }
      .learning-depth { align-self: flex-start; }

      /* Writing */
      .writing-item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
      }
      .writing-arrow { display: none; }

      /* Post */
      .post {
        padding-top: 3.5rem;
        padding-bottom: 4.5rem;
      }
      .post-body h1 { font-size: 1.6rem; }
      .post-body h2 { font-size: 1.35rem; }
      .post-body h3 { font-size: 1.1rem; }
      .post-body h4 { font-size: 0.95rem; }
      .post-body pre {
        font-size: 0.8rem;
        padding: 1rem;
      }

      /* About + Contact */
      .contact-block { padding: 1.75rem; }
      .contact-email { font-size: 0.95rem; word-break: break-all; }

      /* Footer */
      footer {
        padding: 1.5rem 1.25rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
      }
    }

    @media (max-width: 480px) {
      .nav-links { gap: 0.85rem; }
      .nav-links a { font-size: 0.6rem; letter-spacing: 0.04em; }
      .hero-text h1 { font-size: 2.4rem; }
      .hero-ctas { flex-direction: column; }
      .btn-primary, .btn-ghost { text-align: center; }
      .hero-stat-block { padding: 1.25rem; }
      .project-card { padding: 1.5rem; }
      .contact-block { padding: 1.25rem; }
    }
  
