/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS – Jonas Schlatter Portfolio (Redesign 2026)
   Palette: Deep ink navy + warm sand + electric indigo accent
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,700;1,9..144,300&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* ── Core Palette ── */
  --ink:          #0d0f14;       /* Near-black main body */
  --ink-soft:     #1a1d26;       /* Card/surface dark variant */
  --sand:         #f5f0e8;       /* Warm off-white background */
  --sand-dark:    #ece5d6;       /* Slightly deeper for tinted sections */
  --sand-muted:   #d9cdb8;       /* Dividers, borders */
  --indigo:       #4f46e5;       /* Main accent – electric indigo */
  --indigo-light: #6d66f0;       /* Lighter for hover */
  --indigo-deep:  #3730c5;       /* Darker for depth */
  --indigo-glow:  rgba(79,70,229,.18);
  --terracotta:   #c4572a;       /* Warm secondary accent */
  --gold:         #b89a3e;       /* Certificate / badge accent */

  /* ── Text ── */
  --text-primary:   var(--ink);
  --text-secondary: #4a4d5c;
  --text-muted:     #888b99;
  --text-on-dark:   #f5f0e8;
  --text-on-dark-2: rgba(245,240,232,.7);

  /* ── Surfaces ── */
  --surface:        #ffffff;
  --surface-tint:   var(--sand);
  --surface-card:   #ffffff;
  --border:         var(--sand-muted);
  --border-subtle:  rgba(13,15,20,.08);

  /* ── Shadows ── */
  --shadow-sm:   0 1px 4px rgba(13,15,20,.06);
  --shadow-md:   0 6px 20px rgba(13,15,20,.09), 0 2px 6px rgba(13,15,20,.05);
  --shadow-lg:   0 16px 40px rgba(13,15,20,.12), 0 4px 10px rgba(13,15,20,.06);
  --shadow-xl:   0 24px 64px rgba(13,15,20,.16);
  --shadow-indigo: 0 8px 28px rgba(79,70,229,.28);

  /* ── Geometry ── */
  --radius-sm:   6px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-xl:   32px;
  --nav-h:       70px;

  /* ── Typography ── */
  --font-display: 'Outfit', sans-serif;
  --font-serif:   'Fraunces', serif;
  --font-body:    'Inter', sans-serif;
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--sand);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT HELPERS
═══════════════════════════════════════════════════════════ */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 104px 0;
  position: relative;
  overflow: hidden;
}

.section--tinted {
  background: var(--ink);
  color: var(--text-on-dark);
}

.section--tinted .section-label { color: var(--indigo-light); }
.section--tinted .section-title { color: var(--text-on-dark); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 14px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 60px;
  line-height: 1.1;
  letter-spacing: -.02em;
}

/* Decorative section stamp */
.section-stamp {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(8rem, 16vw, 14rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(79,70,229,.1);
  pointer-events: none;
  user-select: none;
  right: -10px;
  top: 60px;
  z-index: 0;
}

.section--tinted .section-stamp {
  -webkit-text-stroke: 1.5px rgba(109,102,240,.15);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 700;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: var(--shadow-indigo);
}
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
  pointer-events: none;
}
.btn--primary:hover {
  background: var(--indigo-light);
  box-shadow: 0 12px 36px rgba(79,70,229,.38);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(245,240,232,.1);
  color: var(--text-on-dark);
  border: 1.5px solid rgba(245,240,232,.3);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  background: rgba(245,240,232,.18);
  border-color: rgba(245,240,232,.5);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--indigo);
  border: 1.5px solid var(--indigo);
}
.btn--outline:hover {
  background: rgba(79,70,229,.06);
  transform: translateY(-2px);
}

.btn--outline-light {
  background: transparent;
  color: var(--text-on-dark);
  border: 1.5px solid rgba(245,240,232,.4);
}
.btn--outline-light:hover {
  background: rgba(245,240,232,.1);
  transform: translateY(-2px);
}

.btn--sm  { padding: 9px 20px; font-size: .875rem; }
.btn--full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(245,240,232,.88);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}

#navbar.scrolled {
  border-color: var(--sand-muted);
  box-shadow: 0 2px 20px rgba(13,15,20,.08);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.03em;
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--indigo);
  border-radius: 50%;
  margin-left: 2px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: .835rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color .2s, background .2s;
  letter-spacing: .01em;
}
.nav-link:hover,
.nav-link.active { color: var(--ink); background: rgba(13,15,20,.06); }

.nav-link--cta {
  background: var(--ink);
  color: var(--sand) !important;
  padding: 8px 20px;
  margin-left: 10px;
  border-radius: var(--radius-sm);
}
.nav-link--cta:hover { background: var(--indigo); color: #fff !important; }
.nav-link--cta.active { background: var(--indigo); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
  display: block;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Left panel – ink dark */
.hero-left {
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 64px 80px 10%;
  position: relative;
  overflow: hidden;
}

/* Right panel – sand warm */
.hero-right {
  background: var(--sand-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 10% 80px 64px;
  position: relative;
  overflow: hidden;
}

/* Subtle geometric decoration for hero-right */
.hero-right::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 60px solid var(--sand-muted);
  top: -80px;
  right: -80px;
  opacity: .5;
  pointer-events: none;
}

.hero-right::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 30px solid var(--sand-muted);
  bottom: 60px;
  left: -60px;
  opacity: .4;
  pointer-events: none;
}

/* Large decorative letter behind left panel */
.hero-bg-letter {
  position: absolute;
  font-family: var(--font-display);
  font-size: 32vw;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245,240,232,.04);
  bottom: -6vw;
  left: -4vw;
  pointer-events: none;
  user-select: none;
  letter-spacing: -.06em;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--indigo-light);
  margin-bottom: 24px;
}

.hero-eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--indigo-light);
  border-radius: 2px;
}

.hero-name-block {
  margin-bottom: 32px;
}

.hero-firstname {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6.5vw, 5.5rem);
  font-weight: 300;
  line-height: .95;
  color: rgba(245,240,232,.55);
  letter-spacing: -.04em;
}

.hero-lastname {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 7.5vw, 6.5rem);
  font-weight: 900;
  line-height: .95;
  color: var(--text-on-dark);
  letter-spacing: -.05em;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  color: var(--text-on-dark-2);
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 360px;
}

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

/* Right panel content */
.hero-info-label {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin-bottom: 48px;
}

.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--sand-muted);
}

.stat:first-child { border-top: 1px solid var(--sand-muted); }

.stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -.03em;
}

.stat-label {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.stat-divider { display: none; }

.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-on-dark-2);
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 2;
  animation: bounce-soft 2.4s ease-in-out infinite;
}

.scroll-arrow {
  display: block;
  width: 22px;
  height: 22px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

@keyframes bounce-soft {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ═══════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════ */
#about { background: var(--sand); }

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 72px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.about-portrait {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.portrait-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--ink);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.portrait-placeholder::before {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(79,70,229,.12);
  bottom: -60px;
  right: -60px;
}

.portrait-placeholder svg {
  width: 90px;
  height: 90px;
  opacity: .35;
  fill: var(--sand-muted);
}

.portrait-hint {
  font-family: var(--font-display);
  font-size: .78rem;
  color: rgba(245,240,232,.4);
  font-weight: 500;
  letter-spacing: .06em;
}

.about-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chip {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--text-on-dark);
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .01em;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 1.02rem;
  line-height: 1.8;
}
.about-text p:last-child { margin-bottom: 0; }

/* Pull-quote style for first paragraph */
.about-text p:first-child {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.75;
}

/* ═══════════════════════════════════════════════════════════
   MOTIVATION
═══════════════════════════════════════════════════════════ */
/* Section is --tinted (dark) */
.motivation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  position: relative;
  z-index: 1;
}

.motive-card {
  background: rgba(245,240,232,.04);
  border: 1px solid rgba(245,240,232,.08);
  border-radius: 0;
  padding: 40px 32px;
  transition: background .25s ease;
  position: relative;
}

.motive-card:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.motive-card:last-child  { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

.motive-card:hover { background: rgba(79,70,229,.12); }

.motive-num {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--indigo-light);
  margin-bottom: 20px;
  display: block;
}

.motive-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.motive-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-on-dark);
  letter-spacing: -.01em;
}

.motive-card p {
  color: var(--text-on-dark-2);
  font-size: .9375rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════════════════════ */
#education { background: var(--sand); }

.timeline {
  position: relative;
  padding-left: 0;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 1;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  position: relative;
  padding-bottom: 48px;
}

.timeline-item:last-child { padding-bottom: 0; }

/* Vertical line */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 139px;
  top: 12px;
  bottom: -8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--sand-muted), transparent);
}
.timeline-item:last-child::before { display: none; }

.timeline-dot {
  position: absolute;
  left: 133px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--indigo);
  border: 3px solid var(--sand);
  box-shadow: 0 0 0 1px var(--indigo);
  z-index: 2;
}

.timeline-date {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  color: var(--indigo);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding-top: 8px;
  text-align: right;
  padding-right: 28px;
}

.timeline-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease;
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.timeline-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  background: var(--indigo);
  padding: 3px 11px;
  border-radius: 100px;
  margin-bottom: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.timeline-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}

.timeline-place {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-style: italic;
}

.timeline-card p { color: var(--text-secondary); font-size: .9375rem; line-height: 1.65; }

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.timeline-tags span {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 100px;
  background: var(--sand);
  color: var(--text-secondary);
  border: 1px solid var(--sand-muted);
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════
   SKILLS  (dark section)
═══════════════════════════════════════════════════════════ */
#skills { /* uses --tinted */ }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  position: relative;
  z-index: 1;
}

.skills-col { }

.skills-col-title {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(245,240,232,.35);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(245,240,232,.08);
}

.skill-item {
  margin-bottom: 24px;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-on-dark);
  font-family: var(--font-display);
}

.skill-pct {
  color: var(--indigo-light);
  font-weight: 700;
  font-size: .82rem;
  font-family: var(--font-display);
}

.skill-bar {
  height: 4px;
  background: rgba(245,240,232,.08);
  border-radius: 100px;
  overflow: visible;
  position: relative;
}

.skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--indigo-deep), var(--indigo-light));
  border-radius: 100px;
  transition: width 1.4s cubic-bezier(.22,.68,0,1.1);
  position: relative;
}

.skill-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--indigo-light);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(109,102,240,.6);
}

/* Languages */
.lang-block {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(245,240,232,.08);
}

.lang-block h4 {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(245,240,232,.35);
  margin-bottom: 16px;
}

.lang-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(245,240,232,.06);
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-on-dark);
}
.lang-row:last-child { border-bottom: none; }

.lang-level {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lang-level--c2 { background: var(--indigo); color: #fff; }
.lang-level--b2 { background: rgba(79,70,229,.18); color: var(--indigo-light); }
.lang-level--b1 { background: rgba(245,240,232,.08); color: rgba(245,240,232,.5); }

/* ═══════════════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════════════ */
#projects { background: var(--sand); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.project-card {
  background: var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}

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

.project-header {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-header--finance  {
  background: linear-gradient(135deg, #1a0f3d 0%, #2d1b69 50%, #4f46e5 100%);
}
.project-header--manager  {
  background: linear-gradient(135deg, #0f1f1a, #1a4f3a, #16a37e);
}
.project-header--portfolio {
  background: linear-gradient(135deg, #1f0f1a, #4f1b3a, #c4572a);
}

.project-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.project-icon {
  font-size: 2.8rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.3));
}

.project-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  color: var(--text-on-dark);
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -.01em;
  color: var(--text-on-dark);
}

.project-body p {
  color: var(--text-on-dark-2);
  font-size: .9rem;
  flex: 1;
  margin-bottom: 20px;
  line-height: 1.65;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.project-tags span {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(79,70,229,.2);
  color: var(--indigo-light);
  border: 1px solid rgba(79,70,229,.3);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ═══════════════════════════════════════════════════════════
   CV
═══════════════════════════════════════════════════════════ */
#cv { background: var(--sand); }

.cv-card {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  max-width: 720px;
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.cv-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo), var(--indigo-light), var(--terracotta));
}

.cv-icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  background: rgba(79,70,229,.18);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--indigo-light);
}

.cv-info { flex: 1; }

.cv-info h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-on-dark);
  letter-spacing: -.01em;
}

.cv-info p {
  color: var(--text-on-dark-2);
  font-size: .9rem;
  margin-bottom: 6px;
}

.cv-meta {
  font-family: var(--font-display);
  font-size: .75rem;
  color: rgba(245,240,232,.35);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   CERTIFICATES
═══════════════════════════════════════════════════════════ */
#certs { background: var(--sand); }

.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.cert-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.cert-ribbon {
  height: 4px;
  background: linear-gradient(90deg, var(--indigo), var(--indigo-light));
}

.cert-body { padding: 28px; }

.cert-year {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 700;
  color: var(--indigo);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cert-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}

.cert-issuer {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-style: italic;
}

.cert-body p {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 24px;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════ */
#contact { /* uses --tinted */ }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 72px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.contact-info p {
  color: var(--text-on-dark-2);
  font-size: 1.05rem;
  margin-bottom: 40px;
  line-height: 1.75;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .9375rem;
  color: var(--text-on-dark-2);
  padding: 16px 0;
  border-bottom: 1px solid rgba(245,240,232,.07);
  transition: color .2s;
}

.contact-row:last-child { border-bottom: none; }
.contact-row:hover { color: var(--text-on-dark); }
.contact-row svg { color: var(--indigo-light); flex-shrink: 0; }
.contact-row a:hover { color: var(--indigo-light); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
#footer {
  background: var(--ink-soft);
  color: var(--text-on-dark-2);
  padding: 48px 0 32px;
  border-top: 1px solid rgba(245,240,232,.06);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(245,240,232,.06);
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand .nav-logo {
  display: inline-flex;
  color: var(--text-on-dark);
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: .875rem;
  color: rgba(245,240,232,.35);
  max-width: 340px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}

.footer-nav a {
  font-family: var(--font-display);
  font-size: .84rem;
  font-weight: 500;
  color: rgba(245,240,232,.4);
  transition: color .2s;
}
.footer-nav a:hover { color: var(--indigo-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-family: var(--font-display);
  font-size: .8rem;
  color: rgba(245,240,232,.25);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-size: .8rem;
  color: rgba(245,240,232,.3);
  transition: color .2s;
}
.footer-legal a:hover { color: var(--indigo-light); }

/* ═══════════════════════════════════════════════════════════
   SCROLL TO TOP
═══════════════════════════════════════════════════════════ */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-indigo);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--indigo-light);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(13,15,20,.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 44px;
  max-width: 560px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: translateY(24px) scale(.97);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--ink);
  letter-spacing: -.02em;
}

.modal p, .modal li {
  color: var(--text-secondary);
  font-size: .9375rem;
  line-height: 1.7;
}

.modal ul { list-style: disc; padding-left: 20px; margin-top: 10px; }
.modal li { margin-bottom: 8px; }

.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--sand); color: var(--ink); }

/* ═══════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
═══════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(1) { transition-delay: .04s; }
.reveal:nth-child(2) { transition-delay: .10s; }
.reveal:nth-child(3) { transition-delay: .17s; }
.reveal:nth-child(4) { transition-delay: .24s; }

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .skill-fill { transition: none; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  /* Hero: stack instead of split */
  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-left {
    padding: 64px 40px 56px;
  }
  .hero-right {
    padding: 56px 40px 80px;
  }
  .hero-right::before, .hero-right::after { display: none; }
  .hero-stats {
    flex-direction: row;
    justify-content: flex-start;
    gap: 32px;
  }
  .stat { flex-direction: column; gap: 4px; border-bottom: none; border-right: 1px solid var(--sand-muted); padding: 0 32px 0 0; }
  .stat:last-child { border-right: none; }
  .stat:first-child { border-top: none; }

  .about-grid    { grid-template-columns: 1fr; }
  .about-portrait { position: static; flex-direction: row; gap: 24px; }
  .portrait-placeholder { width: 160px; flex-shrink: 0; aspect-ratio: auto; height: 200px; }
  .about-chips   { flex-direction: row; flex-wrap: wrap; }

  .motivation-grid { grid-template-columns: 1fr; gap: 2px; }
  .motive-card:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .motive-card:last-child  { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

  .timeline-item { grid-template-columns: 110px 1fr; }
  .timeline-item::before { left: 109px; }
  .timeline-dot { left: 103px; }

  .projects-grid { grid-template-columns: 1fr 1fr; }
  .certs-grid    { grid-template-columns: 1fr 1fr; }
  .skills-grid   { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid  { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .section { padding: 80px 0; }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    flex-direction: column;
    background: rgba(245,240,232,.97);
    backdrop-filter: blur(20px);
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links.open { transform: translateX(0); }
  .nav-hamburger  { display: flex; }

  .nav-link { padding: 14px 16px; font-size: 1rem; border-radius: var(--radius-sm); }
  .nav-link--cta { margin-left: 0; margin-top: 8px; }

  .hero-left  { padding: 52px 28px 48px; }
  .hero-right { padding: 48px 28px 72px; }

  .hero-stats {
    flex-direction: column;
    gap: 0;
  }
  .stat { flex-direction: row; justify-content: space-between; border-right: none; border-bottom: 1px solid var(--sand-muted); padding: 14px 0; }
  .stat:first-child { border-top: 1px solid var(--sand-muted); }
  .stat:last-child { border-bottom: none; }

  .section-title { margin-bottom: 40px; }

  .about-portrait { flex-direction: column; align-items: flex-start; }
  .portrait-placeholder { width: 100%; height: 200px; aspect-ratio: auto; }
  .about-chips { flex-direction: row; }

  .timeline-item {
    grid-template-columns: 1fr;
    padding-left: 28px;
    padding-bottom: 40px;
  }
  .timeline-item::before {
    left: 7px;
    top: 6px;
  }
  .timeline-dot { left: 1px; top: 6px; }
  .timeline-date { text-align: left; padding-right: 0; padding-bottom: 8px; }

  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid    { grid-template-columns: 1fr; }

  .cv-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .scroll-top { bottom: 18px; right: 18px; }
  .section-stamp { display: none; }
}

@media (max-width: 480px) {
  .hero-cta-group { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
