/* =========================================================
   Parthiv Patel · Portfolio v7
   Visual, less wordy. Animated timeline. Live GitHub projects.
   Warm cream paper · Deep teal · Editorial sans/serif
   ========================================================= */

:root {
  /* Light theme (default) */
  --bg:        #faf8f3;
  --paper:     #fffdf6;
  --surface:   #f4f0e5;
  --surface-2: #ede8d9;
  --border:    #ddd7c9;
  --border-2:  #c4bdad;

  --ink:    #1a1d23;
  --ink-2:  #353941;
  --ink-3:  #6a6e75;
  --ink-4:  #a4a59e;

  --acc:        #0e7c7b;
  --acc-2:      #0a5e5d;
  --acc-3:      #074a49;
  --acc-soft:   #e6f1f0;
  --acc-border: #a8d2cf;
  --acc-tint:   rgba(14,124,123,0.07);

  --live:    #16a34a;
  --warm:    #b45309;

  --shadow-md: 0 16px 36px -16px rgba(28,31,38,0.16);
  --shadow-lg: 0 30px 60px -22px rgba(28,31,38,0.18);
  --color-scheme: light;

  /* Theme-aware nav surfaces (fixes dark-mode header bug) */
  --nav-bg-scrolled: rgba(250,248,243,0.86);
  --nav-bg-menu:     rgba(250,248,243,0.98);

  /* Typography */
  --sans:  "Manrope", "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --max:        1180px;
  --pad-x:      clamp(20px, 5vw, 56px);
  --section-y:  clamp(64px, 9vw, 112px);

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark theme — manual toggle adds .dark on <html> */
:root.dark {
  --bg:        #14171c;
  --paper:     #1c2027;
  --surface:   #20242b;
  --surface-2: #262b33;
  --border:    #2d333d;
  --border-2:  #3a414c;

  --ink:    #ebe9e2;
  --ink-2:  #c8c5bc;
  --ink-3:  #8c8f8a;
  --ink-4:  #5d605b;

  --acc:        #2ed4d3;
  --acc-2:      #1ba097;
  --acc-3:      #178e87;
  --acc-soft:   rgba(46,212,211,0.13);
  --acc-border: rgba(46,212,211,0.32);
  --acc-tint:   rgba(46,212,211,0.10);

  --live:    #4ade80;
  --warm:    #f59e0b;

  --shadow-md: 0 16px 36px -16px rgba(0,0,0,0.5);
  --shadow-lg: 0 30px 60px -22px rgba(0,0,0,0.55);
  --color-scheme: dark;

  --nav-bg-scrolled: rgba(20,23,28,0.85);
  --nav-bg-menu:     rgba(20,23,28,0.97);
}

html { color-scheme: var(--color-scheme); }

/* Smooth theme switch on root surfaces; individual interactive components
   keep their own transitions so they don't feel sluggish */
html, body {
  transition: background-color .25s ease, color .25s ease;
}

/* Pro-grade accessibility: visible focus ring for keyboard users only */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible, .topnav__cta:focus-visible, .theme-toggle:focus-visible {
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--acc); color: #fff; }

.serif  { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }
.italic { font-style: italic; }
.mono   { font-family: var(--mono); }

/* =========================================================
   ATOMS
   ========================================================= */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acc-2);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px;
  background: var(--acc); border-radius: 2px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  border: 1.5px solid transparent;
  transition: transform .2s var(--ease), background .18s, color .18s,
              border-color .18s, box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary { background: var(--acc); color: #fff; border-color: var(--acc); }
.btn--primary:hover {
  background: var(--acc-2); border-color: var(--acc-2);
  box-shadow: 0 8px 22px -8px rgba(14,124,123,0.4);
}
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover {
  background: var(--ink); color: var(--bg);
  box-shadow: 0 8px 22px -8px rgba(28,31,38,0.3);
}

.btn__arrow { transition: transform .2s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(2px); }
.btn:hover .btn__arrow--down { transform: translateY(2px); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Top scroll-progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--acc), var(--acc-2));
  z-index: 200;
  pointer-events: none;
  transition: width .08s linear;
}

/* =========================================================
   TOP NAV
   ========================================================= */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 18px var(--pad-x);
  background: rgba(250,248,243,0);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s, padding .25s var(--ease), backdrop-filter .3s;
}
.topnav.is-scrolled {
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom-color: var(--border);
  padding-top: 12px; padding-bottom: 12px;
}

.topnav__brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--serif); font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex-shrink: 0;
}
.brand__mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ink); color: var(--bg);
  font-family: var(--serif); font-style: italic;
  font-size: 17px;
}

.topnav__links {
  display: flex; align-items: center; gap: 28px;
  font-family: var(--sans);
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
}
.topnav__links a { position: relative; padding: 4px 0; transition: color .18s; }
.topnav__links a:hover { color: var(--acc); }
.topnav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--acc); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.topnav__links a:hover::after { transform: scaleX(1); }

.topnav__cta {
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid var(--ink); color: var(--ink);
  transition: background .18s, color .18s, box-shadow .2s;
}
.topnav__cta:hover {
  background: var(--ink); color: var(--bg);
  box-shadow: 0 6px 18px -6px rgba(28,31,38,0.3);
}

/* Theme toggle button */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1.5px solid var(--border-2);
  display: grid; place-items: center;
  color: var(--ink-2);
  background: transparent;
  transition: border-color .18s, color .18s, background .18s, transform .25s var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--acc);
  color: var(--acc);
  transform: rotate(15deg);
}
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }
:root.dark .theme-toggle .icon-moon { display: block; }
:root.dark .theme-toggle .icon-sun  { display: none; }

.topnav__menu {
  display: none; width: 36px; height: 36px;
  flex-direction: column; justify-content: center; gap: 5px; padding: 8px;
}
.topnav__menu span {
  display: block; height: 1.5px; background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s;
}

@media (max-width: 820px) {
  .topnav__links, .topnav__cta { display: none; }
  .topnav__menu { display: flex; }
  .topnav.is-open .topnav__menu span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .topnav.is-open .topnav__menu span:nth-child(2) { opacity: 0; }
  .topnav.is-open .topnav__menu span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .topnav.is-open .topnav__links {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--nav-bg-menu);
    padding: 22px var(--pad-x) 28px;
    gap: 16px; font-size: 16px;
    border-top: 1px solid var(--border);
  }
}

/* =========================================================
   SECTION FRAME
   ========================================================= */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}
.section__head { margin-bottom: clamp(36px, 5vw, 56px); }
.section__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.section__title em.italic { font-style: italic; color: var(--acc); }
.section__sub {
  margin: 14px 0 0;
  font-size: 16px; line-height: 1.65;
  color: var(--ink-3);
  max-width: 60ch;
}

/* =========================================================
   HERO — short, no clutter
   ========================================================= */
.hero {
  position: relative;
  padding: clamp(112px, 14vh, 162px) var(--pad-x) clamp(56px, 8vw, 88px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at var(--mx, 78%) var(--my, 18%), var(--acc-tint), transparent 50%),
    radial-gradient(circle at 8% 84%, rgba(180,83,9,0.04), transparent 56%);
  pointer-events: none;
  transition: background .25s ease-out;
}

.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero__status {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px 22px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero__status-live {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--acc-2);
  font-weight: 500;
}
.hero__status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(22,163,74,0.5);
  animation: blink 2s ease infinite;
}
@keyframes blink {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.hero__status-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--border-2); }

.hero__title {
  margin: 0 0 22px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero__title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--acc);
  letter-spacing: -0.015em;
}

.hero__lede {
  margin: 0 0 32px;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 56ch;
}
.hero__lede a {
  color: var(--acc); border-bottom: 1px solid var(--acc-border);
  padding-bottom: 1px;
  transition: border-color .18s;
}
.hero__lede a:hover { border-color: var(--acc); }

.hero__ctas {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 32px;
}

.hero__socials {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.hero__social {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-3); letter-spacing: 0.04em;
  transition: color .18s;
}
.hero__social:hover { color: var(--acc); }
.hero__social svg { width: 14px; height: 14px; }
.hero__social-sep { color: var(--border-2); user-select: none; }

/* Hero photo — cycles through artistic SVG filter variants */
.hero__photo { position: relative; margin: 0; }
.hero__photo img {
  width: 100%; height: auto;
  border-radius: var(--r-lg);
  object-fit: cover;
  box-shadow:
    0 1px 0 0 rgba(0,0,0,0.04),
    var(--shadow-lg);
  transition: filter 1.0s ease, box-shadow .3s ease;
}
.hero__photo-caption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
  text-align: center;
  transition: opacity .4s ease;
  min-height: 16px;
}
/* SVG filter defs hidden in viewport, used via filter: url(#id) */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .hero__photo { max-width: 380px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .hero__title { font-size: clamp(36px, 9vw, 56px); }
}

/* =========================================================
   MARQUEE — real coloured logos via Google favicons + Simple Icons
   ========================================================= */
.marquee {
  position: relative;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 22px 0 18px;
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(to right, var(--surface), transparent); }
.marquee::after  { right: 0; background: linear-gradient(to left,  var(--surface), transparent); }

.marquee__label {
  position: absolute; top: 6px; left: var(--pad-x);
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-4); z-index: 3; pointer-events: none;
}

.marquee__track {
  display: inline-flex;
  gap: 38px;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
  align-items: center;
  padding-top: 10px;
}
.marquee__item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--ink-2); letter-spacing: 0.01em;
}
.marquee__item img {
  width: 22px; height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  transition: filter .25s;
}
/* GitHub mark renders pure black; in dark mode lighten it for legibility */
:root.dark .marquee__item img[src*="github/181717"] {
  filter: invert(1) brightness(0.95);
}
.marquee__sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--border-2);
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   TIMELINE — animated, line fills as you scroll
   ========================================================= */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 44px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 12px; bottom: 12px;
  left: 9px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.timeline__fill {
  position: absolute;
  top: 12px;
  left: 9px;
  width: 2px;
  height: 0%;
  background: linear-gradient(180deg, var(--acc) 0%, var(--acc-2) 100%);
  border-radius: 2px;
  transition: height .12s linear;
  z-index: 1;
}

.timeline__item {
  position: relative;
  margin-bottom: 28px;
}
.timeline__item:last-child { margin-bottom: 0; }

.timeline__dot {
  position: absolute;
  top: 14px;
  left: -38px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  background: var(--bg);
  z-index: 2;
  transition: border-color .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.timeline__item.is-in .timeline__dot {
  border-color: var(--acc);
  background: var(--acc);
  box-shadow: 0 0 0 6px var(--acc-soft);
  transform: scale(1.05);
}

.timeline__card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease), opacity .5s var(--ease);
  opacity: 0;
  transform: translateX(-12px);
}
.timeline__item.is-in .timeline__card {
  opacity: 1;
  transform: translateX(0);
}
.timeline__item:hover .timeline__card {
  border-color: var(--acc-border);
  box-shadow: 0 16px 36px -16px rgba(14,124,123,0.15);
}

.timeline__head {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 6px;
}
.timeline__logo {
  width: 28px; height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  background: transparent;
  padding: 0;
  border: 0;
  /* Removes the favicon's white background by multiplying it into the
     cream page, so logos sit naturally on the page in light mode */
  mix-blend-mode: multiply;
  transition: background .2s, padding .2s, border .2s, mix-blend-mode .2s;
}
/* In dark mode, keep a small white tile container so colored marks
   stay legible against the dark page */
:root.dark .timeline__logo {
  background: #fff;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.08);
  mix-blend-mode: normal;
}
.timeline__period {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  flex: 1;
}
.timeline__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acc-2);
  background: var(--acc-soft);
  border: 1px solid var(--acc-border);
  font-weight: 500;
}
.timeline__role {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 4px 0 4px;
}
.timeline__role em { font-style: italic; color: var(--acc); }
.timeline__company {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0 0 12px;
}
.timeline__company strong { color: var(--ink-2); font-weight: 600; }
.timeline__desc {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.timeline__stat {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--acc-2);
  background: var(--acc-soft);
  border: 1px solid var(--acc-border);
  padding: 3px 10px;
  border-radius: 999px;
}

@media (max-width: 540px) {
  .timeline { padding-left: 36px; }
  .timeline::before, .timeline__fill { left: 7px; }
  .timeline__dot { left: -32px; width: 16px; height: 16px; top: 16px; }
}

/* =========================================================
   PROJECTS (live from GitHub)
   ========================================================= */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.project-card {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--r-lg);
  position: relative;
  min-height: 168px;
  transform-style: preserve-3d;
  perspective: 900px;
}
.project-card__inner {
  display: flex; flex-direction: column;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  height: 100%;
  min-height: 168px;
  transition: border-color .2s, box-shadow .25s var(--ease), transform .15s ease-out;
  will-change: transform;
}
.project-card:hover .project-card__inner {
  border-color: var(--acc-border);
  box-shadow: 0 18px 38px -16px rgba(14,124,123,0.22);
}
.project-card__head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.project-card__icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: var(--mono); font-weight: 500;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.project-card__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 24px);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
  flex: 1;
  word-break: break-word;
}
.project-card__desc {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
}
.project-card__meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-3); letter-spacing: 0.04em;
}
.project-card__lang {
  display: inline-flex; align-items: center; gap: 6px;
}
.project-card__lang-dot {
  width: 9px; height: 9px; border-radius: 50%;
  flex-shrink: 0;
}
.project-card__stars { display: inline-flex; align-items: center; gap: 4px; }
.project-card__arrow {
  margin-left: auto;
  color: var(--acc);
  font-size: 16px;
  transition: transform .2s var(--ease);
}
.project-card:hover .project-card__arrow { transform: translate(3px, -3px); }

.projects__loading, .projects__empty {
  grid-column: 1 / -1;
  padding: 30px 28px;
  text-align: center;
  color: var(--ink-4);
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.02em;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
}

.projects__more {
  margin-top: 22px;
  font-family: var(--mono); font-size: 13px;
  color: var(--ink-3);
}
.projects__more a {
  color: var(--acc);
  border-bottom: 1px solid var(--acc-border);
  padding-bottom: 1px;
  transition: border-color .18s;
}
.projects__more a:hover { border-color: var(--acc); }

@media (max-width: 720px) {
  .projects__grid { grid-template-columns: 1fr; }
}

/* =========================================================
   WRITING (featured + footer link)
   ========================================================= */
.post-feature {
  display: block;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--paper);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
  position: relative; overflow: hidden;
}
.post-feature::before {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 320px; height: 320px;
  background: radial-gradient(circle at top right, var(--acc-tint), transparent 60%);
  pointer-events: none;
}
.post-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px -22px rgba(14,124,123,0.22);
  border-color: var(--acc-border);
}
.post-feature__meta {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.06em; color: var(--ink-4);
  margin-bottom: 16px;
}
.post-feature__dot { color: var(--border-2); }
.post-feature__tag { color: var(--acc); }
.post-feature__title {
  margin: 0 0 14px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.08; letter-spacing: -0.025em;
  color: var(--ink);
}
.post-feature__title em { font-style: italic; color: var(--acc); }
.post-feature__excerpt {
  margin: 0 0 22px; font-size: 16.5px;
  line-height: 1.7; color: var(--ink-2); max-width: 64ch;
}
.post-feature__cta {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  color: var(--acc);
  display: inline-flex; align-items: center; gap: 6px;
}
.post-feature__cta .arrow { transition: transform .22s var(--ease); }
.post-feature:hover .post-feature__cta .arrow { transform: translateX(5px); }

.writing__more {
  margin-top: 22px;
  font-family: var(--mono); font-size: 13px;
  color: var(--ink-3);
}
.writing__more a {
  color: var(--acc);
  border-bottom: 1px solid var(--acc-border);
  padding-bottom: 1px;
  transition: border-color .18s;
}
.writing__more a:hover { border-color: var(--acc); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact__inner { max-width: 780px; margin: 0 auto; text-align: center; }
.contact__title {
  margin: 14px 0 16px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.06; letter-spacing: -0.03em;
  color: var(--ink);
}
.contact__title em { font-style: italic; color: var(--acc); }
.contact__sub {
  margin: 0 0 38px;
  font-size: 16px; line-height: 1.65;
  color: var(--ink-2); max-width: 50ch;
  margin-left: auto; margin-right: auto;
}
.contact__list {
  display: grid; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden; text-align: left;
  background: var(--paper);
}
.contact__row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center; gap: 16px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
  transition: background .18s, padding .25s var(--ease);
}
.contact__row:last-child { border-bottom: 0; }
.contact__row:hover { background: var(--surface); padding-left: 32px; }
.contact__k {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-4);
}
.contact__v {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: -0.015em; color: var(--ink);
}
.contact__arrow {
  font-size: 18px; color: var(--acc);
  transition: transform .2s var(--ease);
}
.contact__row:hover .contact__arrow { transform: translate(3px, -3px); }

@media (max-width: 560px) {
  .contact__row { grid-template-columns: 1fr auto; }
  .contact__k { display: none; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 26px var(--pad-x);
}
.footer__inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
}
.footer__name {
  font-family: var(--serif); font-style: italic;
  font-size: 17px; color: var(--ink-2);
}
.footer__meta {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-4); letter-spacing: 0.04em;
}

/* =========================================================
   BLOG INDEX (/blog/index.html)
   ========================================================= */
.blog-index {
  max-width: 820px; margin: 0 auto;
  padding: clamp(110px, 13vh, 150px) var(--pad-x) clamp(80px, 10vw, 120px);
}
.blog-index__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--ink-3); margin-bottom: 36px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.blog-index__back:hover { color: var(--acc); border-bottom-color: var(--acc-border); }

.blog-index__head { margin-bottom: 56px; }
.blog-index__title {
  margin: 0 0 14px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}
.blog-index__title em { font-style: italic; color: var(--acc); }
.blog-index__sub {
  margin: 0; max-width: 56ch;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.65; color: var(--ink-2);
}

.post-list { display: grid; gap: 0; }
.post-list__item {
  display: block;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  transition: padding .25s var(--ease);
}
.post-list__item:last-child { border-bottom: 1px solid var(--border); }
.post-list__item:hover { padding-left: 8px; }

.post-list__meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.06em; color: var(--ink-4);
  align-items: center;
  margin-bottom: 12px;
}
.post-list__dot { color: var(--border-2); }
.post-list__tag { color: var(--acc); }
.post-list__title {
  margin: 0 0 12px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em; line-height: 1.15;
  color: var(--ink);
}
.post-list__title em { font-style: italic; color: var(--acc); }
.post-list__excerpt {
  margin: 0 0 14px;
  font-size: 16px; line-height: 1.7;
  color: var(--ink-2); max-width: 64ch;
}
.post-list__cta {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  color: var(--acc);
  display: inline-flex; align-items: center; gap: 6px;
}
.post-list__cta .arrow { transition: transform .22s var(--ease); }
.post-list__item:hover .post-list__cta .arrow { transform: translateX(5px); }

/* =========================================================
   BLOG ARTICLE
   ========================================================= */
.article {
  max-width: 720px; margin: 0 auto;
  padding: clamp(110px, 13vh, 150px) var(--pad-x) clamp(80px, 10vw, 120px);
}
.article__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--ink-3); margin-bottom: 40px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .18s, border-color .18s;
}
.article__back:hover { color: var(--acc); border-bottom-color: var(--acc-border); }
.article__header {
  margin-bottom: 48px; padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.article__meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.06em; color: var(--ink-4);
  margin-bottom: 18px; align-items: center;
}
.article__tag {
  color: var(--acc); background: var(--acc-soft);
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px;
  border: 1px solid var(--acc-border);
}
.article__title {
  margin: 0 0 18px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.07; letter-spacing: -0.03em;
  color: var(--ink);
}
.article__title em { font-style: italic; color: var(--acc); }
.article__lede {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(18px, 1.9vw, 22px);
  line-height: 1.5; color: var(--ink-2); margin: 0;
}

/* Article hero illustration */
.article__hero {
  margin: 0 0 48px;
  padding: 0;
}
.article__hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.article__hero figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  text-align: center;
}

.prose p, .prose li { font-size: 17.5px; line-height: 1.78; color: var(--ink-2); }
.prose p { margin: 0 0 22px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink); font-style: italic; }
.prose h2 {
  margin: 52px 0 14px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.02em; color: var(--ink);
}
.prose h3 {
  margin: 32px 0 10px;
  font-family: var(--sans); font-weight: 600;
  font-size: 18px; color: var(--ink);
}
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 0; }
.prose ul li { list-style: none; display: flex; align-items: baseline; gap: 10px; margin: 9px 0; }
.prose ul li::before { content: "→"; color: var(--acc); font-family: var(--mono); font-size: 12px; flex-shrink: 0; }
.prose ol { counter-reset: ol; }
.prose ol li { list-style: none; counter-increment: ol; display: flex; gap: 14px; margin: 11px 0; }
.prose ol li::before {
  content: counter(ol) ".";
  color: var(--acc); font-family: var(--mono); font-size: 12px;
  font-weight: 700; flex-shrink: 0; min-width: 22px;
}
.prose blockquote {
  margin: 32px 0; padding: 22px 26px;
  border-left: 3px solid var(--acc);
  background: var(--acc-soft); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--serif); font-size: clamp(18px, 1.9vw, 22px);
  line-height: 1.45; color: var(--ink); font-style: italic;
}
.prose code {
  font-family: var(--mono); font-size: 0.875em;
  background: var(--surface); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px; color: var(--acc-2);
}
.prose hr { margin: 44px auto; width: 60px; border: 0; height: 1.5px; background: var(--border); }

.article__sig {
  margin-top: 60px; padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex; gap: 14px; align-items: center;
}
.article__sig img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.article__sig-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.article__sig-text strong { color: var(--ink); font-weight: 600; }
.article__sig-text a { color: var(--acc); }
