:root {
  --bg: #f5efe6;
  --surface: #fbf8f3;
  --text: #3b2f25;
  --muted: #7a6a5a;
  --border: #e6dccd;
  --accent: #8b5e3c;
  --accent-soft: #efe3d3;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgb(59 47 37 / 0.05), 0 8px 24px rgb(59 47 37 / 0.08);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1814;
  --surface: #26201b;
  --text: #f2ebe1;
  --muted: #b5a797;
  --border: #3a3129;
  --accent: #c99a6e;
  --accent-soft: #3a2c20;
  --on-accent: #1c1814;
  --shadow: 0 8px 24px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1c1814;
  --surface: #26201b;
  --text: #f2ebe1;
  --muted: #b5a797;
  --border: #3a3129;
  --accent: #c99a6e;
  --accent-soft: #3a2c20;
  --on-accent: #1c1814;
  --shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] {
  display: none !important;
}

.container {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
}

.menu-btn {
  display: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
  word-break: break-all;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 96px 0 72px;
}

.eyebrow {
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 8px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero h2 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--muted);
  margin: 12px 0 20px;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 24px;
}

.hero-photo {
  justify-self: center;
  width: min(320px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #c99a6e, #6b4429);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.initials {
  font-size: 5rem;
  font-weight: 800;
  color: #fff;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.socials.center {
  justify-content: center;
  margin-top: 24px;
}

.socials a {
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Sections */
.section {
  padding: 72px 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: none;
}

.section-title {
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: 10px;
}

.about-text p {
  font-size: 1.08rem;
  max-width: 70ch;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.highlight strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1.2;
}

.highlight span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Cards */
.cards,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 12px;
}

.project {
  display: flex;
  flex-direction: column;
}

.card-link {
  margin-top: auto;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.chips li {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
}

.chips.small li {
  font-size: 0.8rem;
  padding: 3px 10px;
}

.interest .emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-head h4 {
  margin: 0;
  font-size: 1.2rem;
}

.timeline-head p {
  margin: 2px 0 0;
}

.period {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.achievements {
  margin: 14px 0 0;
  padding-left: 20px;
}

.achievements li {
  margin-bottom: 6px;
}

.achievements li::marker {
  color: var(--accent);
}

/* Contact & footer */
.contact {
  text-align: center;
}

.contact .section-title::after {
  margin-inline: auto;
}

.contact .lead {
  margin: 0 auto 28px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 820px) {
  .menu-btn {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 10px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 56px 0 40px;
    gap: 32px;
  }

  .hero-photo {
    order: -1;
    width: 160px;
  }

  .initials {
    font-size: 3rem;
  }

  .section {
    padding: 48px 0;
  }
}

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

@media print {
  .nav,
  .hero-cta,
  .footer {
    display: none;
  }
  .section {
    opacity: 1;
    transform: none;
  }
}
