/* ─────────────────────────────────────────────────────────
   TOKENS
───────────────────────────────────────────────────────── */
:root {
  --bg: #0C0F13;
  --surface: #14181F;
  --surface-hover: #191E26;
  --border: #232A34;
  --border-soft: #1A1F27;

  --text: #EDEFF2;
  --text-muted: #9AA5B1;
  --text-faint: #5C6672;

  --accent: #E8A33D;
  --accent-dim: #6B4E24;
  --teal: #45C9B0;

  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 860px;
  --radius: 8px;
  --radius-sm: 4px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@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;
  }
}

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: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #171009; }

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 2000;
  background: var(--accent);
  color: #171009;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ─────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 15, 19, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-right: auto;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a.active { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.search-trigger:hover { border-color: var(--text-faint); color: var(--text); }
.search-trigger kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--border);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  margin: 0 6px;
  background: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: #171009; border-color: var(--accent); }
.btn--primary:hover { background: #f0ae4b; }

.btn--outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn--outline:hover { border-color: var(--accent-dim); color: var(--accent); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  font-size: 0.85rem;
  padding: 9px 16px;
}
.btn--ghost:hover { color: var(--text); border-color: var(--text-faint); }

/* ─────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────── */
.hero {
  padding: 88px 24px 72px;
  border-bottom: 1px solid var(--border-soft);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 10px;
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--text);
}

.hero-tagline {
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 36px;
}

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

.hero-footer-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.hero-location {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.hero-socials {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.social-link {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.social-link:hover { color: var(--accent); border-color: var(--accent-dim); }

/* ─────────────────────────────────────────────────────────
   SECTIONS (generic)
───────────────────────────────────────────────────────── */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
  border-bottom: 1px solid var(--border-soft);
  scroll-margin-top: 80px;
}
.section:last-of-type { border-bottom: none; }

.section-head { margin-bottom: 32px; }

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

.section-loading,
.section-error {
  font-size: 0.9rem;
  color: var(--text-faint);
}
.section-error { color: #E5787C; }
.section-error code {
  color: var(--text-muted);
  background: var(--surface);
  padding: 2px 5px;
  border-radius: 4px;
}

.prose {
  max-width: 620px;
  font-size: 1.02rem;
  color: var(--text-muted);
}
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--text); }
.prose a { color: var(--teal); border-bottom: 1px solid var(--accent-dim); }

/* ─────────────────────────────────────────────────────────
   COLLECTIONS (Skills / Experience / Projects / Education)
───────────────────────────────────────────────────────── */
.collection--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.collection--timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 26px;
  border-left: 1px solid var(--border);
}

.collection--timeline .card { position: relative; margin-bottom: 28px; }
.collection--timeline .card:last-child { margin-bottom: 0; }

.collection--timeline .card::before {
  content: "";
  position: absolute;
  left: -31.5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  scroll-margin-top: 100px;
}
.card:hover { border-color: var(--accent-dim); background: var(--surface-hover); }

/* used by the search feature to draw attention after jumping to a result */
.card.flash {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.15);
}

.card h3 {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.card p { margin: 0 0 10px; color: var(--text-muted); font-size: 0.94rem; }
.card p:last-child { margin-bottom: 0; }
.card strong { color: var(--text); }

.card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.card ul li { margin-bottom: 6px; }
.card ul li::marker { color: var(--accent-dim); }

/* inline code used as tech tags, e.g. `Java` `Docker` in projects.md */
.card code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal);
  background: rgba(69, 201, 176, 0.08);
  border: 1px solid #2A6E62;
  padding: 3px 8px;
  border-radius: 999px;
  margin: 4px 6px 0 0;
}

/* ─────────────────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────────────────── */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-card p { color: var(--text-muted); margin: 0 0 22px; font-size: 1rem; }
.contact-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border-soft); }
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ─────────────────────────────────────────────────────────
   SIGNATURE FEATURE — search overlay
   This is the one place the page allows itself a distinct,
   slightly technical voice: a real full-text search over the
   content already rendered on the page, opened with "/".
───────────────────────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
  background: rgba(6, 8, 10, 0.7);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.search-overlay.open { opacity: 1; }
.search-overlay[hidden] { display: none; }

.search-panel {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 0.15s ease;
}
.search-overlay.open .search-panel { transform: translateY(0); }

.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}

#search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem; /* 16px — prevents iOS Safari auto-zoom on focus */
}
#search-input::placeholder { color: var(--text-faint); }

.search-input-row kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
  margin: 0;
  list-style: none;
}

.search-hint {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
  padding: 16px 12px;
  margin: 0;
}

.search-result { margin: 0; }
.search-result[hidden] { display: none; }

.search-result a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  text-align: left;
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
}
.search-result a:hover, .search-result a:focus-visible { background: var(--surface-hover); }

.search-result-section {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.search-result-title { font-size: 0.94rem; font-weight: 600; }
.search-result-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.search-result mark, .search-hint mark {
  background: rgba(232, 163, 61, 0.25);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
}


/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 2px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }

  .search-trigger span { display: none; }
  .search-trigger kbd { display: none; }

  .hero { padding: 56px 20px 48px; }
  .section { padding: 48px 20px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .header-actions .btn--ghost { display: none; }
}

/* keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
