:root {
  --bg: #121211;
  --bg-elevated: #1a1a18;
  --text: #e8e4dc;
  --text-muted: #9a958c;
  --border: rgba(232, 228, 220, 0.12);
  --accent: #c4a574;
  --accent-soft: rgba(196, 165, 116, 0.14);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --max: 40rem;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-elevated: #fffdf8;
  --text: #1a1916;
  --text-muted: #5c574e;
  --border: rgba(26, 25, 22, 0.12);
  --accent: #8a6a3a;
  --accent-soft: rgba(138, 106, 58, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--accent-soft), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(120, 140, 160, 0.06), transparent 50%);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--accent-soft), transparent 55%),
    radial-gradient(ellipse 50% 30% at 90% 10%, rgba(80, 100, 90, 0.05), transparent 50%);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  opacity: 0.88;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(100%, calc(var(--max) + var(--pad) * 2));
  margin: 0 auto;
  padding: 0 var(--pad) 4rem;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1.25rem 0 0;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.hero {
  min-height: calc(100svh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 0 3.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 10vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.hero .role {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  max-width: 28rem;
}

.hero .lede {
  margin: 0 0 2rem;
  max-width: 32rem;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: opacity 0.2s var(--ease);
}

.btn:hover {
  opacity: 0.9;
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  font-weight: 500;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
}

.links-row a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.links-row a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
  opacity: 1;
}

section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.work-item {
  padding: 1.25rem 0 0;
}

.work-item:first-child {
  padding-top: 0;
}

.work-item .label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.work-item h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.work-item p {
  margin: 0;
  color: var(--text-muted);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.timeline li {
  display: grid;
  gap: 0.35rem;
}

.timeline .meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.timeline h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0;
}

.timeline p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9875rem;
}

.skills {
  display: grid;
  gap: 1rem;
}

.skill-block h3 {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.skill-block p {
  margin: 0;
  color: var(--text-muted);
}

.edu p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.edu strong {
  font-weight: 600;
  color: var(--text);
}

.contact-block p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.contact-block .links-row {
  margin-top: 0.5rem;
}

footer {
  padding: 2rem 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
