/* ============================================================
   Anant Tandon — Portfolio
   ============================================================ */
:root {
  --bg: #0f1115;
  --surface: #181b22;
  --text: #e7e9ee;
  --muted: #9aa3b2;
  --accent: #5b9dff;
  --accent-strong: #3b82f6;
  --border: #262b36;
  --radius: 14px;
  --max-width: 900px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(15,17,21,0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  position: relative;
}
.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* ---- Hamburger button ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
/* Animate to X when open */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile nav dropdown ---- */
@media (max-width: 640px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
  }
}

/* ---- Hero ---- */
.hero {
  padding: 72px 20px 60px;
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero-text { flex: 1; min-width: 0; }
.hero-photo {
  flex-shrink: 0;
  width: 200px;
}
.hero-photo img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid var(--accent-strong);
  display: block;
}

@media (max-width: 640px) {
  .hero {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding: 48px 20px 40px;
    gap: 28px;
  }
  .hero-photo { width: 140px; }
  .hero-photo img { width: 140px; height: 140px; }
  .cta-row { justify-content: center; }
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin: 0 0 8px;
  line-height: 1.1;
}
.tagline { color: var(--text); font-size: 1.05rem; margin: 0 0 16px; }
.intro { color: var(--muted); max-width: 60ch; }

/* ---- Buttons ---- */
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.05s ease, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }

/* ---- Sections ---- */
.section { padding: 56px 20px; border-top: 1px solid var(--border); }
.section h2 { font-size: 1.7rem; margin: 0 0 8px; }
.section h3 { margin: 28px 0 10px; }
.section-sub { color: var(--muted); margin: 0 0 28px; }

/* ---- Skill tags ---- */
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.tags li {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---- Education / awards list ---- */
.edu-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edu-list li { color: var(--muted); font-size: 0.95rem; }
.edu-list li strong { color: var(--text); }

/* ---- Cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(91,157,255,0.4); }
.card h3 { margin: 0 0 8px; font-size: 1rem; }
.card p { color: var(--muted); margin: 0 0 12px; font-size: 0.93rem; line-height: 1.55; }
.card-meta {
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 6px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ---- Inline tag ---- */
.tag-inline {
  display: inline-block;
  font-size: 0.77rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 4px;
}

/* ---- Article cards ---- */
.articles-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.article-card { display: flex; flex-direction: column; }
.article-card p { flex: 1; }
.read-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: auto;
}
.read-link:hover { text-decoration: underline; }

/* ---- Utilities ---- */
.muted { color: var(--muted); }
.small { font-size: 0.88rem; margin-top: 12px; }

/* ---- Footer ---- */
.site-footer {
  padding: 30px 20px 50px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* ---- Reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .hamburger span, .card { transition: none; }
}
