/* ===== Design tokens ===== */
:root {
  --color-bg: #FAFAF7;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F1F5F3;
  --color-primary: #1C4E4E;
  --color-primary-dark: #123636;
  --color-primary-light: #E7F0EE;
  --color-accent: #C97B63;
  --color-accent-light: #F6E4DD;
  --color-text: #22303C;
  --color-text-muted: #5B6B76;
  --color-border: #E3E7E4;
  --font-serif: 'Fraunces', serif;
  --font-sans: 'Inter', sans-serif;
  --max-width: 1080px;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(18, 54, 54, 0.06);
  --shadow-md: 0 8px 24px rgba(18, 54, 54, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
  color: var(--color-primary-dark);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Progress bar ===== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-accent);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-light); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
  padding: 9px 18px;
  font-size: 0.82rem;
}
.btn-ghost:hover { color: var(--color-primary); border-color: var(--color-primary); }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: 0;
}
.hero-blob-1 {
  width: 380px; height: 380px;
  background: var(--color-primary-light);
  top: -120px; right: -80px;
}
.hero-blob-2 {
  width: 280px; height: 280px;
  background: var(--color-accent-light);
  bottom: -100px; left: -60px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: center;
}

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

.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-summary {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  max-width: 560px;
  margin-bottom: 24px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.badge {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-photo {
  display: flex;
  justify-content: center;
}

.avatar-frame {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--color-primary), var(--color-primary-dark));
  padding: 6px;
  box-shadow: var(--shadow-md);
}

.avatar-placeholder,
.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  color: var(--color-primary);
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 600;
}

/* ===== Sections ===== */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 40px;
}

.subsection-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 18px;
}

.subsection-title-spaced { margin-top: 40px; }

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

.about-text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.about-facts li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  font-weight: 600;
}

.fact-value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--color-border);
}

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

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

.section-alt .timeline-marker { box-shadow: 0 0 0 2px var(--color-accent); border-color: var(--color-surface); }

.timeline-date {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.timeline-role {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.timeline-org {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: 10px;
}

.timeline-content ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-content li {
  position: relative;
  padding-left: 18px;
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

.timeline-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.5;
}

/* ===== Skills / Languages ===== */
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}

.lang-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.lang-level { color: var(--color-text-muted); }

.lang-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}

.lang-bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 999px;
}

/* ===== Entry links & documents ===== */
.entry-link {
  margin-top: 12px;
  font-size: 0.92rem;
}

.entry-link a {
  color: var(--color-primary);
  font-weight: 600;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 1px;
}

.entry-link a:hover { color: var(--color-accent); }

.doc-links { margin-top: 16px; }

.doc-links-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.doc-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-link {
  display: inline-block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.doc-link:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* ===== Per-entry photos ===== */
.item-photos:empty { display: none; }

.item-photos .photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.item-photos .photo-grid img,
.item-photos .photo-grid video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  background: #000;
}

.item-photos .photo-grid video {
  grid-column: span 2;
  height: 160px;
}

/* ===== Achievements ===== */
.achievement-highlight {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--color-accent-light);
  border-radius: var(--radius);
  padding: 22px 26px;
}

.achievement-icon { font-size: 2rem; }

.achievement-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primary-dark);
}

.achievement-sub {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.cert-grid,
.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.cert-card,
.award-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.cert-name {
  font-weight: 600;
  font-size: 0.94rem;
  margin-bottom: 4px;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.cert-date {
  font-size: 0.78rem;
  color: var(--color-accent);
  font-weight: 600;
}

.achievements-note {
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ===== Empty state (Projects) ===== */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.empty-state-icon { font-size: 2.2rem; margin-bottom: 12px; }

.empty-state-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.empty-state-text {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  max-width: 420px;
  margin: 0 auto;
}

/* ===== Contact ===== */
.contact-inner { text-align: center; }
.contact-inner .section-title { margin-bottom: 14px; }

.contact-text {
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
}

.contact-details {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  font-weight: 600;
}

.contact-value {
  font-size: 1rem;
  font-weight: 500;
}

a.contact-item:hover .contact-value { color: var(--color-primary); }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 32px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-summary { margin-left: auto; margin-right: auto; }
  .hero-badges, .hero-cta { justify-content: center; }
  .hero-photo { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 20px 32px;
    gap: 18px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
  .btn-print { display: none; }
  .header-inner { padding: 14px 20px; }
  .section-inner { padding: 0 20px; }
  .avatar-frame { width: 180px; height: 180px; }
}

/* ===== Print ===== */
@media print {
  .site-header, .progress-bar, .hero-blob, .site-footer, .btn-print { display: none !important; }
  body { background: #fff; }
  .section, .hero { padding: 24px 0; }
  .section-alt { border: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: var(--color-text) !important; }
}
