/* ponytail: one stylesheet, no build step, no framework. Edit values here. */

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #666;
  --border: #e4e4e0;
  --accent: #2563eb;
  --radius: 10px;
  --maxw: 720px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #16161a;
  --surface: #1f1f24;
  --text: #ececec;
  --muted: #9a9a9a;
  --border: #333338;
  --accent: #6ea8fe;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16161a;
    --surface: #1f1f24;
    --text: #ececec;
    --muted: #9a9a9a;
    --border: #333338;
    --accent: #6ea8fe;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2.6rem; margin: 0.2em 0; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; margin: 0 0 1rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }

/* --- header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem clamp(1rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; color: var(--text); letter-spacing: 0.05em; }
.site-header nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); font-size: 0.9rem; }
.site-header nav a:hover { color: var(--text); text-decoration: none; }
#theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  width: 2.1rem; height: 2.1rem;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}

/* --- layout --- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}
section { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }

.hero { padding-top: 4.5rem; border-bottom: 1px solid var(--border); }
.eyebrow { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin: 0; }
.lede { font-size: 1.15rem; color: var(--text); max-width: 36em; }
.hero-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }

.facts { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.facts strong { display: inline-block; min-width: 6rem; color: var(--muted); font-weight: 600; }

/* --- timeline --- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  padding-bottom: 1.5rem;
}
.timeline > li::before {
  content: "";
  position: absolute;
  left: -7px; top: 0.55rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline > li:last-child { padding-bottom: 0; }

details summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
.role { font-weight: 650; }
.when { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.summary-line { color: var(--muted); margin: 0.3rem 0 0.6rem; font-size: 0.95rem; }
.timeline ul { margin: 0.5rem 0; padding-left: 1.1rem; }
.timeline li li { margin-bottom: 0.3rem; }
.stack { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }

/* --- projects --- */
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgb(0 0 0 / 0.08); }
.card.is-hidden { display: none; }
.card p { font-size: 0.95rem; }
.card .tags { font-size: 0.8rem; color: var(--muted); margin-bottom: 0; }

/* --- skills / background --- */
.skills { display: grid; gap: 0.75rem; margin: 0; }
.skills div { display: flex; gap: 1rem; }
.skills dt { min-width: 7.5rem; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.skills dd { margin: 0; }

.contact { list-style: none; padding: 0; display: grid; gap: 0.35rem; }

/* --- footer --- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 5vw, 2rem) 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* --- scroll reveal --- */
.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; }
}

/* --- responsive --- */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .site-header nav { gap: 0.7rem; }
  .site-header nav a { font-size: 0.82rem; }
  .skills div { flex-direction: column; gap: 0.2rem; }
}

/* --- print: clean one-column CV, everything expanded --- */
@media print {
  .site-header, #theme-toggle, .filters, .site-footer, .hero-meta a { display: none; }
  body { font-size: 11pt; line-height: 1.4; color: #000; background: #fff; }
  section { padding: 1rem 0; border-bottom: 1px solid #ccc; }
  details:not([open]) > *:not(summary) { display: revert; }
  .card { break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
}
