/* ============================================================
   Sejal Chandra — Personal Portfolio
   ============================================================ */

:root {
  --navy: #10263f;
  --navy-deep: #0a1a2c;
  --ink: #22303d;
  --muted: #5b6b7a;
  --paper: #efe6d2;
  --white: #ffffff;
  --accent: #b98a2f;
  --accent-soft: #e4d2ac;
  --line: #d6c9ab;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 38, 63, 0.08);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(239, 230, 210, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled { box-shadow: 0 4px 20px rgba(16, 38, 63, 0.07); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-links a.active { color: var(--accent); }

.nav-cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-cta:hover { background: var(--navy-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover { background: var(--navy-deep); }

.btn-outline {
  border: 1.5px solid var(--navy);
  color: var(--navy);
}

.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Hero ---------- */

.hero {
  padding: 6.5rem 0 4.5rem;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--accent-soft) 0%, transparent 60%),
    var(--paper);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-text { max-width: 640px; }

.hero-portrait {
  position: relative;
  justify-self: end;
  max-width: 380px;
  width: 100%;
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 1.1rem -1.1rem -1.1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  z-index: 0;
}

.hero-portrait img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.05;
  margin-bottom: 1.4rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 2.2rem;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 4.5rem;
}

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section { padding: 5.5rem 0; }

.section-alt { background: var(--white); border-block: 1px solid var(--line); }

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2.5rem;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p { margin-bottom: 1.2rem; font-size: 1.05rem; }

.about-text strong { color: var(--navy); }

.about-highlights {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}

.about-highlights h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.about-highlights ul { list-style: none; }

.about-highlights li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--muted);
}

.about-highlights li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.65rem;
  top: 0.85rem;
}

/* ---------- Experience timeline ---------- */

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin-bottom: 1rem;
}

.timeline-head h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
}

.timeline-meta { font-size: 0.9rem; color: var(--muted); font-weight: 500; }

.role { margin-bottom: 1.5rem; }

.role:last-child { margin-bottom: 0; }

.role h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.role-dates {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--accent);
  white-space: nowrap;
  margin-left: 0.4rem;
}

.role ul { list-style: none; }

.role li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.4rem;
  color: var(--muted);
  font-size: 0.97rem;
}

.role li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Publications ---------- */

.pub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.pub-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(16, 38, 63, 0.12);
}

.pub-year {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.pub-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.8rem;
  line-height: 1.35;
}

.pub-card p { color: var(--muted); font-size: 0.95rem; }

.pub-isbn {
  margin-top: 1rem;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.skill-group {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}

.skill-group h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Education & Awards ---------- */

.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.edu-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}

.edu-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
  border-bottom: 2px solid var(--accent-soft);
}

.edu-item { margin-bottom: 1.4rem; }

.edu-item:last-child { margin-bottom: 0; }

.edu-item h4 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.edu-item p { font-size: 0.88rem; color: var(--muted); }

.edu-detail { color: var(--accent) !important; font-weight: 600; }

/* ---------- Contact ---------- */

.section-contact {
  background: var(--navy);
  color: var(--white);
}

.section-contact .section-eyebrow { color: #d9b45f; }

.section-contact .section-title { color: var(--white); margin-bottom: 1rem; }

.contact-inner { text-align: center; max-width: 640px; }

.contact-lead {
  color: #b9c4cf;
  font-size: 1.1rem;
  margin-bottom: 2.2rem;
}

.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.section-contact .btn-primary {
  background: var(--accent);
  color: var(--navy-deep);
}

.section-contact .btn-primary:hover { background: #d9b45f; }

.section-contact .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.section-contact .btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: #8fa1b3;
  font-size: 0.88rem;
  padding: 1.4rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.back-to-top {
  color: #b9c4cf;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-to-top:hover { color: var(--white); }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .hero { padding: 4.5rem 0 3.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-portrait { justify-self: start; max-width: 300px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .pub-grid, .skills-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(16, 38, 63, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open { max-height: 420px; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.9rem 4%;
    width: 100%;
  }

  .nav-cta {
    border-radius: 0;
    background: var(--navy);
  }

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

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
}
