/* ===== Design tokens ===== */
:root {
  --bg: #fbfaf8;
  --bg-alt: #f3f1ec;
  --surface: #ffffff;
  --text: #23231f;
  --text-muted: #6b6a63;
  --accent: #8a6f4b;
  --accent-strong: #5c4a30;
  --line: #e6e2d8;
  --shadow: 0 10px 30px -15px rgba(35, 35, 31, 0.15);
  --radius: 16px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1120px;
}

* { 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; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-strong);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; border-radius: 8px; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 248, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}
.logo span { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
}

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

.nav-cta {
  background: var(--text);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.9rem !important;
}
.nav-cta:hover { background: var(--accent-strong); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--text);
  margin: 0 auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 88px 24px 96px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  color: var(--text);
  margin-bottom: 22px;
}

.hero h1 .highlight { color: var(--accent-strong); font-style: italic; }

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--text);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-outline {
  border-color: var(--text);
  color: var(--text);
}
.btn-outline:hover { background: var(--text); color: #fff; transform: translateY(-2px); }

.hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.avatar-ring {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--bg-alt), var(--surface));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.avatar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--surface);
}

.floating-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 150px;
}
.floating-card strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-strong);
}
.floating-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.card-1 { top: 8%; left: -6%; }
.card-2 { bottom: 8%; right: -8%; }

/* ===== Sections ===== */
.section { padding: 96px 24px; }

.section-heading { margin-bottom: 48px; }
.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--text);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-lead {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
}

.about-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.about-facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.about-facts li:last-child { border-bottom: none; padding-bottom: 0; }
.about-facts strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.about-facts span { color: var(--text-muted); font-size: 0.95rem; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.skill-card h3 {
  font-size: 1.1rem;
  margin-bottom: 18px;
  color: var(--accent-strong);
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tag-list li {
  font-size: 0.92rem;
  color: var(--text);
  padding-left: 18px;
  position: relative;
}
.tag-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.tag-list em { color: var(--text-muted); font-style: normal; font-size: 0.82rem; }

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--line);
}

.timeline-item { position: relative; }

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.timeline-head h3 { font-size: 1.2rem; }

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-org {
  font-weight: 600;
  color: var(--accent-strong);
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.timeline-content ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.timeline-content li { font-size: 0.95rem; color: var(--text); }

.education-block {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.education-block h3 {
  font-size: 1.1rem;
  color: var(--accent-strong);
  margin-bottom: 10px;
}
.education-block p { margin: 0; color: var(--text); }

/* Contact */
.contact-box {
  background: linear-gradient(160deg, var(--bg-alt), var(--surface));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
}
.contact-box .section-heading { margin-bottom: 16px; }
.contact-sub {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px 22px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.92rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.contact-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.contact-icon {
  font-size: 1rem;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--accent-strong);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.back-to-top { color: var(--text-muted); transition: color 0.2s ease; }
.back-to-top:hover { color: var(--accent-strong); }

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; text-align: left; }
  .hero-visual { order: -1; min-height: 320px; }
  .avatar-ring { width: 220px; height: 220px; }
  .avatar { width: 170px; height: 170px; font-size: 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .card-1 { left: 0; }
  .card-2 { right: 0; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-cta { align-self: flex-start; }

  .section { padding: 64px 20px; }
  .skills-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 20px; }
  .timeline-content { padding: 22px; }
  .contact-box { padding: 40px 24px; }
  .floating-card { display: none; }
}
