/* =========================================================
   Design tokens
   Neutral base + a single accent color. Change --accent to
   re-theme the whole site.
   ========================================================= */
:root {
  --bg: #fbfaf8;
  --bg-alt: #f1f0ec;
  --text: #1a1c20;
  --text-muted: #565c66;
  --border: #e4e2dc;
  --accent: #0d9488;
  --accent-contrast: #ffffff;
  --accent-tint: color-mix(in srgb, var(--accent) 10%, var(--bg));
  --accent-tint-border: color-mix(in srgb, var(--accent) 28%, var(--bg));
  --card-bg: #ffffff;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.04), 0 8px 24px rgba(20, 22, 26, 0.06);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --max-width: 1100px;
  --radius: 8px;
}

:root[data-theme="dark"] {
  --bg: #12141a;
  --bg-alt: #181b22;
  --text: #edeef2;
  --text-muted: #9aa1ad;
  --border: #262a33;
  --accent: #2dd4bf;
  --accent-contrast: #0b0d12;
  --accent-tint: color-mix(in srgb, var(--accent) 14%, var(--bg));
  --accent-tint-border: color-mix(in srgb, var(--accent) 32%, var(--bg));
  --card-bg: #181b22;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141a;
    --bg-alt: #181b22;
    --text: #edeef2;
    --text-muted: #9aa1ad;
    --border: #262a33;
    --accent: #2dd4bf;
    --accent-contrast: #0b0d12;
    --accent-tint: color-mix(in srgb, var(--accent) 14%, var(--bg));
    --accent-tint-border: color-mix(in srgb, var(--accent) 32%, var(--bg));
    --card-bg: #181b22;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { line-height: 1.2; margin: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 24px;
}
.nav__menu {
  display: flex;
  gap: 28px;
}
.nav__menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav__menu a:hover,
.nav__menu a:focus-visible {
  color: var(--accent);
}
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  position: absolute;
  right: 24px;
  color: var(--text);
  cursor: pointer;
}
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section--contact { text-align: center; }

.section__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  margin-bottom: 32px;
}
.section__heading--center { justify-content: center; }
.section__intro {
  color: var(--text-muted);
  max-width: 60ch;
  margin: -16px 0 32px;
}
.section__intro--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 32px 0 0;
}
.section__note a { color: var(--accent); font-weight: 600; }
.section__note a:hover { text-decoration: underline; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  display: flex;
  align-items: center;
  padding: 96px 0 56px;
  background: radial-gradient(
    720px 420px at 15% 10%,
    color-mix(in srgb, var(--accent) 7%, transparent),
    transparent
  );
}
.hero__eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  margin: 0 0 12px;
  font-size: 1rem;
}
.hero__name {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__tagline {
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  color: var(--text-muted);
  font-weight: 600;
  margin: 8px 0 20px;
}
.hero__lede {
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 36px;
}
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================
   About
   ========================================================= */
.about__text p { margin: 0 0 16px; color: var(--text-muted); max-width: 68ch; }
.about__text a { color: var(--accent); font-weight: 600; }
.about__text a:hover { text-decoration: underline; }

/* =========================================================
   Timeline (Education / Experience)
   ========================================================= */
.timeline__item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.timeline__item:first-child { border-top: none; }
.timeline__date {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.timeline__content h3 { font-size: 1.1rem; margin-bottom: 4px; }
.timeline__org { color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.timeline__content p:not(.timeline__org) { color: var(--text-muted); margin: 0 0 12px; max-width: 68ch; }
.timeline__content .tag-list { margin-bottom: 12px; }

/* =========================================================
   Projects
   ========================================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease;
}
.project-card:hover { border-color: var(--accent-tint-border); }
.project-card h3 { font-size: 1.15rem; }
.project-card h3 a { color: var(--text); }
.project-card h3 a:hover { color: var(--accent); }
.project-card__meta {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin: -8px 0 0;
}
.project-card p { color: var(--text-muted); margin: 0; flex-grow: 1; }
.project-card__links {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.project-card__links a { color: var(--accent); font-weight: 600; }
.project-card__links a:hover { text-decoration: underline; }
.project-card__links span { color: var(--text-muted); }

/* =========================================================
   Skills
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.skill-group h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 6px 12px;
  border: 1px solid var(--accent-tint-border);
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
}

/* =========================================================
   Contact
   ========================================================= */
.contact__links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.social-list {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-weight: 600;
}
.social-list a { color: var(--text-muted); }
.social-list a:hover { color: var(--accent); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 720px) {
  .nav__toggle { display: flex; position: absolute; left: 24px; }
  .nav__menu {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 16px;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
  }
  .nav__menu.is-open { transform: translateY(0); }
  .timeline__item { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
