/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:          #ede4d3;
  --text:        #0e0b08;
  --muted:       #1a1410;
  --subtle:      #4a3f35;
  --border:      #d4c9b5;
  --accent:      #b07d4d;
  --accent-soft: #f0e2cc;
  --hero-bg:     #36322a;
  --hero-text:   #f8f7f4;
  --hero-muted:  #a8a89e;
  --card-bg:     #e3d8c4;
  --radius:      12px;
  --font-head:   'Playfair Display', Georgia, serif;
  --font-body:   'Lora', Georgia, serif;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul { list-style: none; }

/* ── Nav ───────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--hero-bg) 96%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-brand {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--hero-text);
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; opacity: 0.85; }

/* Section links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.nav-links li {
  display: flex;
  align-items: center;
}
.nav-links li + li::before {
  content: '|';
  color: rgba(255,255,255,0.2);
  font-size: 0.85rem;
  pointer-events: none;
  flex-shrink: 0;
}
.nav-link {
  color: var(--hero-muted);
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: var(--hero-text);
  background: rgba(255,255,255,0.07);
  text-decoration: none;
}
.nav-link.active { color: var(--accent); }

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.lang-sep { color: rgba(255,255,255,0.25); font-size: 0.9rem; }
.lang-btn {
  background: none;
  border: none;
  color: var(--hero-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.2s;
}
.lang-btn.active { color: var(--hero-text); }
.lang-btn:hover  { color: var(--hero-text); }

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--hero-muted);
  border-radius: 2px;
  transition: all 0.25s;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 6rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative side panels */
.hero-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  pointer-events: none;
}
.hero-side--left  { left: 3.5rem; flex-direction: row; }
.hero-side--right { right: 3.5rem; flex-direction: row-reverse; }
.hero-side-line {
  display: block;
  width: 1px;
  height: 140px;
  background: linear-gradient(to bottom, transparent, rgba(176,125,77,0.55), transparent);
}
.hero-side-text {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 3.5px;
  color: rgba(176,125,77,0.4);
  writing-mode: vertical-rl;
  text-transform: uppercase;
  user-select: none;
}
.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* ── Hero photo ────────────────────────────────────────── */
.hero-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(176,125,77,0.18), 0 8px 24px rgba(0,0,0,0.35);
  margin-bottom: 1.6rem;
  flex-shrink: 0;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(3.2rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.0;
  color: var(--hero-text);
  margin-bottom: 1.8rem;
}
.hero-divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1.8rem;
}
.hero-bio {
  font-size: 1.0rem;
  color: var(--hero-muted);
  line-height: 1.75;
  max-width: 540px;
  margin-bottom: 2.4rem;
}
.hero-cta {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}
.cta-primary,
.cta-secondary {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.cta-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}
.cta-secondary {
  background: transparent;
  color: var(--hero-text);
  border: 2px solid rgba(255,255,255,0.18);
}
.cta-primary:hover,
.cta-secondary:hover { opacity: 0.85; transform: translateY(-1px); text-decoration: none; }

/* Quick-nav pills inside hero */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}
.hero-pill {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--hero-muted);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.hero-pill:hover {
  color: var(--hero-text);
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

/* ── Section shell ──────────────────────────────────────── */
.cv-section {
  padding: 5rem 2rem;
  scroll-margin-top: 70px;
}
.cv-section--alt { background: var(--card-bg); }

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}
.section-heading {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  position: relative;
  display: inline-block;
}
.section-heading::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section-intro {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 640px;
  margin-top: 1.4rem;
  margin-bottom: 2.8rem;
}

/* ── Education cards ───────────────────────────────────── */
.edu-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.edu-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.edu-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.edu-card--highlight {
  border-left: 3px solid var(--accent);
}
.edu-card-period {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.3px;
  padding-top: 0.2rem;
  white-space: nowrap;
}
.edu-card-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.edu-card-institution {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.edu-card-inst-name { color: var(--text); font-weight: 500; }
.edu-card-sep { color: var(--subtle); }
.edu-card-location { font-style: italic; }
.edu-card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Language cards ────────────────────────────────────── */
.lang-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}
.lang-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  transition: box-shadow 0.2s;
}
.lang-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.lang-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}
.lang-card-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.lang-card-level {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.2px;
}
.lang-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.lang-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, orange));
  border-radius: 999px;
  transition: width 0.6s ease;
}
.lang-card-detail {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Skills groups ─────────────────────────────────────── */
.skills-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
}
.skill-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  transition: box-shadow 0.2s;
}
.skill-group:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.skill-group-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-group-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.skill-group-list li {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}
.skill-group-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Hobbies grid ──────────────────────────────────────── */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.4rem;
}
.hobby-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.hobby-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}
.hobby-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1;
}
.hobby-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.hobby-desc {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Contact big ───────────────────────────────────────── */
.contact-big {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.4rem;
  margin-top: 0;
}
.contact-big li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  transition: box-shadow 0.2s;
}
.contact-big li:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.contact-icon-big {
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--subtle);
}
.contact-detail a {
  font-size: 0.93rem;
  color: var(--text);
  transition: color 0.2s;
}
.contact-detail a:hover { color: var(--accent); text-decoration: none; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--hero-bg);
  color: var(--hero-muted);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  /* Hamburger menu */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 58px;
    left: 0; right: 0;
    background: color-mix(in srgb, var(--hero-bg) 98%, transparent);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 2rem 1.4rem;
    gap: 0.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 1rem; padding: 0.5rem 0.7rem; }
  .nav-links li + li::before { display: none; }

  /* Education cards go single-column */
  .edu-card { grid-template-columns: 1fr; gap: 0.4rem; }
  .edu-card-period { padding-top: 0; }

  .hero-side { display: none; }
  .cv-section { padding: 3.5rem 1.4rem; }
  .hero { padding: 4rem 1.4rem 3.5rem; }
  .hero-name { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .nav-inner { padding: 0 1.4rem; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.8rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .cta-primary, .cta-secondary { width: 100%; max-width: 260px; text-align: center; }
  .hero-pills { gap: 0.4rem; }
  .section-heading { font-size: 1.7rem; }
}