:root {
  --max: 1100px;
  --font: "Roboto Flex", -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

/* -----------------------------------------------------
   Light Theme – Warm Minimal
----------------------------------------------------- */
body.theme-light {
  --bg: #F9F5E4; /* Cosmic Latte */
  --panel: #FFFDF7;
  --text: #2C2A25;
  --muted: #6F675F;
  --accent: #C86B4A; /* Terracotta */
  --btnText: #ffffff;
  --line: rgba(0, 0, 0, .08);
  --shadow: 0 6px 20px rgba(60, 50, 40, .08);
}

/* -----------------------------------------------------
   Dark Theme – Warm Espresso
----------------------------------------------------- */
body.theme-dark {
  --bg: #1A1614; /* Espresso base */
  --panel: #221E1C;
  --text: #F5EDE4;
  --muted: #B6AFA8;
  --accent: #E58B68; /* Soft warm coral */
  --btnText: #1A1614;
  --line: rgba(255, 255, 255, .12);
  --shadow: 0 10px 30px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

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

/* Layout */
.container { max-width: var(--max); margin-inline: auto; padding: 0 20px; }
.section { padding: 72px 0; }
h2 { font-size: 1.45rem; margin: 0 0 16px; text-align: center; }

/* Header */
.topbar { background: color-mix(in oklab, var(--bg) 90%, #000 10%); padding: 8px 0; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 700; letter-spacing: -.2px; text-decoration: none; color: var(--text); }
.menu { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--muted);
  border-radius: 24px;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .4s;
}
input:checked + .slider { background: var(--accent); }
input:checked + .slider:before { transform: translateX(22px); }

/* Buttons */
.nav-btn, .btn {
  font: 500 0.95rem/1 var(--font);
  text-transform: lowercase;
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  transition: .25s ease;
}
.nav-btn { color: var(--text); opacity: .85; }
.nav-btn:hover { opacity: 1; color: var(--accent); }
.btn { background: var(--accent); color: var(--btnText); box-shadow: var(--shadow); }
.btn:hover { transform: translateY(-2px); }
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn.ghost:hover {
  background: color-mix(in oklab, var(--accent) 20%, transparent);
}

/* Hero */
.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.hero-title {
  margin: 0;
  text-align: center;
  font-weight: 800;
  letter-spacing: -.4px;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.18;
}
.accent { color: var(--accent); }
.lead {
  color: var(--muted);
  max-width: 72ch;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}
.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Animations */
.reveal-line {
  display: block;
  opacity: 0;
  transform: translateY(28px) scale(.985);
  filter: blur(6px);
  animation: heroIn 2.2s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: var(--d,0s);
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  animation: fadeUp 2s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: var(--d,0s);
}
@keyframes heroIn { to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); filter: blur(0); } }

/* About */
.about-grid {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  color: var(--muted);
  text-align: center;
}

/* Experience */
.timeline {
  list-style: none;
  padding: 0;
  margin: 24px auto 0;
  max-width: 900px;
  display: grid;
  gap: 14px;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity .8s ease, transform .8s ease, filter .8s ease;
}
.tile.show { opacity: 1; transform: none; filter: none; }
.tile header { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px; }
.tile h3 { margin: 0; font-size: 1.02rem; }
.meta { color: var(--muted); font-size: .95rem; }
.tile ul { margin: 8px 0 0 18px; }

/* Footer */
.foot {
  padding: 36px 20px;
  color: var(--muted);
  text-align: right;
  border-top: 1px solid var(--line);
}
