/* Warm paper theme with a soft dark mode. Low contrast glare, one accent. */
:root {
  --bg: #f6f1e7;
  --bg-2: #efe8da;
  --card: #fbf8f2;
  --ink: #23201b;
  --ink-2: #4a453c;
  --muted: #7a7366;
  --line: #e2d9c8;
  --accent: #b9532a;
  --accent-soft: #f1dccf;
  --sage: #5f7a63;
  --shadow: 0 1px 0 rgba(60, 45, 20, .04), 0 10px 30px -18px rgba(60, 45, 20, .25);
  --radius: 18px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a17; --bg-2: #211f1b; --card: #24221e; --ink: #ebe4d6; --ink-2: #c9c1b1;
    --muted: #9a9283; --line: #36322b; --accent: #e08259; --accent-soft: #3a2a21; --sage: #93ad96;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 14px 34px -20px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1a17; --bg-2: #211f1b; --card: #24221e; --ink: #ebe4d6; --ink-2: #c9c1b1;
  --muted: #9a9283; --line: #36322b; --accent: #e08259; --accent-soft: #3a2a21; --sage: #93ad96;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 14px 34px -20px rgba(0,0,0,.6); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 0);
  background-size: 22px 22px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--card); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.mark { text-decoration: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font: 600 14px/1 var(--mono); letter-spacing: .04em; }
.nav { display: flex; gap: 22px; margin-left: 12px; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 14.5px; }
.nav a:hover { color: var(--accent); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); }
.lang button { border: 0; background: none; color: var(--muted); font: 500 12px var(--mono); padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.theme { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.theme svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme .sun { display: none; }
  :root:not([data-theme]) .theme .moon { display: block; }
}

/* Hero */
.hero { display: grid; grid-template-columns: 1.35fr .9fr; gap: 56px; align-items: center; padding: 88px 0 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--mono); color: var(--muted); margin: 0 0 18px; letter-spacing: .02em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sage) 22%, transparent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 82px); font-weight: 700; }
.handle { margin: 6px 0 0; font: 500 14px var(--mono); color: var(--muted); }
.handle b { color: var(--ink-2); font-weight: 500; }
.role { font: 400 clamp(20px, 2.6vw, 28px)/1.3 var(--serif); font-style: italic; color: var(--accent); margin: 10px 0 22px; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 54ch; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { text-decoration: none; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-weight: 500; font-size: 15px; transition: transform .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-2px); border-color: var(--ink-2); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.ghost { background: none; }
.hero-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: var(--shadow);
  transform: rotate(1.2deg); }
.hero-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18px; filter: saturate(.9); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 0; }
.stats div { border-top: 1px solid var(--line); padding-top: 10px; }
.stats dt { font: 600 28px/1 var(--serif); }
.stats dd { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.sec-head { margin-bottom: 32px; }
.kicker { font: 500 12.5px var(--mono); color: var(--accent); margin: 0 0 10px; letter-spacing: .08em; text-transform: uppercase; }
h2 { font-size: clamp(30px, 4vw, 44px); }
.sec-sub { color: var(--muted); max-width: 62ch; margin: 12px 0 0; }
.two { display: grid; grid-template-columns: 280px 1fr; gap: 48px; }

/* Filters + grid */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); padding: 8px 14px; border-radius: 999px;
  font: 500 14px var(--sans); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: background .2s, color .2s; }
.chip .n { font: 500 11.5px var(--mono); color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] .n { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease; animation: rise .45s ease both; }
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cover { height: 150px; position: relative; overflow: hidden; display: grid; place-items: center; background: var(--c, var(--bg-2)); }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cover .glyph { font: 700 54px/1 var(--serif); color: color-mix(in srgb, var(--ink) 75%, transparent); opacity: .85; letter-spacing: -.02em; }
.cover::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--ink) 4%, transparent) 14px 15px); pointer-events: none; }
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .cat { font: 500 11.5px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .07em; }
.card h3 { font-size: 21px; }
.card p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tags span { font: 500 11.5px var(--mono); color: var(--muted); background: var(--bg-2); border-radius: 6px; padding: 3px 7px; }
.card .arrow { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--card) 85%, transparent); font-size: 15px; border: 1px solid var(--line); }
.badge { position: absolute; top: 12px; left: 12px; font: 500 11px var(--mono); background: var(--sage); color: #fff; padding: 3px 8px; border-radius: 999px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Series */
.series { margin-top: 44px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.series h3 { font-size: 28px; }
.days { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 20px; counter-reset: d; }
.days a { display: flex; gap: 12px; align-items: baseline; text-decoration: none; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; color: var(--ink-2); }
.days a:hover { color: var(--accent); }
.days b { font: 500 12px var(--mono); color: var(--muted); min-width: 22px; }

/* About / timeline / skills */
.prose p { font-size: 17px; color: var(--ink-2); margin: 0 0 16px; max-width: 64ch; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.facts li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.facts span { font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
.timeline > li { position: relative; padding: 0 0 34px; }
.timeline > li::before { content: ""; position: absolute; left: -29px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.when { font: 500 12.5px var(--mono); color: var(--muted); margin: 0 0 6px; }
.timeline h3 { font-size: 22px; }
.org { margin: 4px 0 10px; color: var(--accent); font-weight: 500; }
.timeline ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.skill h3 { font-size: 19px; margin-bottom: 8px; }
.skill p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.creds { display: grid; gap: 20px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list a { text-decoration: none; font-weight: 500; }
.list a:hover { color: var(--accent); }
.list li > span:last-child { color: var(--muted); font-size: 14px; text-align: right; }
.plain { font-weight: 500; }

/* Contact + footer */
.contact { text-align: center; padding: 96px 0; }
.contact .sec-sub { margin-inline: auto; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.contact-links a { text-decoration: none; padding: 12px 18px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; font-weight: 500; }
.contact-links a:hover { border-color: var(--accent); color: var(--accent); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 26px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.foot p { margin: 0; }

@media (max-width: 900px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 56px; gap: 36px; }
  .hero-card { max-width: 420px; transform: none; }
  .two { grid-template-columns: 1fr; gap: 20px; }
  .skills { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .skills, .facts { grid-template-columns: 1fr; }
  .list li { flex-direction: column; gap: 2px; }
  .list li > span:last-child { text-align: left; }
  .series { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
