/* ══════════════════════════════════════════
   DESIGN TOKENS
═════════════════════════════════════════ */
:root {
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  /* Core palette */
  --ink: #0d0d0d;
  --ink-2: #1c1c1c;
  --ink-3: #2e2e2e;
  --muted: #5c5c5c;
  --subtle: #9a9a9a;
  --ghost: #c8c8c8;
  --divider: #e8e8e8;
  --surface: #f6f5f2;
  --surface-2: #eeecea;
  --bg: #fafaf8;
  --white: #ffffff;

  /* Accent — warm amber-green */
  --accent: #1d7a4e;
  --accent-2: #155e3b;
  --accent-light: #e8f5ef;
  --accent-glow: rgba(29,122,78,0.12);

  /* Highlight color */
  --highlight: #f0e86a;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl: 0 32px 80px rgba(0,0,0,0.14), 0 8px 24px rgba(0,0,0,0.06);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 9999px;

  /* Layout */
  --nav-h: 64px;
  --max-prose: 740px;
  --max-wide: 1140px;
  --sidebar-w: 280px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ══════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
p { text-wrap: pretty; }
::selection { background: var(--highlight); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--divider); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--ghost); }

/* ══════════════════════════════════════════
   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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: 256px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ══════════════════════════════════════════
   PAGE TRANSITIONS
══════════════════════════════════════════ */
.page { display: none; }
.page.active {
  display: block;
  animation: pageIn 0.35s var(--ease-out) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  animation: staggerFade 0.4s var(--ease-out) forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.40s; }
.stagger > *:nth-child(9) { animation-delay: 0.45s; }
@keyframes staggerFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex; align-items: center;
  padding: 0 40px;
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
#site-nav.scrolled {
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(16px) saturate(200%);
  border-bottom-color: var(--divider);
  box-shadow: 0 1px 0 var(--divider);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.2px;
  cursor: pointer;
  color: var(--ink);
  transition: opacity 0.15s;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-logo:hover { opacity: 0.7; }
.nav-logo-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 2px;
  transform: translateY(-4px);
}

.nav-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-pill);
  padding: 4px;
  transition: box-shadow 0.2s;
}
.nav-center:hover { box-shadow: var(--shadow-sm); }

.nav-pill-btn {
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 6px 16px; border-radius: var(--r-pill);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.01em;
  cursor: pointer; border: none; background: none; font-family: inherit;
  white-space: nowrap;
}
.nav-pill-btn:hover { color: var(--ink); background: var(--white); }
.nav-pill-btn.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-xs); font-weight: 500; }

.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.nav-icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; transition: color 0.15s, background 0.15s;
  border: none; background: none; font-family: inherit;
}
.nav-icon-btn:hover { color: var(--ink); background: var(--surface); }

.nav-cta-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.01em;
  color: var(--white);
  background: var(--ink);
  padding: 8px 18px; border-radius: var(--r-pill);
  transition: background 0.18s, transform 0.15s;
  cursor: pointer; border: none; font-family: inherit;
}
.nav-cta-btn:hover { background: var(--accent); transform: translateY(-1px); }
.nav-cta-btn:active { transform: translateY(0); }

/* Mobile nav */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 6px; margin-left: auto;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.nav-hamburger:hover { background: var(--surface); }
.nav-hamburger span { display: block; width: 20px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: all 0.25s var(--ease-out); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 99;
  padding: 32px 24px;
  flex-direction: column; gap: 8px;
  animation: slideDown 0.25s var(--ease-out) both;
}
.mobile-menu.open { display: flex; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-menu-item {
  font-family: var(--font-display); font-size: 32px;
  color: var(--ink); cursor: pointer;
  padding: 8px 0; border-bottom: 1px solid var(--divider);
  transition: color 0.15s, padding-left 0.2s var(--ease-out);
  display: block; background: none; border-left: none; border-right: none; border-top: none;
  text-align: left; font-family: var(--font-display);
}
.mobile-menu-item:hover { color: var(--accent); padding-left: 8px; }
.mobile-menu-contact {
  margin-top: auto;
  font-size: 14px; color: var(--muted);
}

/* Search overlay */
.search-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(13,13,13,0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: flex-start; justify-content: center;
  padding-top: 120px;
}
.search-overlay.open { display: flex; animation: fadeIn 0.2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.search-box {
  width: 100%; max-width: 600px; margin: 0 24px;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.search-box-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--divider);
}
.search-box-input-wrap svg { color: var(--subtle); flex-shrink: 0; }
.search-box-input {
  flex: 1; font-family: var(--font-body); font-size: 17px;
  color: var(--ink); border: none; outline: none; background: transparent;
}
.search-box-input::placeholder { color: var(--ghost); }
.search-esc { font-size: 11px; color: var(--subtle); border: 1px solid var(--divider); padding: 3px 7px; border-radius: 4px; flex-shrink: 0; }
.search-results-drop { max-height: 420px; overflow-y: auto; }
.search-drop-item {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 20px; cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--divider);
}
.search-drop-item:last-child { border-bottom: none; }
.search-drop-item:hover { background: var(--surface); }
.search-drop-type { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subtle); flex-shrink: 0; width: 48px; }
.search-drop-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.search-drop-excerpt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.search-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* Reading progress */
#reading-progress {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #4abe82);
  z-index: 99;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.08s linear;
  pointer-events: none;
  opacity: 0;
}
#reading-progress.visible { opacity: 1; }

/* ══════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════ */
#app { padding-top: var(--nav-h); min-height: 100vh; }

/* ══════════════════════════════════════════
   TYPOGRAPHY HELPERS
══════════════════════════════════════════ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow-line {
  display: block; width: 20px; height: 1px; background: currentColor; border-radius: 1px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 400; letter-spacing: -0.3px; color: var(--ink);
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.01em; cursor: pointer; border: none;
  transition: all 0.18s var(--ease-out);
  white-space: nowrap;
  border-radius: var(--r-pill);
}
.btn-dark {
  background: var(--ink); color: var(--white);
  padding: 12px 26px;
}
.btn-dark:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-dark:active { transform: translateY(0); box-shadow: none; }
.btn-outline {
  background: transparent; color: var(--ink);
  padding: 11px 24px;
  border: 1px solid var(--divider);
}
.btn-outline:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--muted);
  padding: 10px 0;
  border-radius: 0;
  border-bottom: 1px solid transparent;
}
.btn-ghost:hover { color: var(--ink); border-bottom-color: var(--ink); }
.btn-accent {
  background: var(--accent); color: var(--white);
  padding: 12px 26px;
}
.btn-accent:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-glow); }

.btn svg { flex-shrink: 0; }

/* ══════════════════════════════════════════
   TAGS & BADGES
══════════════════════════════════════════ */
.tag {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-light);
  padding: 3px 9px; border-radius: var(--r-pill);
  cursor: pointer; border: none; font-family: inherit;
  transition: background 0.12s, color 0.12s;
}
.tag:hover { background: var(--accent); color: var(--white); }

/* ══════════════════════════════════════════
   HOME — HERO
══════════════════════════════════════════ */
.home-hero {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 100px 40px 88px;
  border-bottom: 1px solid var(--divider);
  position: relative;
}

/* Decorative orbs */
.hero-orb {
  position: absolute; pointer-events: none; border-radius: 50%;
  filter: blur(80px); opacity: 0.25;
}
.hero-orb-1 {
  width: 480px; height: 480px;
  right: -160px; top: -80px;
  background: radial-gradient(circle, #a3f0c8, transparent);
}
.hero-orb-2 {
  width: 320px; height: 320px;
  left: -80px; bottom: 0;
  background: radial-gradient(circle, #f0e86a, transparent);
}

.hero-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  background: var(--white); border: 1px solid var(--divider);
  padding: 6px 14px; border-radius: var(--r-pill);
  margin-bottom: 36px;
  box-shadow: var(--shadow-xs);
  cursor: default;
}
.hero-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  position: relative;
}
.hero-status-dot::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: rgba(34,197,94,0.3);
  animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes ping {
  0%   { transform: scale(0.8); opacity: 1; }
  75%, 100% { transform: scale(1.8); opacity: 0; }
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 68px);
  font-weight: 400;
  line-height: 1.10;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 28px;
}
.hero-h1 em {
  font-style: italic;
  color: var(--accent);
  position: relative;
  display: inline;
}
.hero-h1 em::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  opacity: 0.5;
}

.hero-bio {
  font-size: 18px; font-weight: 300; line-height: 1.8;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 44px;
}
.hero-bio strong { font-weight: 500; color: var(--ink-3); }

.hero-actions {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  margin-bottom: 56px;
}

.hero-meta {
  display: flex; gap: 32px; flex-wrap: wrap;
  padding-top: 48px;
  border-top: 1px solid var(--divider);
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num {
  font-family: var(--font-display); font-size: 28px;
  font-weight: 400; color: var(--ink); letter-spacing: -0.5px;
}
.hero-stat-label { font-size: 12px; color: var(--muted); }

/* ══════════════════════════════════════════
   HOME — SECTIONS
══════════════════════════════════════════ */
.home-section {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 80px 40px;
}
.home-section + .home-section { border-top: 1px solid var(--divider); }

.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 48px; gap: 16px;
  flex-wrap: wrap;
}
.section-header-left { display: flex; flex-direction: column; gap: 10px; }
.section-more-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.03em;
  color: var(--muted); cursor: pointer;
  padding-bottom: 2px; border-bottom: 1px solid var(--divider);
  transition: color 0.12s, border-color 0.12s, gap 0.18s var(--ease-out);
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: inherit;
}
.section-more-link:hover { color: var(--ink); border-bottom-color: var(--ink); gap: 10px; }

/* ══════════════════════════════════════════
   PROJECT CARDS
══════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.projects-grid.two-col { grid-template-columns: repeat(2, 1fr); }

.project-card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out), border-color 0.2s;
  display: flex; flex-direction: column;
  position: relative;
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.project-card:hover .project-card-arrow { opacity: 1; transform: translate(0, 0); }

.project-card-visual {
  width: 100%; aspect-ratio: 16/9;
  background: var(--surface);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.project-card-visual-pattern {
  position: absolute; inset: 0;
  opacity: 0.06;
}
.project-card-visual-icon {
  width: 48px; height: 48px;
  border-radius: var(--r);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  font-size: 22px;
}

.project-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 0; }
.project-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px;
  max-height: 48px;
  overflow: hidden;
  position: relative;
}
.project-card-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 400;
  line-height: 1.3; letter-spacing: -0.2px; margin-bottom: 8px;
  color: var(--ink);
}
.project-card-desc {
  font-size: 13.5px; color: var(--muted); line-height: 1.7;
  margin-bottom: 20px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}
.project-card-links { display: flex; gap: 12px; }
.project-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  transition: color 0.12s;
}
.project-link:hover { color: var(--accent); }
.project-card-arrow {
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.2s, transform 0.2s var(--ease-out), background 0.15s;
  flex-shrink: 0;
}
.project-card:hover .project-card-arrow { background: var(--accent); color: var(--white); }

/* Visual color variants */
.vc-emerald { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.vc-blue    { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.vc-violet  { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }
.vc-amber   { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.vc-rose    { background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%); }
.vc-teal    { background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%); }
.vc-slate   { background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); }
.vc-orange  { background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); }
.vc-indigo  { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }

/* ══════════════════════════════════════════
   BLOG ITEMS (home list)
══════════════════════════════════════════ */
.blog-list { display: flex; flex-direction: column; }
.blog-item {
  display: grid; grid-template-columns: 1fr 96px;
  gap: 24px; align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  transition: opacity 0.15s;
  position: relative;
}
.blog-item:first-child { border-top: 1px solid var(--divider); }
.blog-item::after {
  content: '';
  position: absolute; left: -20px; right: -20px; top: 0; bottom: 0;
  border-radius: var(--r);
  background: var(--surface);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: -1;
}
.blog-item:hover::after { opacity: 1; }
.blog-item:hover { opacity: 1; }
.blog-item:hover .blog-item-title { color: var(--accent); }

.blog-item-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.blog-item-cat {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
}
.blog-item-date { font-size: 12px; color: var(--subtle); }
.blog-item-sep { color: var(--divider); }
.blog-item-title {
  font-family: var(--font-display); font-size: 19px; font-weight: 400;
  line-height: 1.32; margin-bottom: 6px; letter-spacing: -0.2px;
  transition: color 0.15s;
}
.blog-item-excerpt {
  font-size: 13.5px; color: var(--muted); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-item-thumb {
  width: 96px; height: 68px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  flex-shrink: 0; overflow: hidden; position: relative;
}

/* ══════════════════════════════════════════
   PROJECTS PAGE
══════════════════════════════════════════ */
.projects-page {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 64px 40px 100px;
}
.page-hero { margin-bottom: 56px; }
.page-hero-eyebrow { margin-bottom: 20px; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 400; letter-spacing: -1px; line-height: 1.1;
  margin-bottom: 16px;
}
.page-hero p { font-size: 16px; color: var(--muted); max-width: 500px; line-height: 1.75; }

.toolbar {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 32px; flex-wrap: wrap;
}
.toolbar-search {
  position: relative; flex: 1; max-width: 320px; min-width: 200px;
}
.toolbar-search input {
  width: 100%; height: 40px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--divider);
  border-radius: var(--r-pill);
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  background: var(--white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.toolbar-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.toolbar-search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pill {
  font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 5px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--divider); background: transparent;
  cursor: pointer; transition: all 0.15s var(--ease-out);
  font-family: var(--font-body); letter-spacing: 0.01em;
}
.filter-pill:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface); }
.filter-pill.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.results-meta { font-size: 13px; color: var(--subtle); margin-bottom: 28px; font-style: italic; }

/* ══════════════════════════════════════════
   PROJECT DETAIL
══════════════════════════════════════════ */
.project-detail {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 48px 40px 100px;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--subtle); cursor: pointer;
  margin-bottom: 40px;
  transition: color 0.15s, gap 0.18s var(--ease-out);
  background: none; border: none; font-family: var(--font-body);
  padding: 0;
}
.back-btn:hover { color: var(--ink); gap: 10px; }

.project-detail-cover {
  width: 100%; aspect-ratio: 21/9;
  border-radius: var(--r-md);
  margin-bottom: 40px; overflow: hidden;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.project-detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.project-detail h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 400; line-height: 1.18; letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.project-detail-desc {
  font-size: 18px; color: var(--muted); line-height: 1.8;
  margin-bottom: 32px; font-weight: 300;
}
.project-detail-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 48px; padding-bottom: 48px;
  border-bottom: 1px solid var(--divider);
}
.project-detail-body h2 {
  font-family: var(--font-display); font-size: 24px; font-weight: 400;
  margin: 40px 0 14px; letter-spacing: -0.3px;
}
.project-detail-body p { font-size: 17px; line-height: 1.85; margin-bottom: 20px; color: var(--ink-3); }
.project-detail-body ul { padding-left: 20px; margin-bottom: 20px; }
.project-detail-body li { font-size: 17px; line-height: 1.85; margin-bottom: 8px; color: var(--ink-3); }
.project-detail-body code {
  font-family: var(--font-mono); font-size: 0.83em;
  background: var(--accent-light); padding: 2px 7px; border-radius: var(--r-xs);
  color: var(--accent-2);
}

/* ══════════════════════════════════════════
   BLOG PAGE
══════════════════════════════════════════ */
.blog-page {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 64px 40px 100px;
}

.blog-featured {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; margin-bottom: 56px;
  padding-bottom: 56px; border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.blog-featured:hover .blog-featured-title { color: var(--accent); }
.blog-featured-visual {
  aspect-ratio: 4/3; border-radius: var(--r-md);
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease-out);
}
.blog-featured:hover .blog-featured-visual { transform: scale(1.01); }
.blog-featured-content { display: flex; flex-direction: column; justify-content: center; gap: 0; }
.blog-featured-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 20px;
}
.blog-featured-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px); font-weight: 400;
  line-height: 1.2; letter-spacing: -0.4px;
  margin-bottom: 16px;
  transition: color 0.15s;
}
.blog-featured-excerpt {
  font-size: 15px; color: var(--muted); line-height: 1.8;
  margin-bottom: 24px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-featured-meta { font-size: 13px; color: var(--subtle); display: flex; align-items: center; gap: 10px; }

.blog-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 40px; }

.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card { cursor: pointer; }
.blog-card-visual {
  aspect-ratio: 3/2; border-radius: var(--r);
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.3s var(--ease-out);
}
.blog-card:hover .blog-card-visual { transform: scale(1.02); }
.blog-card:hover .blog-card-title { color: var(--accent); }
.blog-card-cat { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.blog-card-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 400;
  line-height: 1.32; margin-bottom: 10px; letter-spacing: -0.2px;
  transition: color 0.15s;
}
.blog-card-meta { font-size: 12px; color: var(--subtle); display: flex; gap: 8px; align-items: center; }

/* ══════════════════════════════════════════
   POST PAGE
══════════════════════════════════════════ */
.post-cover-wrap {
  width: 100%; max-height: 440px; min-height: 260px;
  background: var(--surface);
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
}

.post-layout {
  max-width: calc(var(--max-prose) + var(--sidebar-w) + 72px);
  margin: 0 auto;
  padding: 0 40px 100px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 72px;
  align-items: start;
}
.post-main { min-width: 0; }
.post-inner { padding: 52px 0 0; }

.post-header { margin-bottom: 40px; }
.post-category {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px; display: flex; gap: 8px;
}
.post-category span { cursor: pointer; transition: opacity 0.12s; }
.post-category span:hover { opacity: 0.7; }

.post-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 400; line-height: 1.15; letter-spacing: -0.6px;
  margin-bottom: 24px;
}

.post-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--subtle);
  padding-bottom: 32px; border-bottom: 1px solid var(--divider);
  flex-wrap: wrap;
}
.post-meta-author { font-weight: 500; color: var(--muted); }
.post-meta-dot { color: var(--divider); }

.post-body {
  font-size: 17.5px; line-height: 1.9; color: var(--ink-3);
  margin-top: 44px;
  font-weight: 300;
}
.post-body > p + p { margin-top: 0; }
.post-body > p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 4.2em; font-weight: 400;
  float: left; line-height: 0.82;
  margin: 5px 10px -2px 0;
  color: var(--accent);
}
.post-body h2 {
  font-family: var(--font-display); font-size: 27px; font-weight: 400;
  letter-spacing: -0.4px; line-height: 1.2; margin: 52px 0 18px;
  color: var(--ink);
}
.post-body h3 {
  font-family: var(--font-display); font-size: 21px; font-weight: 400;
  margin: 40px 0 14px; letter-spacing: -0.2px; color: var(--ink);
}
.post-body p { margin-bottom: 28px; }
.post-body blockquote {
  border: none;
  padding: 28px 36px;
  margin: 40px 0;
  font-style: italic;
  color: var(--ink-2); font-size: 20px; line-height: 1.65;
  background: var(--surface);
  border-radius: var(--r-md);
  position: relative;
}
.post-body blockquote::before {
  content: '\201C';
  font-family: var(--font-display); font-size: 72px; line-height: 1;
  color: var(--accent); position: absolute; top: 8px; left: 24px; opacity: 0.3;
}
.post-body code {
  font-family: var(--font-mono); font-size: 0.82em;
  background: var(--accent-light); padding: 2px 7px;
  border-radius: var(--r-xs); color: var(--accent-2); font-weight: 500;
}
.post-body pre {
  background: #111827; color: #e2e8f0;
  padding: 28px; border-radius: var(--r-md);
  overflow-x: auto; margin: 32px 0;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.75;
  box-shadow: var(--shadow-md);
  position: relative;
}
.post-body pre::before {
  content: 'CODE'; position: absolute; top: 12px; right: 16px;
  font-size: 9px; letter-spacing: 0.12em; font-weight: 700;
  color: #374151; font-family: var(--font-body);
}
.post-body pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 28px; }
.post-body li { margin-bottom: 10px; }
.post-body a { color: var(--accent); border-bottom: 1px solid var(--accent-light); transition: border-color 0.12s; }
.post-body a:hover { border-bottom-color: var(--accent); }

.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--divider); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.post-nav-card {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--r); padding: 20px;
  cursor: pointer; transition: all 0.2s var(--ease-out);
}
.post-nav-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.post-nav-card.next { text-align: right; }
.post-nav-dir { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 8px; }
.post-nav-title { font-family: var(--font-display); font-size: 15px; font-weight: 400; line-height: 1.4; }

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
  padding-top: 52px;
  position: sticky; top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-widget { margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--divider); }
.sidebar-widget:last-child { border-bottom: none; }
.sidebar-widget-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--subtle); margin-bottom: 20px;
}

.sidebar-post { display: flex; gap: 12px; margin-bottom: 16px; cursor: pointer; transition: opacity 0.15s; }
.sidebar-post:hover { opacity: 0.7; }
.sidebar-post:last-child { margin-bottom: 0; }
.sidebar-post-thumb {
  width: 52px; height: 38px; border-radius: var(--r-xs);
  background: var(--surface-2); flex-shrink: 0; overflow: hidden; position: relative;
}
.sidebar-post-info { display: flex; flex-direction: column; gap: 3px; }
.sidebar-post-title { font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.sidebar-post-date { font-size: 11px; color: var(--subtle); }

.sidebar-cat-list { display: flex; flex-direction: column; }
.sidebar-cat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; cursor: pointer;
  border-bottom: 1px solid var(--divider);
  transition: color 0.12s;
  font-size: 13px; color: var(--muted);
}
.sidebar-cat:last-child { border-bottom: none; }
.sidebar-cat:hover { color: var(--accent); }
.sidebar-cat-count {
  font-size: 11px; color: var(--subtle);
  background: var(--surface); padding: 2px 8px; border-radius: var(--r-pill);
}

.sidebar-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-tag {
  font-size: 11.5px; font-weight: 500; padding: 4px 10px;
  border-radius: var(--r-pill); border: 1px solid var(--divider);
  color: var(--muted); cursor: pointer; transition: all 0.15s;
  font-family: var(--font-body); background: transparent;
}
.sidebar-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.sidebar-nl { display: flex; flex-direction: column; gap: 8px; }
.sidebar-nl p { font-size: 13px; color: var(--muted); line-height: 1.65; }
.sidebar-nl-input {
  height: 38px; padding: 0 13px;
  border: 1px solid var(--divider); border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: 13px; color: var(--ink);
  outline: none; transition: border-color 0.15s;
}
.sidebar-nl-input:focus { border-color: var(--accent); }
.sidebar-nl-btn {
  height: 38px; background: var(--accent); color: var(--white);
  font-size: 13px; font-weight: 500; border-radius: var(--r-sm);
  border: none; font-family: var(--font-body); cursor: pointer;
  transition: background 0.15s;
}
.sidebar-nl-btn:hover { background: var(--accent-2); }

/* ══════════════════════════════════════════
   COMMENTS
══════════════════════════════════════════ */
.comments { margin-top: 72px; padding-top: 52px; border-top: 1px solid var(--divider); }
.comments-heading {
  font-family: var(--font-display); font-size: 24px; font-weight: 400;
  letter-spacing: -0.3px; margin-bottom: 36px;
}
.comment { display: flex; gap: 16px; margin-bottom: 28px; }
.comment.reply { margin-left: 60px; }
.comment-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--white);
  letter-spacing: 0.02em;
}
.comment-body { flex: 1; }
.comment-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.comment-author { font-size: 14px; font-weight: 600; color: var(--ink); }
.comment-date { font-size: 12px; color: var(--subtle); }
.comment-author-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-light); padding: 2px 7px; border-radius: var(--r-pill);
}
.comment-text { font-size: 15px; line-height: 1.75; margin-bottom: 10px; color: var(--ink-3); }
.comment-reply-btn {
  font-size: 12px; font-weight: 500; color: var(--subtle);
  cursor: pointer; transition: color 0.12s;
  background: none; border: none; font-family: var(--font-body); padding: 0;
}
.comment-reply-btn:hover { color: var(--accent); }

.comment-form-section { margin-top: 52px; padding-top: 40px; border-top: 1px solid var(--divider); }
.comment-form-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 400;
  margin-bottom: 28px; letter-spacing: -0.2px;
}
.comment-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.form-input, .form-textarea {
  padding: 11px 15px;
  border: 1px solid var(--divider); border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.6;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--ghost); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-submit {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--white);
  font-size: 13.5px; font-weight: 500;
  padding: 11px 24px; border-radius: var(--r-sm);
  border: none; font-family: var(--font-body); cursor: pointer;
  transition: all 0.15s var(--ease-out);
}
.form-submit:hover { background: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.form-success {
  background: var(--accent-light); border: 1px solid var(--accent);
  color: var(--accent-2); padding: 14px 18px; border-radius: var(--r-sm);
  font-size: 14px; display: none;
}
.form-success.visible { display: block; animation: staggerFade 0.3s var(--ease-out); }

/* ══════════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════════ */
.about-page { max-width: var(--max-prose); margin: 0 auto; padding: 64px 40px 100px; }

.about-intro {
  display: grid; grid-template-columns: 1fr 200px;
  gap: 56px; margin-bottom: 64px; padding-bottom: 64px;
  border-bottom: 1px solid var(--divider); align-items: start;
}
.about-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 400; letter-spacing: -0.6px; line-height: 1.15;
  margin-bottom: 24px;
}
.about-intro p { font-size: 16.5px; line-height: 1.85; color: var(--muted); margin-bottom: 16px; }
.about-photo {
  width: 200px; height: 200px; border-radius: var(--r-md);
  background: var(--surface); overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.about-photo-inner {
  font-family: var(--font-mono); font-size: 11px; color: var(--subtle);
  text-align: center; position: relative; z-index: 1;
}

.about-section { margin-bottom: 56px; }
.about-section-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 400;
  margin-bottom: 28px; letter-spacing: -0.2px;
}

.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.skill-cat-name {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--subtle); margin-bottom: 12px;
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-chip {
  font-size: 13px; color: var(--ink-3);
  padding: 5px 13px; border-radius: var(--r-pill);
  border: 1px solid var(--divider); background: var(--white);
  transition: all 0.15s;
}
.skill-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 9px 18px; border: 1px solid var(--divider); border-radius: var(--r-sm);
  transition: all 0.15s; cursor: pointer; background: var(--white);
}
.social-link:hover { border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow-xs); transform: translateY(-1px); }

/* ══════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════ */
.contact-page { max-width: 640px; margin: 0 auto; padding: 64px 40px 100px; }
.contact-page h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 400; letter-spacing: -0.6px; margin-bottom: 14px;
}
.contact-page > p { font-size: 16px; color: var(--muted); margin-bottom: 52px; line-height: 1.8; }
.contact-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .form-group.full { grid-column: 1/-1; }

/* ══════════════════════════════════════════
   ARCHIVE PAGE
══════════════════════════════════════════ */
.archive-page { max-width: var(--max-wide); margin: 0 auto; padding: 64px 40px 100px; }
.archive-header { margin-bottom: 56px; }
.archive-header h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 400; letter-spacing: -0.5px; margin-bottom: 8px;
}
.archive-header .term { color: var(--accent); font-style: italic; }
.archive-header p { font-size: 15px; color: var(--muted); }

/* ══════════════════════════════════════════
   SEARCH PAGE
══════════════════════════════════════════ */
.search-page { max-width: var(--max-prose); margin: 0 auto; padding: 64px 40px 100px; }
.search-page h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 400; letter-spacing: -0.4px; margin-bottom: 6px;
}
.search-page-meta { font-size: 14px; color: var(--muted); margin-bottom: 40px; }
.search-result {
  padding: 28px 0; border-bottom: 1px solid var(--divider);
  cursor: pointer; transition: opacity 0.15s;
}
.search-result:first-child { border-top: 1px solid var(--divider); }
.search-result:hover { opacity: 0.75; }
.search-result:hover .search-result-title { color: var(--accent); }
.search-result-type {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--subtle); margin-bottom: 7px;
}
.search-result-title {
  font-family: var(--font-display); font-size: 21px; font-weight: 400;
  line-height: 1.3; margin-bottom: 8px; letter-spacing: -0.2px;
  transition: color 0.15s;
}
.search-result-excerpt { font-size: 14px; color: var(--muted); line-height: 1.7; }
.search-highlight {
  background: var(--highlight); border-radius: 3px;
  padding: 0 3px; color: var(--ink); font-weight: 500;
}
.search-empty { padding: 80px 0; text-align: center; }
.search-empty p { font-size: 16px; color: var(--muted); margin-bottom: 24px; }

/* ══════════════════════════════════════════
   NEWSLETTER
══════════════════════════════════════════ */
.newsletter-block {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--r-xl); padding: 44px 52px;
  display: flex; align-items: center; gap: 52px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.newsletter-block::before {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-light), transparent);
  pointer-events: none;
}
.newsletter-text { flex: 1; min-width: 200px; }
.newsletter-text h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 400;
  margin-bottom: 8px; letter-spacing: -0.3px;
}
.newsletter-text p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 260px; }
.newsletter-input {
  flex: 1; min-width: 180px; height: 44px; padding: 0 18px;
  border: 1px solid var(--divider); border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--white); outline: none; transition: border-color 0.15s;
}
.newsletter-input:focus { border-color: var(--accent); }
.newsletter-btn {
  height: 44px; padding: 0 22px;
  background: var(--accent); color: var(--white);
  font-size: 14px; font-weight: 500; border-radius: var(--r-sm);
  border: none; font-family: var(--font-body); cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.newsletter-btn:hover { background: var(--accent-2); transform: translateY(-1px); }

/* ══════════════════════════════════════════
   404 PAGE
══════════════════════════════════════════ */
.not-found-page { max-width: 560px; margin: 0 auto; padding: 120px 40px 100px; text-align: center; }
.not-found-num {
  font-family: var(--font-display);
  font-size: clamp(96px, 14vw, 160px);
  font-weight: 400; line-height: 1; letter-spacing: -6px;
  background: linear-gradient(135deg, var(--divider) 0%, var(--surface-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px; display: block;
}
.not-found-page h2 {
  font-family: var(--font-display); font-size: 28px; font-weight: 400;
  letter-spacing: -0.3px; margin-bottom: 14px;
}
.not-found-page p { font-size: 16px; color: var(--muted); line-height: 1.8; margin-bottom: 44px; }
.not-found-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
#site-footer {
  background: var(--ink); color: var(--white);
  padding: 0 40px;
}
.footer-top {
  max-width: var(--max-wide); margin: 0 auto;
  padding: 64px 0 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: start;
}
.footer-brand .footer-logo {
  font-family: var(--font-display); font-size: 20px;
  cursor: pointer; margin-bottom: 12px; display: flex; align-items: center;
}
.footer-brand .footer-logo-dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  margin-left: 3px; transform: translateY(-5px);
}
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.7; max-width: 260px; }

.footer-cols { display: flex; gap: 56px; }
.footer-col h4 {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col li button, .footer-col li a {
  font-size: 13px; color: rgba(255,255,255,0.55);
  cursor: pointer; transition: color 0.12s;
  background: none; border: none; font-family: var(--font-body);
  padding: 0; text-align: left;
}
.footer-col li button:hover, .footer-col li a:hover { color: var(--white); }

.footer-bottom {
  max-width: var(--max-wide); margin: 0 auto;
  padding: 20px 0 32px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-social { display: flex; gap: 20px; }
.footer-social a {
  font-size: 12px; color: rgba(255,255,255,0.4);
  transition: color 0.12s; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.footer-social a:hover { color: rgba(255,255,255,0.85); }

/* ══════════════════════════════════════════
   VISUAL HELPERS (for cards)
══════════════════════════════════════════ */
.vis-fill { position: absolute; inset: 0; }

/* Grid dot pattern */
.dot-grid {
  background-image: radial-gradient(circle, currentColor 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .post-layout { grid-template-columns: 1fr; }
  .sidebar {
    padding-top: 0; border-top: 1px solid var(--divider); margin-top: 56px;
    padding-top: 48px; display: grid; grid-template-columns: repeat(2,1fr);
    gap: 0 56px; position: static; max-height: none;
  }
}
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2,1fr); }
  .blog-grid { grid-template-columns: repeat(2,1fr); }
  .blog-featured { grid-template-columns: 1fr; }
  .about-intro { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { gap: 36px; }
  .nav-center { display: none; }
  .nav-logo { margin-right: 0; }
}
@media (max-width: 600px) {
  #site-nav { padding: 0 20px; }
  .nav-right { display: none; }
  .nav-hamburger { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .home-hero { padding: 56px 20px 56px; }
  .home-section { padding: 52px 20px; }
  .projects-page, .blog-page, .about-page, .contact-page, .search-page, .archive-page { padding: 40px 20px 80px; }
  .post-layout { padding: 0 20px 80px; }
  .project-detail { padding: 40px 20px 80px; }
  .skills-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .newsletter-block { padding: 28px 24px; gap: 24px; }
  #site-footer { padding: 0 20px; }
  .footer-cols { flex-wrap: wrap; gap: 28px; }
  .hero-meta { gap: 24px; }
.blog-item { grid-template-columns: 1fr; }
  .contact-form-grid { grid-template-columns: 1fr; }
  .blog-item-thumb { display: none; }
}
