/* ============================================================================
   styles.css — single stylesheet for the whole site.
   Kept as one cached file shared across pages for speed.

   CONTENTS
     1.  Design tokens
     2.  Base, reset & accessibility
     3.  Layout primitives (header, nav, main, footer)
     4.  Buttons
     5.  Simple hero (404 page)
     6.  Home — profile hero + résumé button
     7.  Home — Quick Facts strip
     8.  Home — two-column profile (sidebar + panels)
     9.  Home — main column (summary, experience)
     10. Contact
     11. Projects page (cards + statuses)
     12. Responsive refinements
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. Design tokens — change a value here and it updates everywhere
   ---------------------------------------------------------------------------- */
:root {
  --bg:         #0b1120;   /* deep navy — professional, Azure-adjacent */
  --bg-soft:    #111a2e;
  --card:       #16213a;
  --text:       #e6edf6;
  --muted:      #9fb0c9;
  --accent:     #38bdf8;   /* sky blue */
  --accent-2:   #6366f1;   /* indigo (gradients, "coming soon") */
  --on-accent:  #06101f;   /* text on top of an accent fill */
  --border:     #233149;
  --radius:     14px;
  --maxw:       980px;
}

/* ----------------------------------------------------------------------------
   2. Base, reset & accessibility
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;          /* safety net: nothing ever scrolls horizontally */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #16223f 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Visible keyboard-focus ring (mouse clicks are unaffected) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::selection { background: var(--accent); color: var(--on-accent); }

img { max-width: 100%; }       /* images never overflow their container */

/* Skip link — hidden until focused, lets keyboard users jump past the nav */
.skip-link {
  position: absolute; top: 0; left: -9999px; z-index: 100;
  padding: 10px 16px; border-radius: 0 0 8px 0;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ----------------------------------------------------------------------------
   3. Layout primitives — header, nav, main, footer
   ---------------------------------------------------------------------------- */
main    { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 56px 0; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
}
.brand { font-weight: 800; font-size: 1.4rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--accent); }

.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px;   /* comfortable tap target */
  color: var(--muted); font-weight: 500;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.is-active { color: var(--text); }

.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px 50px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

/* ----------------------------------------------------------------------------
   4. Buttons (shared — used by the 404 page)
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.08s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); }

/* ----------------------------------------------------------------------------
   5. Simple hero (404 page)
   ---------------------------------------------------------------------------- */
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.1; margin: 10px 0 16px; }
.lede { max-width: 640px; font-size: 1.15rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ----------------------------------------------------------------------------
   6. Home — profile hero + résumé button
   ---------------------------------------------------------------------------- */
.profile-hero { padding: 46px 0 30px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.hero-id { display: flex; align-items: center; gap: 20px; margin-bottom: 4px; }
.hero-id-text { min-width: 0; }

.avatar {
  width: 104px; height: 104px; flex: none;
  border-radius: 50%; object-fit: cover; object-position: 50% 12%;
  border: 2px solid var(--border); background: var(--card);
}

.profile-hero h1 { font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.08; margin-bottom: 8px; }
.profile-hero .role { font-size: 1.08rem; font-weight: 600; color: var(--text); }
.profile-hero .role .org { color: var(--accent); }

/* Résumé download button — accent-outlined: noticeable, not loud; fills on hover */
.resume-btn {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 11px 17px; border-radius: 10px;
  border: 1px solid var(--accent); color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  font-weight: 600; font-size: 0.92rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease;
}
.resume-btn:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.resume-btn:active { transform: translateY(1px); }
.resume-btn svg { width: 16px; height: 16px; flex: none; }
.resume-btn .ext { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; opacity: 0.7; }

/* ----------------------------------------------------------------------------
   7. Home — Quick Facts strip (the divider between hero and summary)
   ---------------------------------------------------------------------------- */
.quickbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 6px 0 16px;
}
.quickbar .qf {
  display: flex; flex-direction: column; gap: 5px;
  padding: 18px 22px;
  border-right: 1px solid var(--border);
}
.quickbar .qf:first-child { padding-left: 0; }
.quickbar .qf:last-child { border-right: none; }
.quickbar .k {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.09em;
  font-weight: 600; color: var(--accent);
}
.quickbar .v { font-size: 0.96rem; font-weight: 500; color: var(--text); }

/* ----------------------------------------------------------------------------
   8. Home — two-column profile (sidebar + panels)
   ---------------------------------------------------------------------------- */
.profile {
  display: block;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0;
}
.main-col { display: flex; flex-direction: column; gap: 22px; }
.main-col > .block { margin-bottom: 0; }

.sidebar { display: flex; flex-direction: column; gap: 16px; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.panel h2 {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 700; color: var(--muted); margin-bottom: 14px;
}

/* Certifications — text, then badge, per cert */
.cert + .cert { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.cert .name { display: block; font-weight: 600; font-size: 0.94rem; }
.cert a.name { color: var(--accent); }
.cert a.name:hover { text-decoration: underline; }
.cert .meta { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--muted); }
.cert .badge { display: inline-block; margin-top: 12px; }
.cert .badge img { display: block; height: 104px; width: auto; transition: transform 0.15s ease; }
.cert a.badge:hover img { transform: scale(1.03); }

/* Skill groups */
.skill-group + .skill-group { margin-top: 15px; }
.skill-group h3 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em;
  font-weight: 600; color: var(--muted); margin-bottom: 8px;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
  font-size: 0.8rem; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 9px;
}

/* Education (supports multiple degrees) */
.edu .school { font-weight: 600; font-size: 0.95rem; }
.edu .degree { font-size: 0.9rem; color: var(--text); margin-top: 3px; }
.edu .field { font-size: 0.85rem; color: var(--muted); }
.edu-item + .edu-item { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ----------------------------------------------------------------------------
   9. Home — main column (summary, experience)
   ---------------------------------------------------------------------------- */
.block { margin-bottom: 36px; }
.block > h2 {
  font-size: 1.2rem; margin-bottom: 14px;
  padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.block p { color: var(--muted); }
.block p + p { margin-top: 12px; }

.exp { display: flex; flex-direction: column; gap: 20px; }
.exp-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 2px 14px;
}
.exp-role { font-weight: 600; font-size: 1rem; color: var(--text); }
.exp-org { color: var(--accent); font-weight: 600; }
.exp-dates { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.exp-bullets { list-style: none; margin-top: 9px; display: grid; gap: 7px; }
.exp-bullets li { position: relative; padding-left: 18px; font-size: 0.94rem; color: var(--muted); }
.exp-bullets li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* ----------------------------------------------------------------------------
   10. Contact
   ---------------------------------------------------------------------------- */
.contact h2 { font-size: 1.8rem; margin-bottom: 10px; }
.contact p { color: var(--muted); }
.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; font-weight: 600; }

/* ----------------------------------------------------------------------------
   11. Projects page (cards + statuses)
   ---------------------------------------------------------------------------- */
.section-head { margin-bottom: 28px; }
.section-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.section-head p { color: var(--muted); margin-top: 8px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.project-card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
/* main.js caps visible "Coming soon" cards to the next few in queue — the
   rest get [hidden]. Without this, .project-card's own `display: flex`
   (same specificity as the browser's default [hidden] rule) would win and
   the cards would stay visible. */
.project-card[hidden] { display: none; }
.project-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
.project-card p.desc { flex-grow: 1; font-size: 0.95rem; color: var(--muted); }

/* Status pills */
.project-status {
  display: inline-block; width: fit-content; margin-bottom: 12px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.status-live    { background: rgba(56,189,248,0.15); color: var(--accent); border: 1px solid rgba(56,189,248,0.35); }
.status-planned { background: rgba(99,102,241,0.14); color: #a5b4fc;       border: 1px solid rgba(99,102,241,0.40); }

/* Two states only: Live (full) and Coming soon (dimmed). Coming-soon cards
   stay dimmed with no hover illumination — they aren't done yet. Only the
   Live card reacts to hover, since it's the one with real links to explore.
   (0.80 keeps a clear "not done" fade while passing WCAG AA contrast for the
   muted card text — verified ~5.1:1 — and these are intentionally upcoming cards.) */
.project-card:has(.status-planned) { opacity: 0.80; }
.project-card:has(.status-live) { transition: transform 0.2s ease, border-color 0.2s ease; }
.project-card:has(.status-live):hover { transform: translateY(-2px); border-color: rgba(56,189,248,0.45); }

.project-stack { margin-top: 14px; font-size: 0.82rem; color: var(--muted); }
.project-stack span {
  display: inline-block;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 8px; margin: 3px 4px 0 0;
}
.project-links { display: flex; gap: 16px; margin-top: 16px; font-size: 0.9rem; font-weight: 600; }

/* ----------------------------------------------------------------------------
   12. Responsive refinements
   (No horizontal overflow exists at the root; these are intentional layout
   and readability adjustments as the viewport narrows.)
   ---------------------------------------------------------------------------- */

/* Tablet — collapse the two-column profile to one column */
@media (max-width: 820px) {
  .profile { grid-template-columns: 1fr; gap: 24px; }
  .sidebar { position: static; }
}

/* Quick Facts strip: 4 cols → 2 cols */
@media (max-width: 720px) {
  .quickbar { grid-template-columns: 1fr 1fr; }
  .quickbar .qf { padding: 14px 18px; }
  .quickbar .qf:nth-child(odd) { padding-left: 0; }
  .quickbar .qf:nth-child(2n) { border-right: none; }
  .quickbar .qf:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

/* Phones — gutters, vertical rhythm, smaller avatar */
@media (max-width: 560px) {
  main { padding: 0 18px; }
  .site-header { padding: 18px; flex-wrap: wrap; gap: 10px 18px; }
  section { padding: 40px 0; }
  .profile-hero { padding: 32px 0 22px; }
  .hero-id { gap: 16px; }
  .avatar { width: 78px; height: 78px; }
}

/* Narrow phones — stack avatar above name; wrap contact links */
@media (max-width: 480px) {
  .hero-id { flex-direction: column; align-items: flex-start; gap: 14px; }
  .profile-hero h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .contact-links { flex-wrap: wrap; gap: 14px 22px; }
}

/* Quick Facts strip: 2 cols → 1 col on the smallest screens */
@media (max-width: 430px) {
  .quickbar { grid-template-columns: 1fr; }
  .quickbar .qf { padding: 13px 0; border-right: none; border-bottom: 1px solid var(--border); }
  .quickbar .qf:last-child { border-bottom: none; }
}
