/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clay:    #e8e0d5;
  --cream:   #f7f3ee;
  --sand:    #d4c8b8;
  --forest:  #1b3a6b;
  --forest2: #2a5298;
  --gold:    #c4973a;
  --dark:    #1a1a1a;
  --mid:     #555;
  --light:   #888;
  --white:   #ffffff;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius: 1.5rem;
  --section-pad: clamp(4rem, 10vw, 8rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Utilities ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.btn-primary { background: var(--forest); color: var(--white); }
.btn-large { font-size: 1rem; padding: 1rem 2.5rem; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(247, 243, 238, .95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0,0,0,.08);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--forest);
  text-decoration: none;
  letter-spacing: .04em;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  position: relative;
  transition: color .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--forest);
  transition: width .25s;
}
.nav-links a:hover { color: var(--forest); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ── Hero ── */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 8rem clamp(1.25rem, 5vw, 2.5rem) 4rem;
  max-width: 1120px;
  margin: 0 auto;
}
.hero-content { order: 1; }
.hero-eyebrow {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--forest2);
  margin-bottom: 1rem;
}
.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.05;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.5rem;
}
.hero-name span { color: var(--forest); }
.hero-tagline {
  font-size: clamp(.95rem, 1.5vw, 1.1rem);
  color: var(--mid);
  margin-bottom: 2.5rem;
  max-width: 38ch;
  line-height: 1.8;
}

.hero-visual {
  order: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-blob {
  width: clamp(260px, 38vw, 440px);
  height: clamp(260px, 38vw, 440px);
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest2) 60%, var(--gold) 100%);
  border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
  animation: morph 8s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-blob::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  background: inherit;
  opacity: .18;
  filter: blur(24px);
  animation: morph 8s ease-in-out infinite reverse;
}
.hero-initials {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: rgba(255,255,255,.9);
  letter-spacing: .05em;
  position: relative;
  z-index: 1;
}

@keyframes morph {
  0%,100% { border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%; }
  33%      { border-radius: 40% 60% 45% 55% / 55% 40% 60% 45%; }
  66%      { border-radius: 50% 50% 60% 40% / 40% 60% 50% 50%; }
}

/* ── Sections ── */
.section { padding: var(--section-pad) 0; }
.section-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 3rem;
}

/* ── About ── */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--mid);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  max-width: 46ch;
}
.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.stat { display: flex; flex-direction: column; gap: .25rem; }
.stat-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
}
.stat-label {
  font-size: .8rem;
  color: var(--light);
  font-weight: 500;
}

.about-card-wrap { display: flex; align-items: center; justify-content: center; }
.about-card {
  background: var(--forest);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
}
.about-card-icon {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.about-card blockquote {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.6;
  font-style: italic;
  color: rgba(255,255,255,.9);
}

/* ── What I Do ── */
.what-i-do { background: var(--cream); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--sand);
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}
.card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: .75rem;
}
.card p {
  font-size: .92rem;
  color: var(--mid);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.card-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.card-tags li {
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: var(--clay);
  color: var(--forest);
  letter-spacing: .03em;
}

/* ── Education / Timeline ── */
.education { background: var(--cream); }

.werdegang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.werdegang-col-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 2rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--sand);
}

.timeline {
  position: relative;
  max-width: 680px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 120px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--forest) 0%, var(--gold) 100%);
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding-bottom: 2.75rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-year {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--forest2);
  text-align: right;
  padding-right: 1.5rem;
  padding-top: .25rem;
  line-height: 1.5;
}

.timeline-content {
  padding-left: 1.75rem;
  position: relative;
}
.timeline-content::before {
  content: '';
  position: absolute;
  left: -5px;
  top: .3rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline-content h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: .3rem;
}
.timeline-content p {
  font-size: .9rem;
  color: var(--mid);
  line-height: 1.6;
}
.timeline-badge {
  display: inline-block;
  margin-top: .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .2rem .75rem;
  border-radius: 999px;
  background: var(--clay);
  color: var(--forest);
}
.timeline-badge--current {
  background: var(--forest);
  color: var(--white);
}
.timeline-details {
  margin-top: .65rem;
}
.timeline-details summary {
  font-size: .78rem;
  font-weight: 600;
  color: var(--forest2);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  letter-spacing: .03em;
  user-select: none;
}
.timeline-details summary::-webkit-details-marker { display: none; }
.timeline-details summary::before {
  content: '▸';
  font-size: .7rem;
  transition: transform .2s;
}
.timeline-details[open] summary::before { transform: rotate(90deg); }
.timeline-details summary:hover { color: var(--gold); }
.timeline-details > p {
  margin-top: .5rem;
  font-size: .88rem;
  color: var(--mid);
  line-height: 1.65;
  max-width: 42ch;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .6rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--forest2);
  text-decoration: none;
  letter-spacing: .03em;
}
.cert-link::before {
  content: '↗';
  font-size: .85rem;
}
.cert-link:hover { color: var(--gold); }

/* ── Contact ── */
.contact {
  background: var(--clay);
  text-align: center;
}
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact-text {
  color: var(--mid);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 46ch;
}

/* ── Footer ── */
.footer {
  background: var(--dark);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--white);
}
.footer-copy {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}
.footer-link {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .2s;
}
.footer-link:hover { color: var(--gold); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 7rem;
    gap: 2.5rem;
  }
  .hero-content { order: 2; }
  .hero-visual { order: 1; }
  .hero-tagline { margin: 0 auto 2.5rem; }

  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-text p { max-width: 100%; }

  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: disable GPU-intensive effects for faster paint */
@media (max-width: 768px) {
  .hero-blob {
    animation: none;
    border-radius: 50%;
  }
  .hero-blob::before {
    display: none;
  }
  .nav.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(247, 243, 238, .97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob, .hero-blob::before { animation: none; }
  .hero-blob { border-radius: 50%; }
  .hero-blob::before { display: none; }
  * { transition-duration: 0.01ms !important; }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.3rem; }
  .nav-toggle { display: flex; z-index: 10; }

  .cards-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: column; gap: 1.5rem; }

  .werdegang-grid { grid-template-columns: 1fr; gap: 3rem; }
  .timeline::before { left: 80px; }
  .timeline-item { grid-template-columns: 80px 1fr; }
  .timeline-year { font-size: .72rem; padding-right: 1rem; }

  .hero-blob { width: 240px; height: 240px; }
}
