/* =========================================================
   Personal website — clean & minimal
   Single accent color, generous whitespace, readable type.
   Edit the variables below to re-theme the whole site.
   ========================================================= */

:root {
  --accent: #2563eb;        /* single accent color — change to re-theme */
  --accent-dark: #1d4ed8;
  --ink: #1a1a1a;           /* body text */
  --ink-soft: #555;         /* secondary text */
  --line: #e6e6e6;          /* hairline borders */
  --bg: #ffffff;
  --bg-soft: #f7f8fa;       /* alternating section background */
  --max: 900px;             /* content column width */
  --radius: 10px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout helpers ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.section__title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.section__lead { color: var(--ink-soft); margin: 0 0 40px; max-width: 60ch; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
.muted { color: var(--ink-soft); }
.todo { /* highlights placeholder text so you can spot what to replace */
  background: #fff6d6;
  border-bottom: 1px dashed #d9b400;
  padding: 0 2px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: var(--max); margin: 0 auto; padding: 0 24px;
}
.nav__brand { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink-soft); font-size: 0.95rem; }
.nav__links a:hover, .nav__links a.is-active { color: var(--accent); text-decoration: none; }
.nav__toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

@media (max-width: 640px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .nav__links.is-open { max-height: 320px; }
  .nav__links li { border-top: 1px solid var(--line); }
  .nav__links a { display: block; padding: 14px 24px; }
}

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; }
.hero__inner { display: grid; grid-template-columns: 1fr 220px; gap: 48px; align-items: center; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--accent); font-weight: 600; margin: 0 0 12px; }
.hero__title { font-size: 3rem; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero__subtitle { font-size: 1.25rem; color: var(--ink-soft); margin: 0 0 28px; max-width: 34ch; }
.hero__photo {
  width: 220px; height: 220px; border-radius: 50%;
  object-fit: cover; border: 4px solid var(--bg); box-shadow: 0 6px 30px rgba(0,0,0,0.12);
}
@media (max-width: 720px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__photo { margin: 0 auto; width: 160px; height: 160px; }
  .hero__title { font-size: 2.2rem; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); text-decoration: none; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 720px) { .btn-row { justify-content: center; } }

/* ---------- Cards grid (projects / articles) ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; background: var(--bg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.07); border-color: #d8dde6; }
.card__tag {
  display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; color: var(--accent); background: #eef2ff; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.card__title { font-size: 1.3rem; margin: 0 0 10px; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--accent); }
.card__meta { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 12px; }
.card p { margin: 0 0 16px; color: var(--ink-soft); font-size: 0.98rem; }
.card__link { font-weight: 600; font-size: 0.9rem; }

/* ---------- Timeline (History) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line);
}
.timeline__item { position: relative; padding: 0 0 36px 40px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: 2px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg);
}
.timeline__year { font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.timeline__heading { font-family: var(--font-head); font-size: 1.2rem; margin: 4px 0 6px; }
.timeline__item p { margin: 0; color: var(--ink-soft); }

/* ---------- Photo gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery figure { margin: 0; }
.gallery img, .gallery .ph {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); display: block; background: var(--bg-soft);
}
.gallery figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 8px; }

/* Placeholder image block (grey box with label) — replace <div.ph> with real <img> */
.ph {
  display: flex; align-items: center; justify-content: center;
  color: #9aa3b2; font-size: 0.8rem; text-align: center; padding: 12px;
  border: 1px dashed #cfd6e0;
}

/* ---------- Prose (about page) ---------- */
.prose { max-width: 68ch; }
.prose p { margin: 0 0 20px; }
.prose h3 { font-size: 1.4rem; margin: 40px 0 12px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--ink-soft); font-size: 0.9rem; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.social { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.social a { color: var(--ink-soft); }
.social a:hover { color: var(--accent); }

/* ---------- Reveal-on-scroll animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
