/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --bg:            #F6F7F9;
  --surface:       #FFFFFF;
  --border:        #E2E6ED;
  --border-strong: #C9D0DC;

  --ink:           #10182B;
  --ink-soft:      #4B5568;
  --ink-faint:     #8993A6;

  --accent:        #1B3A66;   /* deep navy */
  --accent-bright: #2F6FED;   /* signal blue */
  --accent-tint:   #EAF0FE;

  --status-live:   #17A567;

  --font-display: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

/* subtle vertical rule motif — ties to "infrastructure grid" idea, very quiet */
.grid-line {
  position: fixed;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 15%, var(--border) 85%, transparent);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   EYEBROW / SECTION NODE MARKER
   ============================================ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 14px;
}

.node {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent-bright);
  flex: none;
  transform: rotate(45deg);
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
  max-width: 640px;
  margin-bottom: 44px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 249, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.brand-name { font-size: 15px; }

.site-nav {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.site-nav a { transition: color 0.15s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 96px 0 72px;
  position: relative;
}

.hero-inner { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  margin: 4px 0 20px;
}

.hero-lede {
  max-width: 620px;
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.status-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 40px;
}

.status-strip li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex: none;
}
.dot-live {
  background: var(--status-live);
  box-shadow: 0 0 0 3px rgba(23,165,103,0.15);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-bright); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   CONTACT ICONS (shared: hero + contact section)
   ============================================ */
.contact-icons {
  list-style: none;
  display: flex;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.contact-icons a {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  transition: all 0.15s ease;
}
.contact-icons a svg { width: 18px; height: 18px; }

.contact-icons a:hover,
.contact-icons a:focus-visible {
  color: var(--accent-bright);
  border-color: var(--accent-bright);
  background: var(--accent-tint);
}

.contact-icons a::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.contact-icons a:hover::after,
.contact-icons a:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.contact-icons-lg a { width: 48px; height: 48px; }
.contact-icons-lg a svg { width: 20px; height: 20px; }

/* ============================================
   SUMMARY BAND
   ============================================ */
.summary {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.summary-inner {
  padding: 40px 0;
}
.summary-inner p {
  max-width: 780px;
  font-size: 16.5px;
  color: var(--ink-soft);
  margin: 0;
}
.summary-inner strong { color: var(--ink); font-weight: 600; }

/* ============================================
   GENERIC SECTION
   ============================================ */
.section { padding: 88px 0; position: relative; z-index: 1; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ============================================
   EXPERIENCE TIMELINE
   ============================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.timeline-body h3 {
  font-size: 19px;
  margin-bottom: 4px;
}

.timeline-org {
  color: var(--accent-bright);
  font-weight: 500;
  font-size: 14.5px;
  margin: 0 0 16px;
}

.timeline-body ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
}
.timeline-body li { margin-bottom: 8px; }
.timeline-body li:last-child { margin-bottom: 0; }

/* ============================================
   PROJECTS
   ============================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card:hover { border-color: var(--accent-bright); transform: translateY(-2px); }

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.project-head h3 { font-size: 17px; line-height: 1.3; }

.project-status {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.status-public { background: var(--accent-tint); color: var(--accent-bright); }
.status-private { background: #F1F2F5; color: var(--ink-faint); }

.project-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  flex: 1;
  margin: 0 0 20px;
}
.project-card code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--accent-tint);
  padding: 1px 5px;
  border-radius: 4px;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 20px;
}
.tag-list li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 3px 8px;
}

.project-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}
.project-link:not(.project-link-muted):hover { color: var(--accent-bright); }
.project-link-muted { color: var(--ink-faint); font-weight: 400; }

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.skill-group {
  background: var(--surface);
  padding: 24px;
}
.skill-group h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 10px;
}
.skill-group p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-inner { text-align: left; }
.contact-lede {
  color: var(--ink-soft);
  max-width: 520px;
  margin: -20px 0 32px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-inner {
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-faint);
}

/* ============================================
   SCROLL REVEAL (JS toggles .is-visible)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .grid-line { display: none; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 64px 0; }
}

/* mobile nav open state */
.site-nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px 24px;
  gap: 18px;
}