/* ══════════════════════════════════════════════
   claire.zone — Design Tokens
   ══════════════════════════════════════════════ */
:root {
  --bg: #111110;
  --surface: rgba(18, 8, 12, 0.94);
  --surface-elevated: rgba(28, 14, 20, 0.96);
  --fg: oklch(90% 0.012 30);
  --fg-strong: oklch(95% 0.008 30);
  --muted: oklch(58% 0.025 30);
  --muted-dim: oklch(40% 0.03 28);
  --border: oklch(28% 0.035 28);
  --border-light: oklch(35% 0.04 28);
  --accent: oklch(68% 0.17 28);
  --accent-soft: oklch(68% 0.17 28 / 14%);
  --accent-glow: oklch(68% 0.17 28 / 40%);
  --accent-hover: oklch(72% 0.18 28);
  --accent-active: oklch(60% 0.16 28);

  --font-display: 'Comfortaa', 'Iowan Old Style', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', system-ui, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --fs-hero: clamp(40px, 7vw, 72px);
  --fs-hero-post: clamp(28px, 4vw, 44px);
  --fs-h1: clamp(32px, 5vw, 56px);
  --fs-h2: clamp(22px, 3.2vw, 34px);
  --fs-h3: clamp(18px, 2.2vw, 24px);
  --fs-body: clamp(16px, 1.15vw, 18px);
  --fs-lead: clamp(17px, 1.3vw, 20px);
  --fs-small: 14px;
  --fs-tiny: 12px;
  --leading-body: 1.65;
  --leading-heading: 1.2;
  --tracking-display: -0.01em;

  --space-2: 6px;
  --space-3: 10px;
  --space-4: 16px;
  --space-5: 22px;
  --space-6: 30px;
  --space-8: 42px;
  --space-10: 56px;
  --space-12: 72px;

  --container: 760px;
  --container-wide: 960px;
  --gutter: 24px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --motion-fast: 180ms;
  --motion-base: 280ms;
  --ease-spring: cubic-bezier(0.22, 0.99, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* ═══ Keyframes ═══ */
@keyframes kenBurns {
  0%   { background-position: 50% 0%;   background-size: auto 150vh; }
  50%  { background-position: 50% 50%;  background-size: auto 180vh; }
  100% { background-position: 50% 100%; background-size: auto 150vh; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.85; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ Reset & Base ═══ */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(17,17,16,0.55), rgba(17,17,16,0.55)),
    url(/bg.jpeg);
  background-attachment: fixed;
  background-size: auto 150vh;
  background-position: 50% 0%;
  background-repeat: no-repeat;
  animation: kenBurns 28s ease-in-out infinite alternate;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--motion-fast) ease; }
p, ul, ol { margin: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }

/* ═══ Layout ═══ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ═══ Typography ═══ */
.display { font-family: var(--font-display); }
h1, h2, h3, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-display);
}
h1, .h1 { font-size: var(--fs-h1); line-height: var(--leading-heading); }
h2, .h2 { font-size: var(--fs-h2); line-height: var(--leading-heading); }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.3; }
h1, h2, h3 { margin: 0; }
.meta { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); }
.num  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ═══ Header / Sticky Nav ═══ */
header#top {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  transition: all var(--motion-base) var(--ease-spring);
  padding: var(--space-5) 0;
}
header#top .header-inner {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: all var(--motion-base) var(--ease-spring);
}
header#top .header-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: 1;
}
header#top .photo {
  margin: 0;
  line-height: 0;
  flex-shrink: 0;
  transition: all var(--motion-base) var(--ease-spring);
}
header#top .photo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  transition: all var(--motion-base) var(--ease-spring);
  object-fit: cover;
}
header#top h1 {
  font-size: var(--fs-h2);
  font-weight: 600;
  color: rgba(255, 111, 101, 0.85);
  transition: font-size var(--motion-base) var(--ease-spring);
  margin: 0;
}
.social-links {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-shrink: 0;
}
.social-links a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 18px;
  background: transparent;
  border: 2px solid transparent;
  transition: all var(--motion-fast) ease;
}
.social-links a:hover {
  color: var(--accent-hover);
  background: rgba(255, 111, 101, 0.12);
  border-color: var(--accent-soft);
}
.page-nav {
  display: flex;
  gap: var(--space-5);
  margin-left: auto;
}
.page-nav a {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  color: var(--muted);
  position: relative;
  padding: var(--space-2) 0;
}
.page-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width var(--motion-fast) ease;
}
.page-nav a:hover { color: var(--accent); }
.page-nav a:hover::after { width: 100%; }
.page-nav a.active { color: var(--accent); }
.page-nav a.active::after { width: 100%; }

/* ── Scroll state ── */
body.scrolled header#top {
  padding: var(--space-2) 0;
  background: rgba(17, 17, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
body.scrolled header#top .photo img {
  width: 36px;
  height: 36px;
  border-width: 1.5px;
}
body.scrolled header#top h1 {
  font-size: var(--fs-h3);
}
body.scrolled header#top .header-link {
  gap: var(--space-3);
}

/* ═══ Main ═══ */
main {
  padding-top: var(--space-8);
  padding-bottom: var(--space-10);
}

/* ═══ Hero Section (Home) ═══ */
.hero-section {
  text-align: center;
  padding-block: var(--space-10) var(--space-8);
  animation: slideUp 0.6s var(--ease-out) both;
}
.hero-section .hero-content {
  max-width: 680px;
  margin-inline: auto;
}
.hero-section .hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-5);
}
.hero-section h1 {
  font-size: var(--fs-hero);
  margin-bottom: var(--space-4);
  color: var(--fg-strong);
}
.hero-section .hero-text {
  font-size: var(--fs-lead);
  line-height: var(--leading-body);
  color: var(--fg);
  max-width: 48ch;
  margin: var(--space-4) auto 0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}
.hero-section .hero-text strong {
  color: var(--fg-strong);
  font-weight: 500;
}
.hero-section .hero-cta {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══ Page Header (About / generic pages) ═══ */
.page-header {
  text-align: center;
  padding-block: var(--space-8);
  animation: slideUp 0.6s ease both;
}
.page-header .page-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-5);
}
.page-header h1 { font-size: var(--fs-hero); color: var(--fg-strong); }
.page-header .lead {
  font-size: var(--fs-lead);
  color: var(--muted);
  max-width: 48ch;
  margin: var(--space-4) auto 0;
}

/* ═══ Content Card ═══ */
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  margin-bottom: var(--space-6);
  backdrop-filter: blur(4px);
  transition: border-color var(--motion-base) ease;
}
.content-card:hover {
  border-color: var(--border-light);
}
.content-card .card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.content-card .card-header h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin: 0;
}

.content-card p {
  margin-bottom: var(--space-5);
  color: var(--fg);
}
.content-card p:last-child { margin-bottom: 0; }
.content-card p a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.content-card p a:hover { color: var(--accent-hover); }

.content-card h2 {
  font-size: var(--fs-h2);
  color: var(--fg-strong);
  margin-bottom: var(--space-5);
  margin-top: var(--space-8);
}
.content-card h2:first-child { margin-top: 0; }

.content-card h3 {
  font-size: var(--fs-h3);
  color: var(--fg-strong);
  margin-bottom: var(--space-3);
  margin-top: var(--space-6);
}
.content-card h3:first-child { margin-top: 0; }

/* ═══ Blog List (Home) ═══ */
.blog-list { list-style: none; padding: 0; margin: 0; }
.blog-item {
  display: flex;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  transition: padding var(--motion-fast) ease;
}
.blog-item:last-child { border-bottom: none; }
.blog-item:hover {
  padding-left: var(--space-3);
}
.blog-item .blog-date {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--muted-dim);
  flex-shrink: 0;
  min-width: 72px;
}
.blog-item .blog-title {
  font-family: var(--font-display);
  font-size: var(--fs-body);
  color: var(--fg-strong);
  font-weight: 500;
  transition: color var(--motion-fast) ease;
}
.blog-item:hover .blog-title {
  color: var(--accent);
}

/* ═══ Interests List ═══ */
.interest-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3) var(--space-6);
}
.interest-list li {
  padding: var(--space-2) 0;
  font-size: var(--fs-body);
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.interest-list li::before {
  content: '◆';
  color: var(--accent);
  font-size: 6px;
  opacity: 0.6;
}

/* ═══ Contact Section ═══ */
.contact-section {
  text-align: center;
  padding: var(--space-10) 0;
}
.contact-section p {
  color: var(--muted);
  max-width: 50ch;
  margin-inline: auto;
}
.contact-section .contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--accent);
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-md);
  transition: all var(--motion-fast) ease;
}
.contact-section .contact-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ═══ Buttons ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--motion-fast) ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--fg-strong);
  border-color: var(--border-light);
}
.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ═══ Post Card (Blog Posts) ═══ */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: var(--space-6);
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.post-header {
  margin-bottom: 0;
  padding: var(--space-8) var(--space-8) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,111,101,0.04) 0%, transparent 100%);
}
.post-header .post-date {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--accent);
  margin-bottom: var(--space-3);
  display: block;
}
.post-header h1 {
  font-size: var(--fs-hero-post);
  color: var(--fg-strong);
  line-height: 1.15;
}
.post-header .post-description {
  color: var(--muted);
  font-size: var(--fs-lead);
  margin-top: var(--space-4);
  max-width: 60ch;
  line-height: var(--leading-body);
}

.post-body-wrap {
  padding: var(--space-8);
}

/* ═══ Post Body Typography ═══ */
.post-body h1 { font-size: var(--fs-h1); color: var(--fg-strong); margin: var(--space-8) 0 var(--space-5); }
.post-body h2 { font-size: var(--fs-h2); color: var(--fg-strong); margin: var(--space-8) 0 var(--space-4); }
.post-body h3 { font-size: var(--fs-h3); color: var(--fg-strong); margin: var(--space-6) 0 var(--space-3); }
.post-body h4 { font-size: var(--fs-h3); color: var(--fg-strong); margin: var(--space-5) 0 var(--space-3); }
.post-body h1:first-child, .post-body h2:first-child, .post-body h3:first-child { margin-top: 0; }

.post-body p {
  margin-bottom: var(--space-5);
  color: var(--fg);
}
.post-body p:last-child { margin-bottom: 0; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-body a:hover { color: var(--accent-hover); }

.post-body ul, .post-body ol {
  margin: var(--space-4) 0;
  padding-left: 1.5em;
}
.post-body li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
}
.post-body li:last-child { margin-bottom: 0; }

.post-body strong { color: var(--fg-strong); font-weight: 600; }
.post-body em { font-style: italic; }

.post-body img {
  margin: var(--space-6) 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.post-body blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--fg);
  font-style: italic;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--accent);
}
.post-body pre {
  margin: var(--space-5) 0;
  padding: var(--space-5);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--fg);
}
.post-body pre code {
  padding: 0;
  background: none;
  border-radius: 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

/* ═══ Post Navigation ═══ */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.post-nav a {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  color: var(--muted);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex: 1;
  text-align: center;
  transition: all var(--motion-fast) ease;
}
.post-nav a:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
}
.post-nav .nav-label {
  display: block;
  color: var(--muted-dim);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
}

/* ═══ About Page Components ═══ */
.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item .year {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: var(--fs-small);
}
.timeline-item .desc {
  color: var(--fg);
  font-size: var(--fs-body);
}
.timeline-item .desc strong {
  color: var(--fg-strong);
  display: block;
  margin-bottom: var(--space-2);
}

.contact-cta {
  text-align: center;
  padding: var(--space-10) 0;
}
.contact-cta p { color: var(--muted); margin-bottom: var(--space-5); }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--accent);
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-md);
  transition: all var(--motion-fast) ease;
}
.contact-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.book-simple {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-5);
}
.book-simple li {
  font-size: var(--fs-small);
  color: var(--fg);
  line-height: 1.7;
}
.book-simple li .author {
  color: var(--muted-dim);
}

.skill-cluster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.skill-cluster h3 {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-3);
  letter-spacing: 0.04em;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.skill-tags span {
  display: inline-block;
  padding: 3px 10px;
  font-size: var(--fs-small);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
}

/* ═══ 404 Page ═══ */
.four-oh-four {
  text-align: center;
  padding: var(--space-16) 0;
}
.four-oh-four h1 {
  font-size: clamp(60px, 10vw, 120px);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-5);
}
.four-oh-four p {
  color: var(--muted);
  font-size: var(--fs-lead);
}
.four-oh-four a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ═══ Footer ═══ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0;
  text-align: center;
}
footer .footer-inner {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}
footer .footer-copy {
  font-size: var(--fs-small);
  color: var(--muted-dim);
}
footer .footer-links {
  display: flex;
  gap: var(--space-5);
}
footer .footer-links a {
  color: var(--muted);
  font-size: var(--fs-small);
}
footer .footer-links a:hover {
  color: var(--accent);
}

/* ═══ Responsive ═══ */
@media (max-width: 740px) {
  :root { --gutter: 18px; }
  header#top .header-inner { flex-wrap: wrap; }
  .page-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: var(--space-4);
  }
  header#top .photo img { width: 48px; height: 48px; }
  body.scrolled header#top .photo img { width: 32px; height: 32px; }
  .interest-list { grid-template-columns: 1fr; }
  .content-card { padding: var(--space-6) var(--space-4); }
  .post-card { padding: 0; }
  .post-header { padding: var(--space-6) var(--space-4) var(--space-5); }
  .post-body-wrap { padding: var(--space-5) var(--space-4); }
  .blog-item {
    flex-direction: column;
    gap: var(--space-2);
  }
  .blog-item .blog-date { min-width: auto; }
  .hero-section { padding-block: var(--space-8); }
  .hero-section h1 { font-size: var(--fs-h1); }
  .timeline-item { grid-template-columns: 1fr; gap: var(--space-2); }
  .book-simple { grid-template-columns: 1fr; }
  .skill-cluster { grid-template-columns: 1fr; }
  .post-nav { flex-direction: column; }
  footer .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  header#top h1 { font-size: var(--fs-h3); }
  .hero-section { padding-block: var(--space-8); }
  .page-header h1 { font-size: var(--fs-h1); }
  .contact-section .contact-link,
  .contact-link {
    font-size: var(--fs-body);
    width: 100%;
    justify-content: center;
  }
}
