/* ==========================================================================
   Theme tokens — restrained, editorial palette (single accent, no gradients)
   ========================================================================== */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;

  --max-width: 1040px;
  --radius: 6px;
  --radius-sm: 4px;
  --transition: 160ms ease;

  /* Light theme (default) — warm paper, ink text, slate-navy accent */
  --bg: #fbfbf9;
  --bg-elev: #ffffff;
  --bg-soft: #f1f1ee;
  --text: #1d2128;
  --text-muted: #5d6470;
  --text-faint: #8a909c;
  --border: #e4e3dd;
  --border-strong: #d2d1c9;
  --accent: #2e4a6b;
  --accent-text: #2e4a6b;
  --accent-soft: #eef1f5;
  --rule: #1d2128;
  --shadow: 0 1px 2px rgba(20, 24, 33, .04);
}

[data-theme="dark"] {
  --bg: #11141a;
  --bg-elev: #181c24;
  --bg-soft: #1f242e;
  --text: #e8eaef;
  --text-muted: #a3aab8;
  --text-faint: #757d8c;
  --border: #272d38;
  --border-strong: #343c49;
  --accent: #7ea3d1;
  --accent-text: #9bb8de;
  --accent-soft: #1b2230;
  --rule: #e8eaef;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

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

.container { width: min(100% - 2.5rem, var(--max-width)); margin-inline: auto; }

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border-strong);
}
.brand-name { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; }

.nav {
  display: flex;
  gap: .1rem;
  margin-inline: auto;
}
.nav a {
  padding: .4rem .65rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }

.controls { display: flex; align-items: center; gap: .55rem; }

.lang-switch {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .4px;
  padding: .3rem .5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: var(--bg-elev); background: var(--accent); }

.theme-toggle {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: start;
}

.hero-id { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.4rem; }
.hero-portrait {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.hero-eyebrow {
  margin: 0 0 .55rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-text);
}
.hero-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.08;
  margin: 0 0 .4rem;
  letter-spacing: -.4px;
}
.hero-title {
  font-size: clamp(.98rem, 2vw, 1.15rem);
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}
.hero-location {
  display: flex; align-items: center; gap: .45rem;
  color: var(--text-muted);
  font-size: .92rem;
  margin: 0 0 1.4rem;
}
.hero-location svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.badge {
  padding: .35rem .8rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.btn-primary {
  color: var(--bg-elev);
  background: var(--accent);
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
[data-theme="dark"] .btn-primary { color: #11141a; }
[data-theme="dark"] .btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-soft); }

/* Contact card */
.hero-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}
.contact-row { display: flex; gap: .8rem; align-items: center; }
.contact-row > div { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.contact-icon {
  display: grid; place-items: center;
  flex: none;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.contact-icon svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-label {
  display: block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-faint);
  margin-bottom: .05rem;
}
.contact-value { font-weight: 500; font-size: .92rem; word-break: break-word; transition: color var(--transition); }
a.contact-value:hover { color: var(--accent-text); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(2.4rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: 0; }

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  margin: 0 0 1.8rem;
  letter-spacing: -.2px;
  padding-top: .9rem;
  border-top: 2px solid var(--rule);
  display: inline-block;
}

.summary-body {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 70ch;
  margin: 0;
}

/* Competencies — flat, rule-led, no shadow soup */
.competency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem 2.2rem;
}
.competency-card {
  padding-top: .9rem;
  border-top: 1px solid var(--border-strong);
}
.competency-card h3 {
  margin: 0 0 .4rem;
  font-size: 1rem;
  font-weight: 600;
}
.competency-card p { margin: 0; color: var(--text-muted); font-size: .92rem; }

/* Business Analysis & Product */
.business-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 70ch;
  margin: -.6rem 0 2rem;
}
.ba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem 2.2rem;
}
.ba-card {
  padding-top: .9rem;
  border-top: 1px solid var(--border-strong);
}
.ba-card h3 { margin: 0 0 .4rem; font-size: 1rem; font-weight: 600; }
.ba-card p { margin: 0 0 .8rem; color: var(--text-muted); font-size: .92rem; }
.ba-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.ba-tags .tag { font-size: .76rem; padding: .22rem .55rem; }

/* Experience — date column on the left, content on the right */
.timeline { display: grid; gap: 0; }
.job {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 2rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--border);
}
.job:first-child { border-top: 0; padding-top: .5rem; }

.job-aside { padding-top: .15rem; }
.job-period { font-weight: 600; font-size: .9rem; color: var(--text); }
.job-location { font-size: .85rem; color: var(--text-faint); margin-top: .15rem; }

.job-company { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; margin: 0; line-height: 1.2; }
.job-role { color: var(--accent-text); font-weight: 600; font-size: .9rem; margin: .2rem 0 .9rem; }
.job-bullets { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; }
.job-bullets li { color: var(--text-muted); font-size: .93rem; }
.job-bullets li::marker { color: var(--text-faint); }

.tech-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: 1rem; }
.tech-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-faint);
  margin-right: .25rem;
}
.tech-chip {
  padding: .2rem .6rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.skill-group { padding-top: .9rem; border-top: 1px solid var(--border-strong); }
.skill-group h3 {
  margin: 0 0 .9rem;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-faint);
  font-weight: 600;
}
.tag-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag {
  padding: .3rem .7rem;
  font-size: .84rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), color var(--transition);
}
.tag:hover { color: var(--accent-text); border-color: var(--accent); }

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}
.cert-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
}
.cert-type {
  align-self: flex-start;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: .15rem;
}
.cert-name { font-weight: 600; font-size: .98rem; }
.cert-issuer { color: var(--text-muted); font-size: .86rem; }

/* Education & Languages */
.edu-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.edu-subtitle {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-faint);
  font-weight: 600;
  margin: 0 0 1rem;
}
.edu-item, .lang-item {
  padding: .9rem 0;
  border-top: 1px solid var(--border);
}
.edu-item:first-of-type, .lang-item:first-of-type { border-top: 0; padding-top: 0; }
.edu-degree { font-weight: 600; font-size: .98rem; }
.edu-school { color: var(--text-muted); font-size: .88rem; }
.edu-year {
  float: right;
  font-weight: 600;
  color: var(--text-faint);
  font-size: .88rem;
}
.lang-name { font-weight: 600; font-size: .98rem; }
.lang-level { color: var(--text-muted); font-size: .88rem; }

/* Activities */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.6rem 2.2rem;
}
.activity-card {
  padding-top: .9rem;
  border-top: 1px solid var(--border-strong);
}
.activity-card h3 { margin: 0 0 .4rem; font-size: 1rem; font-weight: 600; }
.activity-card p { margin: 0; color: var(--text-muted); font-size: .92rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.footer-inner { text-align: center; }
.footer-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; margin: 0 0 .3rem; }
.footer-meta { color: var(--text-muted); font-size: .88rem; margin: 0 0 .5rem; }
.footer-rights { color: var(--text-faint); font-size: .8rem; margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .nav { display: none; }
  .edu-layout { grid-template-columns: 1fr; gap: 2rem; }
  .job { grid-template-columns: 1fr; gap: .5rem; }
  .job-aside { padding-top: 0; }
}

@media (max-width: 520px) {
  .brand-name { display: none; }
  .hero-id { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

/* Reveal-on-scroll */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* Print */
@media print {
  .topbar, .hero-cta, .theme-toggle, .lang-switch { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .job { break-inside: avoid; }
  .cert-card, .hero-card { box-shadow: none; border-color: #ccc; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
