/* ============================================================
   Portfolio — plain CSS, no build step.
   Palette and spacing live in :root; change them there, not inline.
   ============================================================ */

:root {
  --bg:          #0b0f14;
  --bg-alt:      #10161d;
  --bg-card:     #141c25;
  --bg-card-hi:  #1a242f;

  --border:      #223040;
  --border-hi:   #2f4256;

  --text:        #e6edf3;
  --text-muted:  #93a4b5;
  --text-dim:    #64758a;

  --accent:      #4dd4c4;
  --accent-hi:   #7ce8db;
  --accent-dim:  rgba(77, 212, 196, 0.12);

  --warn:        #f0b849;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1080px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

/* Visible keyboard focus everywhere — do not remove. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--accent-dim);
  color: var(--accent-hi);
  padding: .12em .4em;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg);
  padding: 10px 18px; font-weight: 600; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------- Header / nav ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: 700; font-size: 1.05rem;
  color: var(--text); letter-spacing: -.02em;
}
.nav-brand .accent { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .92rem; font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  border: 1px solid var(--border-hi);
  padding: 7px 16px; border-radius: 6px;
  color: var(--accent) !important;
}
.nav-cta:hover { background: var(--accent-dim); border-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: 8px; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 800px 400px at 50% -10%, rgba(77, 212, 196, 0.07), transparent 70%),
    var(--bg);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(77, 212, 196, .25);
  padding: 5px 12px; border-radius: 100px;
  margin: 0 0 24px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 700;
}

.hero-role {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: clamp(.92rem, 2vw, 1.05rem);
  color: var(--accent);
  letter-spacing: .01em;
}

.hero-tagline {
  margin: 0 0 36px;
  max-width: 640px;
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px;
  border-radius: 7px;
  font-size: .95rem; font-weight: 600;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #06211d; }
.btn-primary:hover { background: var(--accent-hi); color: #06211d; }

.btn-ghost { border-color: var(--border-hi); color: var(--text); }
.btn-ghost:hover { background: var(--bg-card); border-color: var(--accent); color: var(--text); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  list-style: none; margin: 0; padding: 0;
  font-size: .9rem; color: var(--text-dim);
}

/* ---------------- Highlights strip ---------------- */

.highlights {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.stat-row li { display: flex; flex-direction: column; gap: 5px; }

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.75rem; font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.stat-label {
  font-size: .82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ---------------- Sections ---------------- */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-title {
  display: flex; align-items: baseline; gap: 14px;
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  letter-spacing: -.025em;
  font-weight: 700;
}
.section-num {
  font-family: var(--font-mono);
  font-size: .82rem; font-weight: 500;
  color: var(--accent);
  opacity: .8;
}

.section-intro {
  margin: 0 0 44px;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---------------- Project cards ---------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.card:hover {
  border-color: var(--border-hi);
  background: var(--bg-card-hi);
  transform: translateY(-2px);
}

/* The one real project gets the full width on wide screens. */
.card-feature {
  grid-column: 1 / -1;
  border-color: rgba(77, 212, 196, .28);
  background: linear-gradient(180deg, rgba(77, 212, 196, .05), transparent 60%), var(--bg-card);
}

.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.card-head h3 {
  margin: 0;
  font-size: 1.15rem; font-weight: 650;
  letter-spacing: -.015em;
}

.badge {
  flex-shrink: 0;
  font-family: var(--font-mono); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--warn);
  border: 1px solid rgba(240, 184, 73, .3);
  background: rgba(240, 184, 73, .1);
  padding: 3px 9px; border-radius: 100px;
}
.badge-live {
  color: var(--accent);
  border-color: rgba(77, 212, 196, .3);
  background: var(--accent-dim);
}

.card-body {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: .94rem; line-height: 1.62;
}
.card-body strong { color: var(--text); font-weight: 600; }

.tags {
  display: flex; flex-wrap: wrap; gap: 7px;
  list-style: none; margin: 0 0 18px; padding: 0;
}
.tags li {
  font-family: var(--font-mono); font-size: .74rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 5px;
}
.tags-lg li { font-size: .82rem; padding: 5px 11px; color: var(--text-muted); }
.tag-todo { color: var(--warn) !important; border-style: dashed !important; }

.card-links { display: flex; gap: 20px; margin-top: auto; }
.card-note { font-size: .85rem; color: var(--text-dim); }
.card-note a { font-weight: 500; }
.link-arrow { font-size: .9rem; font-weight: 500; }
.link-arrow::after { content: " →"; transition: opacity .15s ease; }
.link-arrow:hover::after { opacity: .6; }

/* ---------------- Skills ---------------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.skill-group h3 {
  margin: 0 0 14px;
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-dim);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.certs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.certs li { display: flex; flex-direction: column; }
.cert-name { font-weight: 600; font-size: .94rem; }
.cert-meta { font-size: .82rem; color: var(--text-dim); font-family: var(--font-mono); }

/* ---------------- Experience timeline ---------------- */

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline-item {
  position: relative;
  padding: 0 0 40px 32px;
  border-left: 1px solid var(--border);
}
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }

.timeline-marker {
  position: absolute; left: -5px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}

.timeline-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 8px;
}
.timeline-head h3 { margin: 0; font-size: 1.1rem; font-weight: 650; }
.timeline-date {
  font-family: var(--font-mono); font-size: .8rem;
  color: var(--text-dim); white-space: nowrap;
}
.timeline-org { margin: 2px 0 12px; color: var(--accent); font-size: .92rem; }

.bullets { margin: 0; padding-left: 18px; color: var(--text-muted); }
.bullets li { margin-bottom: 9px; font-size: .94rem; line-height: 1.62; }
.bullets li::marker { color: var(--accent); }
.bullets strong { color: var(--text); font-weight: 600; }

/* ---------------- About ---------------- */

.prose p { margin: 0 0 18px; color: var(--text-muted); font-size: 1.02rem; line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }
.prose em { color: var(--text); font-style: italic; }

/* ---------------- Contact ---------------- */

.section-contact {
  background:
    radial-gradient(ellipse 700px 300px at 50% 110%, rgba(77, 212, 196, .08), transparent 70%),
    var(--bg);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.contact-card {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .18s ease, transform .18s ease;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.contact-icon { font-size: 1.3rem; margin-bottom: 4px; }
.contact-label {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-dim); font-weight: 600;
}
.contact-value {
  font-family: var(--font-mono); font-size: .86rem;
  color: var(--text); word-break: break-all;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-alt);
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
}
.site-footer p { margin: 0; font-size: .84rem; color: var(--text-dim); }
.to-top { font-size: .84rem; color: var(--text-muted); }
.to-top:hover { color: var(--accent); }

/* ---------------- Mobile ---------------- */

@media (max-width: 720px) {
  .nav-toggle { display: flex; flex-direction: column; }

  .nav-links {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 14px 0; }
  .nav-cta { text-align: center; margin-top: 12px; padding: 12px; }
  .nav-links li:has(.nav-cta) { border-top: 0; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* Printing the page should produce something résumé-like, not a black rectangle. */
@media print {
  :root { --bg: #fff; --bg-alt: #fff; --bg-card: #fff; --text: #000; --text-muted: #333; --text-dim: #555; --border: #ccc; --accent: #067; }
  .site-header, .nav-toggle, .hero-actions, .to-top, .contact-icon { display: none; }
  .card, .contact-card { break-inside: avoid; }
  body { font-size: 11pt; }
}
