/* ==========================================================================
   ZuzuDuck — Design System
   ========================================================================== */

:root {
  /* Type — single sans, italic + color for accents */
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 12, 8, 0.04), 0 1px 1px rgba(15, 12, 8, 0.02);
  --shadow-md: 0 4px 16px -4px rgba(15, 12, 8, 0.08), 0 2px 4px rgba(15, 12, 8, 0.03);
  --shadow-lg: 0 24px 60px -20px rgba(15, 12, 8, 0.18), 0 8px 18px -6px rgba(15, 12, 8, 0.05);

  /* Accent (duck gold by default — overridable from Tweaks) */
  --accent: oklch(0.80 0.14 78);
  --accent-soft: oklch(0.95 0.05 88);
  --accent-deep: oklch(0.58 0.13 65);
  --accent-ink: oklch(0.22 0.06 60);

  /* Pond */
  --pond: oklch(0.55 0.09 230);
  --pond-soft: oklch(0.94 0.03 230);

  /* Light theme — clean cool-neutral */
  --bg: oklch(0.975 0.003 240);
  --bg-2: oklch(0.99 0.002 240);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.965 0.003 240);
  --ink: oklch(0.18 0.006 240);
  --ink-2: oklch(0.32 0.006 240);
  --muted: oklch(0.52 0.006 240);
  --muted-2: oklch(0.68 0.005 240);
  --border: oklch(0.92 0.004 240);
  --border-strong: oklch(0.84 0.005 240);
  --hairline: oklch(0.95 0.003 240);

  /* Banner — soft accent-tinted, blends with page */
  --banner-bg: color-mix(in oklab, var(--accent) 14%, var(--bg-2));
  --banner-ink: var(--ink);
  --banner-pill: oklch(0.72 0.16 145);

  /* Effects */
  --grid-line: oklch(0.88 0.006 80 / 0.4);
}

[data-theme="dark"] {
  /* Cool neutral slate — clean, not warm */
  --bg: oklch(0.165 0.006 250);
  --bg-2: oklch(0.205 0.006 250);
  --surface: oklch(0.225 0.006 250);
  --surface-2: oklch(0.27 0.007 250);
  --ink: oklch(0.97 0.004 240);
  --ink-2: oklch(0.86 0.005 240);
  --muted: oklch(0.66 0.006 240);
  --muted-2: oklch(0.50 0.007 240);
  --border: oklch(0.30 0.007 250);
  --border-strong: oklch(0.38 0.008 250);
  --hairline: oklch(0.255 0.006 250);

  --accent: oklch(0.82 0.14 78);
  --accent-soft: oklch(0.32 0.08 75);
  --accent-deep: oklch(0.82 0.15 78);
  --accent-ink: oklch(0.95 0.10 85);

  --pond: oklch(0.72 0.10 230);
  --pond-soft: oklch(0.27 0.05 230);

  --banner-bg: color-mix(in oklab, var(--accent) 10%, var(--surface));
  --banner-ink: var(--ink);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 10px 24px -8px rgba(0, 0, 0, 0.25);

  --grid-line: oklch(0.27 0.006 250 / 0.5);
}

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

html { color-scheme: light dark; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
  font-feature-settings: "ss01", "cv11";
}

/* Soft duck-pond grid background — removed for simplicity */
body::before { content: none; }

#root { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

a { color: inherit; text-decoration: none; }

button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ===== Typography utilities ===== */
.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.005em; }
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; }

/* ==========================================================================
   App shell — nav + banner + footer
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}
.nav-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
.nav-brand-name span:nth-child(2) { color: var(--accent-deep); font-style: italic; font-weight: 700; }

.nav-links { display: flex; gap: 0.4rem; margin-left: 0.5rem; }
.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--ink); color: var(--bg); }

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

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--ink-2);
  background: var(--surface);
  transition: background 0.15s, transform 0.2s ease;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--ink); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Banner */
.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.65rem 1.5rem;
  flex-wrap: wrap;
  row-gap: 0.4rem;
  background: var(--banner-bg);
  color: var(--banner-ink);
  font-size: 0.9rem;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border));
  position: relative;
  overflow: hidden;
}
.banner::before { content: none; }
.banner-badge {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--banner-pill);
  color: oklch(0.18 0.06 145);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 0.22rem 0.6rem 0.22rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.banner-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.30 0.10 145);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.5;transform:scale(.8);} }
.banner-text { position: relative; }
.banner-text strong { font-weight: 700; }
.banner-cta {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.35rem;
  white-space: nowrap;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.82rem;
  transition: transform 0.15s, background 0.15s;
}
.banner-cta:hover { transform: translateX(2px); }
.banner-cta svg { width: 12px; height: 12px; }

/* Main wrapper */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.75rem 5rem;
  width: 100%;
  flex: 1;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 1.75rem 3rem;
  background: var(--bg-2);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-brand {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 1rem; font-weight: 700; color: var(--ink);
  letter-spacing: -0.01em;
}
.footer-brand em { font-style: italic; font-weight: 700; color: var(--accent-deep); }
.footer-brand img { width: 28px; height: 28px; }
.footer-meta { display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-end; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.footer-meta a { color: var(--muted); transition: color 0.15s; }
.footer-meta a:hover { color: var(--ink); }
.footer-quack { color: var(--accent-deep); font-style: italic; }

/* ==========================================================================
   Common: cards / pills / buttons
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: transform 0.15s ease, opacity 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 0.9; }

.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-accent { background: var(--accent); color: oklch(0.18 0.06 65); }

/* ==========================================================================
   Home page
   ========================================================================== */

.home {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.75rem;
  align-items: flex-start;
}

.profile-side { position: sticky; top: 4.5rem; display: flex; flex-direction: column; gap: 1.4rem; }

.profile-card {
  position: relative;
  padding: 1.5rem 1.4rem 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.profile-card::before { content: none; }

.profile-img-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border), 0 12px 28px -8px rgba(0,0,0,0.18);
}
.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.18);
  transform-origin: 50% 32%;
  display: block;
}
.duck-mascot {
  position: absolute;
  bottom: -14px;
  right: -22px;
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.22));
  animation: float 5s ease-in-out infinite;
  z-index: 3;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

.profile-name {
  font-size: 1.7rem;
  font-weight: 700;
  text-align: center;
  margin-top: 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.profile-name em { font-style: italic; font-weight: 700; color: var(--accent-deep); }
.profile-name em { font-style: italic; color: var(--accent-deep); }
.profile-handle {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
  letter-spacing: 0.04em;
}

.profile-bio {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 0.65rem;
}
.profile-bio p {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.55;
  text-align: center;
}
.profile-bio p:last-child { color: var(--accent-deep); font-style: italic; font-size: 0.98rem; line-height: 1.45; font-weight: 500; }

/* Newsletter */
.newsletter {
  margin-top: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.newsletter-heading {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 600; color: var(--ink);
  margin-bottom: 0.6rem;
  white-space: nowrap;
}
.newsletter-heading svg { width: 16px; height: 16px; color: var(--accent-deep); }
.newsletter-row { display: flex; gap: 0.5rem; }
.newsletter-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.newsletter-input::placeholder { color: var(--muted-2); }
.newsletter-input:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent); }
.newsletter-btn {
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.15s;
}
.newsletter-btn:hover { transform: translateY(-1px); }
.newsletter-legal { font-size: 0.72rem; color: var(--muted); margin-top: 0.55rem; text-align: center; }
.newsletter-legal a { color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.newsletter-success { padding: 0.5rem; text-align: center; color: var(--accent-deep); font-size: 0.9rem; font-weight: 500; }

/* Social */
.socials { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 0.6rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.social-btn:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.social-btn svg { width: 15px; height: 15px; }

/* Content side */
.content-side { display: flex; flex-direction: column; gap: 2.5rem; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.section-head .section-title { flex: 1 1 auto; min-width: 0; }
.section-title {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-title em { color: var(--accent-deep); font-style: italic; }
.section-count {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.05em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.3rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  position: relative;
  overflow: hidden;
  min-height: 200px;
}
.project-card.clickable:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.project-card.clickable:hover .project-arrow { transform: translate(2px, -2px); color: var(--accent-deep); }

.project-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.project-header { display: flex; align-items: center; gap: 0.85rem; }
.project-name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.005em; }
.project-tag {
  display: inline-block; padding: 0.15rem 0.5rem;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border); border-radius: 999px;
}
.project-description { font-size: 0.9rem; color: var(--ink-2); line-height: 1.55; flex: 1; }
.project-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.85rem; border-top: 1px dashed var(--border);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em;
  white-space: nowrap;
}
.project-arrow { transition: transform 0.18s, color 0.18s; color: var(--muted-2); }
.project-arrow svg { width: 15px; height: 15px; }

.project-status {
  position: absolute;
  top: 1rem; right: 1rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-mono); font-size: 10px; color: var(--accent-deep);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.project-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
  animation: pulse 1.8s ease-in-out infinite;
}

/* Duck fact box */
.duck-fact {
  position: relative;
  padding: 1.4rem 1.8rem 1.6rem;
  background: color-mix(in oklab, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  border-radius: var(--radius-lg);
  overflow: hidden;
}
[data-theme="dark"] .duck-fact { background: color-mix(in oklab, var(--accent) 12%, var(--surface)); }
.duck-fact-quote {
  position: absolute;
  top: -10px; left: 22px;
  font-size: 4rem;
  line-height: 1;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--accent);
  opacity: 0.7;
  pointer-events: none;
  user-select: none;
}
.duck-fact-duck {
  position: absolute;
  right: 16px; bottom: -12px;
  width: 72px; height: 72px;
  object-fit: contain;
  opacity: 0.55;
  transform: rotate(8deg);
  pointer-events: none;
}
.duck-fact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-top: 0.4rem;
  position: relative;
}
.duck-fact-text {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
  margin-top: 0.55rem;
  max-width: calc(100% - 70px);
  position: relative;
}
/* legacy duck-fact-icon (kept for safety; current markup uses duck-fact-duck) */
.duck-fact-icon { display: none; }
.duck-fact-body { display: contents; }
/* legacy duck-fact-body styles — markup no longer wraps; using display:contents above */

/* ==========================================================================
   About page
   ========================================================================== */

.about-hero { text-align: center; margin-bottom: 2.5rem; }
.about-hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.about-hero h1 em { font-style: italic; color: var(--accent-deep); }
.about-hero .subtitle { color: var(--muted); font-size: 1.05rem; margin-top: 0.85rem; max-width: 540px; margin-inline: auto; }
.about-hero-duck { width: 96px; height: 96px; object-fit: contain; margin: 0 auto 0.5rem; display: block; animation: float 5s ease-in-out infinite; }

.about-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 880px; margin: 0 auto;
}

.basic-info {
  padding: 1.6rem 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.basic-info h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.1rem; letter-spacing: -0.01em; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem 1.5rem; }
.info-item { display: flex; flex-direction: column; gap: 0.25rem; }
.info-item.full { grid-column: 1 / -1; }
.info-label { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.info-value { font-size: 0.98rem; color: var(--ink); line-height: 1.4; }
.info-value.motto { font-style: italic; color: var(--accent-deep); font-size: 1.05rem; font-weight: 500; }

.currently-box {
  display: flex; gap: 1.15rem;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(135deg, var(--pond-soft) 0%, var(--surface) 80%);
  border: 1px solid color-mix(in oklab, var(--pond) 30%, var(--border));
  border-radius: var(--radius-lg);
}
.currently-icon {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--pond) 25%, var(--border));
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pond);
}
.currently-icon svg { width: 20px; height: 20px; }
.currently-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pond); }
.currently-list { list-style: none; margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.currently-list li {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.95rem; color: var(--ink-2);
}
.currently-list li::before {
  content: "→"; flex-shrink: 0; color: var(--pond);
  font-family: var(--font-mono); font-weight: 600;
}

.section-h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 1.5rem 0 0.25rem;
}

.timeline { display: flex; flex-direction: column; gap: 1rem; position: relative; }
.job-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
}
.job-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.job-title { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.005em; }
.job-company { font-size: 0.9rem; color: var(--accent-deep); margin-top: 0.15rem; font-weight: 500; }
.job-period {
  flex-shrink: 0;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
}
.job-description { font-size: 0.93rem; color: var(--ink-2); margin-top: 0.85rem; line-height: 1.6; }
.achievements { list-style: none; margin-top: 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; }
.achievements li {
  display: flex; align-items: flex-start; gap: 0.55rem;
  font-size: 0.9rem; color: var(--ink-2); line-height: 1.5;
}
.achievements li::before {
  content: "";
  flex-shrink: 0;
  width: 14px; height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--accent), color-mix(in oklab, var(--accent) 60%, black));
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.skill-cat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem 1.2rem;
}
.skill-cat h3 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 0.7rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-tag {
  display: inline-block; padding: 0.3rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem; color: var(--ink-2);
  font-family: var(--font-mono); letter-spacing: 0.02em;
}
.skill-tag:hover { border-color: var(--accent-deep); color: var(--ink); }

/* Certifications */
.certs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.cert-card {
  display: flex; gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  transition: all 0.18s;
}
.cert-card.link:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.cert-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-deep);
}
.cert-icon svg { width: 18px; height: 18px; }
.cert-name { font-size: 0.93rem; font-weight: 600; letter-spacing: -0.005em; }
.cert-issuer { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
.cert-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.cert-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.05em; }
.cert-link-ind svg { width: 13px; height: 13px; color: var(--muted-2); }

/* ==========================================================================
   Blog
   ========================================================================== */

.blog-hero { text-align: center; margin-bottom: 2.5rem; position: relative; }
.blog-hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.blog-hero h1 em { font-style: italic; color: var(--accent-deep); }
.blog-subtitle { color: var(--muted); margin-top: 0.85rem; font-size: 1.05rem; }

.blog-quote {
  position: relative;
  max-width: 720px;
  margin: 2.25rem auto 0;
  padding: 1.85rem 2rem 2rem;
  background: color-mix(in oklab, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  border-radius: var(--radius-lg);
  text-align: center;
  overflow: hidden;
}
[data-theme="dark"] .blog-quote {
  background: color-mix(in oklab, var(--accent) 12%, var(--surface));
}
.blog-quote-mark {
  position: absolute;
  top: -8px; left: 24px;
  font-size: 4rem; line-height: 1;
  color: var(--accent);
  opacity: 0.7;
  font-weight: 700;
}
.blog-quote .duck-watermark {
  position: absolute; right: 18px; bottom: -10px; width: 78px; height: 78px;
  opacity: 0.5; transform: rotate(8deg);
}
.blog-quote p { font-style: italic; font-size: 1.15rem; line-height: 1.55; color: var(--ink); position: relative; font-weight: 500; }
.blog-quote cite { display: block; margin-top: 0.85rem; font-style: normal; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.blog-card:hover .blog-cover { transform: scale(1.05); }
.blog-cover-wrap { aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--hairline); }
.blog-cover {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-cover-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 30%, var(--surface)) 0%, var(--surface) 60%);
}
.blog-card-body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: 0.65rem; flex: 1; }
.blog-card-title {
  font-size: 1.1rem; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); font-weight: 700;
}
.blog-card-excerpt { font-size: 0.9rem; color: var(--muted); line-height: 1.55; flex: 1; }
.blog-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.85rem; margin-top: 0.5rem; border-top: 1px dashed var(--border);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; color: var(--muted);
}
.blog-card-arrow { color: var(--accent-deep); transition: transform 0.18s; }
.blog-card:hover .blog-card-arrow { transform: translateX(3px); }
.blog-card-arrow svg { width: 16px; height: 16px; }

/* Tags */
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}
.tag-chip:hover {
  border-color: var(--accent-deep);
  color: var(--ink);
}
.tag-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
[data-theme="dark"] .tag-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: oklch(0.18 0.06 65);
}

/* Tags overlay on blog cover */
.blog-card-tags {
  position: absolute;
  left: 0.85rem; bottom: 0.85rem;
  display: flex; gap: 0.35rem; flex-wrap: wrap;
  max-width: calc(100% - 1.7rem);
}
.blog-card-tags .tag-chip {
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: transparent;
  font-size: 0.68rem;
}
.blog-card-tags .tag-chip:hover {
  background: var(--surface);
  border-color: var(--accent-deep);
}
.blog-cover-wrap { position: relative; }

/* Tag chips on the post detail header */
.blog-post-tags {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  margin: -1rem 0 2.25rem;
}

/* Blog filter bar */
.blog-filters {
  margin: 2.5rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.blog-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.blog-search:focus-within {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent);
}
.blog-search svg { color: var(--muted-2); flex-shrink: 0; }
.blog-search input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
  outline: none;
  font-size: 0.95rem;
}
.blog-search input::placeholder { color: var(--muted-2); }
.blog-search-clear {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  background: var(--surface-2);
  flex-shrink: 0;
}
.blog-search-clear:hover { background: var(--border); color: var(--ink); }

.blog-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.blog-result-meta em { font-style: normal; color: var(--ink); font-weight: 600; }
.blog-reset {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-deep);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.blog-reset:hover { color: var(--accent); }

/* Empty state */
.blog-empty {
  margin: 3rem auto;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 440px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.blog-empty img {
  width: 80px; height: 80px;
  margin: 0 auto 1rem;
  opacity: 0.7;
  filter: grayscale(0.4);
  transform: rotate(-12deg);
}
.blog-empty h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.blog-empty p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.page-btn:not(:disabled):hover {
  border-color: var(--border-strong);
  color: var(--ink);
  transform: translateY(-1px);
}
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-numbers { display: inline-flex; gap: 0.3rem; }
.page-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s;
}
.page-dot:hover { background: var(--surface-2); color: var(--ink); }
.page-dot.active {
  background: var(--ink);
  color: var(--bg);
}

/* Blog post */
.blog-post {
  max-width: 720px;
  margin: 0 auto;
}
.back-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 1.5rem;
  transition: color 0.15s, transform 0.15s;
}
.back-link:hover { color: var(--accent-deep); transform: translateX(-2px); }
.blog-post-cover-wrap {
  aspect-ratio: 16/9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.blog-post-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.blog-post-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.blog-post-meta {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.05em;
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hairline);
}
.blog-post-meta span:nth-child(2) { color: var(--muted-2); }
.blog-post-content {
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--ink-2);
}
.blog-post-content p { margin: 1.1rem 0; }
.blog-post-content h2 {
  font-size: 1.4rem; font-weight: 700; letter-spacing: -0.015em;
  margin: 2.25rem 0 0.85rem;
  color: var(--ink);
}
.blog-post-content h3 {
  font-size: 1.15rem; font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
}
.blog-post-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.3rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, var(--surface));
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
}
.blog-post-content code {
  font-family: var(--font-mono); font-size: 0.88em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--accent-deep);
}
.blog-post-content ul { margin: 1rem 0 1rem 1.25rem; }
.blog-post-content li { margin: 0.5rem 0; }
.blog-post-content a { color: var(--accent-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.blog-post-content a:hover { color: var(--accent); }

.blog-cta {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 15%, var(--surface)) 0%, var(--surface) 80%);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border));
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative; overflow: hidden;
}
.blog-cta::before {
  content: "";
  position: absolute; right: -20px; bottom: -20px;
  width: 130px; height: 130px;
  background-image: url('assets/DuckImage.png');
  background-size: contain; background-repeat: no-repeat;
  opacity: 0.18; transform: rotate(15deg);
  pointer-events: none;
}
.blog-cta h3 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.015em; }
.blog-cta p { color: var(--muted); margin: 0.5rem auto 1.25rem; max-width: 480px; font-size: 0.95rem; }
.blog-cta form { max-width: 420px; margin: 0 auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; gap: 2.5rem; }
  .profile-side { position: relative; top: 0; max-width: 480px; margin: 0 auto; width: 100%; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-wrap { padding: 2rem 1.1rem 4rem; }
  .nav-inner { padding: 0.75rem 1rem; }
  .nav-links { gap: 0.15rem; margin-left: 0; }
  .nav-link { padding: 0.4rem 0.65rem; font-size: 0.85rem; }
  .nav-brand-name { display: none; }
  .banner { flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem 1rem; font-size: 0.82rem; text-align: center; }
  .blog-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .section-title, .blog-hero h1, .about-hero h1 { font-size: 2.4rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
}

/* Versioned privacy policy (archived-version banner + previous-versions list) */
.privacy-archived-notice {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--accent-ink);
  font-size: 0.9rem;
}
.privacy-archived-notice a { color: var(--accent-deep); font-weight: 600; }
.privacy-versions {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.privacy-versions ul { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.privacy-versions li { color: var(--muted); font-size: 0.92rem; padding: 0.3rem 0; }
.privacy-versions a { color: var(--accent-deep); font-weight: 600; }
