/* ==========================================================================
   Personal Resume / CV template
   --------------------------------------------------------------------------
   REBRAND IN ONE MINUTE
   - --accent is the highlight color (links, active nav, timeline dots).
     --accent-strong is a deeper shade used for small text on light
     backgrounds; keep it dark enough to read.
   - Light theme colors live in :root, dark theme colors in the two
     [data-theme="dark"] / prefers-color-scheme blocks below. Change both.
   - Font: swap the Google Fonts <link> in index.html and --font below.
   - Print styles (black on white, no buttons) are at the end of this file.
   ========================================================================== */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #0f1b2d;
  --text-2: #475569;
  --line: #dde3ec;
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --accent-soft: #ccfbf1;
  --navy: #0f1b2d;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --container: 1080px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111b2e;
  --surface-2: #17233a;
  --text: #e6edf6;
  --text-2: #a3b1c6;
  --line: #24324b;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-soft: rgba(45, 212, 191, .14);
  --navy: #e6edf6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --surface: #111b2e;
    --surface-2: #17233a;
    --text: #e6edf6;
    --text-2: #a3b1c6;
    --line: #24324b;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: rgba(45, 212, 191, .14);
    --navy: #e6edf6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 1.0625rem; line-height: 1.65; overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--accent-strong); text-underline-offset: .2em; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--navy); color: var(--bg); padding: .7rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* ---------- Header + section nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: .75rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; text-decoration: none; color: var(--text); margin-right: auto; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0f766e, #1e3a5f); letter-spacing: .02em; }
.icon-btn, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 40px; min-width: 40px; padding: 0 .7rem;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 700 .9rem var(--font); cursor: pointer; transition: border-color .2s, background .2s;
}
.icon-btn:hover, .nav-toggle:hover { border-color: var(--accent); }
.theme-icon-sun { display: none; }
[aria-pressed="true"] .theme-icon-sun { display: block; }
[aria-pressed="true"] .theme-icon-moon { display: none; }
.section-nav { display: none; }
.section-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .5rem var(--gutter) 1rem;
}
.section-nav ul { list-style: none; display: flex; flex-direction: column; }
.section-nav a {
  display: block; padding: .7rem .25rem; text-decoration: none; color: var(--text-2); font-weight: 600;
  border-bottom: 1px solid var(--line); position: relative;
}
.section-nav a[aria-current] { color: var(--accent-strong); }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .section-nav, .section-nav.is-open { display: block; position: static; padding: 0; border: 0; box-shadow: none; background: none; }
  .section-nav ul { flex-direction: row; gap: .15rem; }
  .section-nav a { border: 0; padding: .4rem .7rem; border-radius: 8px; font-size: .92rem; transition: color .2s, background .2s; }
  .section-nav a:hover { color: var(--text); background: var(--surface-2); }
  .section-nav a[aria-current] { background: var(--accent-soft); }
  .section-nav { margin-right: .5rem; }
}

/* ---------- Intro ---------- */
.intro { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem); position: relative; overflow: hidden; }
.intro::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 85% 10%, var(--accent-soft), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px) 0 0 / 100% 32px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
          mask-image: linear-gradient(180deg, #000 30%, transparent);
  opacity: .8;
}
.intro-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 800px) { .intro-grid { grid-template-columns: auto 1fr; gap: 3rem; } }
.avatar {
  width: clamp(120px, 22vw, 176px); aspect-ratio: 1; border-radius: 50%; position: relative;
  display: grid; place-items: center; font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; color: #fff; letter-spacing: -0.02em;
  background: linear-gradient(140deg, #0f766e 0%, #1e3a5f 100%);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 8px var(--accent), var(--shadow);
  margin-bottom: 1.75rem;
}
@media (min-width: 800px) { .avatar { margin-bottom: 0; } }
.avatar small { position: absolute; bottom: -2.1rem; font-size: .72rem; font-weight: 600; color: var(--text-2); letter-spacing: 0; white-space: nowrap; }
.kicker { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .85rem; color: var(--accent-strong); background: var(--accent-soft); padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1rem; }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.intro h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.role { font-size: clamp(1.15rem, 2.6vw, 1.5rem); color: var(--text-2); font-weight: 600; margin: .5rem 0 1.25rem; }
.pitch { max-width: 58ch; color: var(--text-2); font-size: 1.1rem; }
.meta-list { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; margin: 1.25rem 0 1.75rem; color: var(--text-2); font-size: .95rem; }
.meta-list li { display: inline-flex; align-items: center; gap: .4rem; }
.meta-list svg { color: var(--accent); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font: 700 1rem var(--font); text-decoration: none; cursor: pointer;
  padding: .8rem 1.2rem; border-radius: 10px; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--navy); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(13, 148, 136, .35); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: clamp(2.5rem, 6vw, 3.5rem); list-style: none; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.stats strong { display: block; font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.stats span { font-size: .85rem; color: var(--text-2); line-height: 1.35; display: block; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 4.75rem) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 800; }
.section-index { font-size: .85rem; font-weight: 800; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.two-col { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1.6fr 1fr; } }
.lead { font-size: 1.2rem; color: var(--text); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card h3 { font-size: 1.05rem; margin-bottom: .75rem; }
.check-list { list-style: none; display: grid; gap: .55rem; }
.check-list li { display: flex; gap: .6rem; color: var(--text-2); }
.check-list li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: .25rem; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Timeline */
.timeline { list-style: none; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--line)); }
.job { position: relative; padding: 0 0 2.25rem 2.25rem; }
.job:last-child { padding-bottom: 0; }
.job::before { content: ""; position: absolute; left: 0; top: .45rem; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; align-items: baseline; }
.job h3 { font-size: 1.2rem; font-weight: 800; }
.job .org { color: var(--accent-strong); font-weight: 700; }
.job time, .job .dates { font-size: .9rem; color: var(--text-2); font-weight: 600; }
.job p { color: var(--text-2); margin: .5rem 0 .6rem; }
.job ul { padding-left: 1.1rem; color: var(--text-2); display: grid; gap: .3rem; }
.job li::marker { color: var(--accent); }
@media (min-width: 800px) {
  .job { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding-left: 2.5rem; }
  .job-when { padding-top: .2rem; }
}

/* Skills */
.skills-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.skill-group h3 { display: flex; align-items: center; gap: .6rem; }
.skill-group h3 svg { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; }
.tags li { font-size: .88rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.tags li:hover { border-color: var(--accent); transform: translateY(-1px); }
.tags li.strong { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.legend { font-size: .85rem; color: var(--text-2); margin-top: 1rem; display: flex; align-items: center; gap: .5rem; }
.legend i { width: 14px; height: 14px; border-radius: 999px; background: var(--accent-soft); display: inline-block; border: 1px solid var(--accent); }

/* Projects */
.projects { display: grid; gap: 1.25rem; list-style: none; }
@media (min-width: 760px) { .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.project { display: flex; flex-direction: column; overflow: hidden; padding: 0; transition: transform .25s, box-shadow .25s; }
.project:hover { transform: translateY(-3px); }
.project-art { aspect-ratio: 16 / 9; position: relative; display: grid; place-items: center; color: rgba(255, 255, 255, .9); overflow: hidden; }
.project-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.22) 1px, transparent 1.4px); background-size: 12px 12px; }
.project-art .ph-label { position: absolute; left: .6rem; bottom: .6rem; font-size: .72rem; font-weight: 700; background: rgba(15, 27, 45, .75); color: #fff; padding: .25rem .5rem; border-radius: 6px; z-index: 1; }
.art-1 { background: linear-gradient(135deg, #0f766e, #134e4a); }
.art-2 { background: linear-gradient(135deg, #1e3a5f, #334e7a); }
.art-3 { background: linear-gradient(135deg, #475569, #0f766e); }
.project-body { padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.project h3 { font-size: 1.1rem; }
.project p { color: var(--text-2); margin: 0; font-size: .97rem; }
.project .tags { margin-top: auto; padding-top: .4rem; }
.project .tags li { font-size: .78rem; padding: .2rem .55rem; }
.project a { font-weight: 700; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.project a:hover { text-decoration: underline; }

/* Education */
.edu { display: grid; gap: 1rem; list-style: none; }
@media (min-width: 760px) { .edu { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.edu .card { display: grid; gap: .3rem; }
.edu .dates { font-size: .85rem; font-weight: 700; color: var(--accent-strong); }
.edu h3 { margin: 0; }
.edu p { margin: 0; color: var(--text-2); font-size: .95rem; }

/* Contact */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.25fr; gap: 3rem; } }
.contact-list { list-style: none; display: grid; gap: .75rem; margin-top: 1.25rem; }
.contact-list li { display: flex; align-items: center; gap: .85rem; }
.contact-list .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); flex: none; }
.contact-list .k { display: block; font-size: .78rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
.contact-list .v { font-weight: 700; color: var(--text); }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; align-content: start; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid #94a3b8; border-radius: 10px; padding: .75rem .9rem;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: #dc2626; }
.error { color: #b91c1c; font-size: .88rem; font-weight: 600; margin: 0; }
:root[data-theme="dark"] .error { color: #fca5a5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .error { color: #fca5a5; } }
.error:empty { display: none; }
.success { border-left: 4px solid var(--accent); }
.success h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.success p { margin: 0; color: var(--text-2); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--text-2); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; }
.to-top { font-weight: 700; text-decoration: none; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   PRINT: a clean black-on-white resume (1-2 pages). Use "Download / print"
   and choose "Save as PDF" to get a PDF.
   ========================================================================== */
@media print {
  @page { margin: 14mm 14mm 16mm; }
  :root, :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --text-2: #222; --line: #bbb;
    --accent: #000; --accent-strong: #000; --accent-soft: #fff; --navy: #000; --shadow: none; color-scheme: light;
  }
  html { scroll-padding-top: 0; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  body { background: #fff !important; color: #000 !important; font-size: 10pt; line-height: 1.45; }
  .site-header, .skip-link, .actions, .no-print, #print-btn, #theme-toggle, .project-art, .stats, .contact-form-wrap, .to-top, .legend { display: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .container { max-width: none; padding: 0; }
  .intro { padding: 0 0 8pt; }
  .intro::before { display: none; }
  .intro-grid { grid-template-columns: 1fr; gap: 0; }
  .avatar { display: none; }
  .kicker { display: none; }
  .intro h1 { font-size: 22pt; }
  .role { font-size: 12pt; margin: 2pt 0 6pt; color: #000; }
  .pitch { font-size: 10pt; max-width: none; color: #222; margin-bottom: 4pt; }
  .meta-list { margin: 4pt 0 0; font-size: 9pt; gap: 2pt 12pt; }
  .meta-list svg { display: none; }
  .section { padding: 10pt 0 6pt; border-top: 1.5pt solid #000; }
  .section-head { margin-bottom: 6pt; }
  .section-head h2 { font-size: 12pt; text-transform: uppercase; letter-spacing: .08em; }
  .section-index { display: none; }
  .two-col { grid-template-columns: 1.6fr 1fr; gap: 12pt; }
  .lead { font-size: 10.5pt; }
  .card { border: 0; padding: 0; box-shadow: none; border-radius: 0; }
  .card h3 { font-size: 10.5pt; margin-bottom: 3pt; }
  .check-list { gap: 1pt; }
  .check-list li::before { content: "\2013"; background: none; width: auto; height: auto; margin: 0; }
  .timeline::before, .job::before { display: none; }
  .job { display: grid; grid-template-columns: 105pt 1fr; gap: 8pt; padding: 0 0 8pt; break-inside: avoid; }
  .job h3 { font-size: 10.5pt; }
  .job .dates { font-size: 9pt; color: #000; }
  .job p { margin: 2pt 0; }
  .job ul { gap: 1pt; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 6pt 16pt; }
  .skill-group h3 svg { display: none; }
  .tags { gap: 0; }
  .tags li, .tags li.strong { border: 0; padding: 0; background: none; color: #000; font-size: 9.5pt; font-weight: 400; border-radius: 0; }
  .tags li:not(:last-child)::after { content: ",\00a0"; }
  .projects, .edu { grid-template-columns: repeat(3, 1fr); gap: 10pt; }
  .project-body { padding: 0; gap: 2pt; }
  .project h3 { font-size: 10.5pt; }
  .project p { font-size: 9.5pt; }
  .project a { display: none; }
  .project .tags li { font-size: 8.5pt; color: #333; padding: 0; }
  .edu p { font-size: 9.5pt; }
  .edu .dates { font-size: 9pt; color: #000; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: repeat(3, auto); justify-content: start; gap: 4pt 18pt; margin-top: 0; }
  .contact-list .ico { display: none; }
  .contact-list .k { font-size: 8pt; }
  #contact .lead { display: none; }
  .site-footer { border: 0; padding: 8pt 0 0; font-size: 8pt; color: #555; }
  a { color: #000; text-decoration: none; }
  h2, h3 { break-after: avoid; }
  .card, .edu li, .project { break-inside: avoid; }
}
