/* ========== Tokens ========== */
:root {
  --bg: #0a0f1c;
  --surface: #111827;
  --surface-2: #172033;
  --border: #1f2a40;
  --text: #e5e9f0;
  --muted: #94a3b8;
  --accent: #22d3ee;      /* cyan: cybersecurity track + CTAs */
  --accent-ink: #04222a;
  --it: #4ade80;          /* green: IT / network / sysadmin track */
  --radius: 12px;
  --font-head: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --border: #dbe2ee;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0e7490;
  --accent-ink: #ffffff;
  --it: #15803d;
  color-scheme: light;
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5rem; }
.container { width: min(1100px, 100% - 32px); margin-inline: auto; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .9rem; margin: 0 0 .75rem; }
.center { text-align: center; }
.accent { color: var(--accent); }
.icon { width: 1.25em; height: 1.25em; vertical-align: -0.2em; fill: none; stroke: currentColor; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ========== Header / nav ========== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--font-head); font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 1.5rem; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-size: .92rem; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 6px; cursor: pointer; display: grid; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
:root[data-theme="dark"] .icon-moon, :root[data-theme="light"] .icon-sun { display: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: .5rem 16px 1rem; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .6rem 0; font-size: 1rem; }
  .theme-toggle { margin-top: .5rem; }
}

/* ========== Buttons / tags ========== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.25rem; border-radius: 8px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.btn-sm { padding: .45rem .9rem; font-size: .9rem; }
.tag {
  display: inline-block; font-family: var(--font-head); font-size: .72rem;
  padding: .2rem .55rem; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.tag-sec { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tag-it  { color: var(--it); border-color: color-mix(in srgb, var(--it) 45%, transparent); background: color-mix(in srgb, var(--it) 10%, transparent); }

/* ========== Layout helpers ========== */
.section { padding: 5rem 0 1rem; }
.section-title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 1.75rem; display: flex; align-items: center; gap: .6rem; }
/* Numbers come from a counter so hidden sections (e.g. disabled testimonials) leave no gap. */
main { counter-reset: section; }
.section:not([hidden]) { counter-increment: section; }
.section-title::before { content: counter(section, decimal-leading-zero) "."; color: var(--accent); font-size: .8em; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.eyebrow { font-family: var(--font-head); color: var(--accent); font-size: .85rem; margin: 0 0 .5rem; }

/* ========== Hero ========== */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; min-height: min(calc(100vh - 64px), 860px); padding: 3rem 0; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.tagline { font-family: var(--font-head); color: var(--muted); font-size: clamp(.95rem, 2vw, 1.1rem); }
.tagline span { color: var(--accent); margin: 0 .3rem; }
.value-prop { font-size: 1.15rem; max-width: 36ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-stats { list-style: none; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: .5rem 2rem; margin: 1.75rem 0 0; padding: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-head); font-size: 1.4rem; color: var(--accent); }
.hero-stats span { font-size: .8rem; color: var(--muted); }
@media (max-width: 520px) { .hero-stats { grid-template-columns: repeat(2, auto); } }
.hero-photo img { width: min(320px, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-inline: auto; border: 2px solid var(--accent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 8%, transparent); }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: auto; text-align: left; gap: 2rem; }
  .hero-photo { order: -1; }
  .hero-photo img { width: 180px; margin: 0; }
}

/* ========== Experience timeline ========== */
.legend { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--border); }
.timeline-item { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.timeline-item::before { content: ""; position: absolute; left: calc(-1.5rem - 7px); top: 1.6rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline-item.track-it::before { border-color: var(--it); }
.timeline-item.track-sec { border-left: 3px solid var(--accent); }
.timeline-item.track-it { border-left: 3px solid var(--it); }
.timeline-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.timeline-head h3 { font-size: 1.1rem; margin: 0; }
.timeline-item ul { margin: 0; padding-left: 1.1rem; }
.timeline-item li { margin-bottom: .3rem; }

/* ========== Education ========== */
.edu-card { display: flex; gap: 1.5rem; align-items: flex-start; }
.edu-logo { width: 88px; height: 88px; object-fit: contain; border-radius: 10px; background: var(--surface-2); padding: 8px; flex-shrink: 0; }
.edu-logo-real { background: #fff; }
.degree { font-weight: 600; margin: 0 0 .25rem; }
.coursework { margin: 0; color: var(--muted); }
@media (max-width: 520px) { .edu-card { flex-direction: column; } }

/* ========== Skills ========== */
.skill-group h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin-bottom: 1rem; }
.skill-group:first-child h3 { color: var(--accent); }
.skill-group:last-child h3 { color: var(--it); }
.pills, .stack { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.pills li { padding: .35rem .8rem; border-radius: 999px; font-size: .88rem; background: var(--surface-2); border: 1px solid var(--border); }
.pills li:hover { border-color: var(--accent); }
.pills-it li:hover { border-color: var(--it); }

/* ========== Projects ========== */
.project { display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.project:hover { transform: translateY(-4px); border-color: var(--accent); }
.project h3 { font-size: 1.05rem; }
.project p { color: var(--muted); }
.stack { margin: auto 0 .75rem; }
.stack li { font-family: var(--font-head); font-size: .75rem; color: var(--accent); }
.links { display: flex; gap: 1rem; margin: 0; font-size: .9rem; }

/* ========== Awards / publication ========== */
.award, .publication { display: flex; gap: 1.5rem; align-items: flex-start; }
.award.featured { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); }
.award-badge { flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.award-badge .icon { width: 32px; height: 32px; }
.award-body { min-width: 0; flex: 1; }
.award-certs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; margin: 1.25rem 0; }
.award-certs a { display: grid; gap: .4rem; color: var(--muted); font-size: .82rem; }
.award-certs a:hover { text-decoration: none; color: var(--accent); }
.award-certs img { border-radius: 8px; border: 1px solid var(--border); transition: transform .2s, border-color .2s; }
.award-certs a:hover img { transform: translateY(-3px); border-color: var(--accent); }
.pub-icon { width: 40px; height: 40px; color: var(--accent); flex-shrink: 0; }
@media (max-width: 520px) { .award, .publication { flex-direction: column; } }

/* ========== Certifications ========== */
.cert-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); margin-bottom: 1.25rem; }
.cert { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--text); transition: transform .2s, border-color .2s; }
.cert:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--accent); }
.cert img { width: 96px; height: 96px; object-fit: contain; margin-bottom: 1rem; }
.cert h3 { font-size: .95rem; }
.cert .meta { margin-bottom: .5rem; }
.verify { font-size: .8rem; color: var(--accent); margin-top: auto; }
.cert img.cert-logo { background: #fff; border-radius: 12px; padding: 10px; }
.sub-title { font-size: 1.05rem; margin: 2.5rem 0 1rem; color: var(--muted); }
.course-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.course-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); }
.course-list li:last-child { border-bottom: 0; }
.course-list .meta { margin: 0; font-size: .85rem; }

/* ========== Learning checklist ========== */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--it); box-shadow: 0 0 0 0 var(--it); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--it) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.checklist > li { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.check { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--accent); margin-top: 2px; position: relative; }
.check.in-progress::after { content: ""; position: absolute; inset: 4px; border-radius: 2px; background: var(--accent); opacity: .6; }
.check.exploring { border-color: var(--it); border-style: dashed; }
.check-body { flex: 1; }
.check-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-weight: 500; margin-bottom: .6rem; }
.check-note { margin: -.25rem 0 .6rem; font-size: .88rem; color: var(--muted); }
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 1.2s ease-out; }
.checklist > li.visible .bar span { width: var(--p); }

/* ========== Testimonials ========== */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(100%, 360px); gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .75rem; scrollbar-width: thin; }
.testimonial { scroll-snap-align: start; display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.testimonial blockquote { margin: 0; font-size: 1rem; }
.testimonial blockquote::before { content: "\201C"; display: block; font-family: Georgia, serif; font-size: 3rem; line-height: .6; color: var(--accent); margin-bottom: .5rem; }
.testimonial figcaption { display: flex; align-items: center; gap: .75rem; margin-top: auto; }
.testimonial .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-head); color: var(--accent); flex-shrink: 0; }
.testimonial .who { display: flex; flex-direction: column; line-height: 1.35; }
.testimonial .who strong { font-weight: 600; }
.testimonial .who span { color: var(--muted); font-size: .88rem; }
.carousel-controls { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .75rem; }

/* ========== Contact ========== */
.contact-grid { align-items: start; }
.contact-form { display: grid; gap: 1rem; }
.contact-form label { display: grid; gap: .35rem; font-size: .9rem; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: .7rem .85rem; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: var(--it); }
.form-status.err { color: #f87171; }

/* ========== Testimonial submission page ========== */
.testimonial-page { max-width: 720px; padding: 3rem 0 1rem; }
.testimonial-intro { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.testimonial-intro img { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--accent); }
.testimonial-intro h1 { font-size: clamp(1.4rem, 4vw, 2rem); margin: 0; }
.testimonial-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.testimonial-form label { display: grid; gap: .35rem; font-size: .9rem; color: var(--muted); }
.testimonial-form input, .testimonial-form textarea, .testimonial-form select {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: .7rem .85rem; width: 100%;
}
.testimonial-form input:focus, .testimonial-form textarea:focus, .testimonial-form select:focus { outline: none; border-color: var(--accent); }
.testimonial-form .form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.testimonial-form .char-count { font-size: .8rem; justify-self: end; }
.testimonial-form .checkbox { display: flex; align-items: flex-start; gap: .6rem; color: var(--text); }
.testimonial-form .checkbox input { width: auto; margin-top: .3rem; accent-color: var(--accent); }
.testimonial-form .btn { justify-self: start; }

/* ========== Footer ========== */
.site-footer { margin-top: 5rem; border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; color: var(--muted); font-size: .9rem; }
.footer-inner p { margin: 0; }
.socials { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.socials a { color: var(--muted); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); }
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.socials .icon { width: 20px; height: 20px; }

/* ========== Reveal on scroll ========== */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .checklist > li .bar span { width: var(--p); }
}
