/* ---------- Design tokens ---------- */
:root {
  --bg: #dadada;
  --bg-alt: #f7f8fa;
  --surface: #ffffff;
  --border: #e5e7eb;

  --text: #000000;
  --text-muted: #000000;
  --text-dim: #9aa2af;

  --accent: #2a2a38;
  --accent-soft: #eef1fd;
  --accent-hover: #2a2a38;

  --net: #2952e3;
  --emb: #0f9d8f;
  --sec: #c23b6b;
  --net-soft: #eaf0fe;
  --emb-soft: #e6f7f5;
  --sec-soft: #fbeaf1;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; /* Primary font for headings and body text */
  --font-mono: 'Arial', monospace;

  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.08);

  --max-width: 1080px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--text); }

.nav-cta {
  color: var(--accent);
}
.nav-cta:hover { color: var(--accent-hover); }

.nav-link.is-active { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Sections ---------- */
.section {
  padding: 6rem 0;
}
.section-alt {
  background: var(--bg-alt);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: 8rem 0 6rem;
}
.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  max-width: 20ch;
}
.accent-text { color: var(--accent); }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 42ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-projects {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.grid-interests {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.tag-net { background: var(--net-soft); color: var(--net); }
.tag-emb { background: var(--emb-soft); color: var(--emb); }
.tag-sec { background: var(--sec-soft); color: var(--sec); }

.card-year {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.tech-list li {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.card-link:hover { color: var(--accent-hover); }

.interest-icon {
  display: inline-flex;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
}

.timeline-item {
  position: relative;
  padding: 0 0 3rem 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -7px;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-alt);
}

.timeline-period {
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.timeline-company {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 60ch;
  margin-bottom: 1rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill-list li {
  font-size: 0.72rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* ---------- Contact ---------- */
.contact-inner {
  text-align: center;
  max-width: 640px;
}
.contact-inner .section-title { margin-bottom: 1rem; }
.contact-text {
  color: var(--text-muted);
  margin-bottom: 2.25rem;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.back-to-top { color: var(--text-dim); }
.back-to-top:hover { color: var(--accent); }

/* ---------- Video modal ---------- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.video-modal[hidden] { display: none; }

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.video-modal-dialog {
  position: relative;
  width: min(960px, 100%);
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-modal-player {
  display: block;
  width: 100%;
  max-height: 80vh;
}
.video-modal-player[hidden] { display: none; }

img.video-modal-player {
  object-fit: contain;
  background: #000;
}

.video-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  transition: background 0.15s ease;
}
.video-modal-close:hover { background: #fff; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.is-open { max-height: 320px; }

  .nav-link {
    width: 100%;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .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); }

  .section { padding: 4rem 0; }
  .hero { padding: 6rem 0 4rem; }

  .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}
