/* =========================================
   Naman Agrawal — Academic Homepage
   ========================================= */

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

:root {
  --navy:    #1a3560;
  --blue:    #2b5797;
  --sky:     #3b82c4;
  --light:   #eef3fb;
  --white:   #ffffff;
  --gray-50: #f8fafc;
  --gray-100:#f1f5f9;
  --gray-200:#e2e8f0;
  --gray-500:#64748b;
  --gray-700:#334155;
  --gray-900:#0f172a;
  --text:    #1e293b;
  --muted:   #64748b;
  --accent:  #c8a96e;   /* warm gold accent */
  --radius:  6px;
  --shadow:  0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.05);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--sky); }

img { max-width: 100%; display: block; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: 'Lora', Georgia, serif; color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { margin-bottom: .85em; }

.section-heading {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  margin-bottom: 1.6rem;
}

/* ---- Layout ---- */
.container {
  width: 90%;
  max-width: 860px;
  margin: 0 auto;
}

section {
  padding: 4.5rem 0;
}

section:nth-child(even) {
  background: var(--gray-50);
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}

.nav-brand {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .01em;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
}

.nav-links a {
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.nav-links a:hover { color: var(--blue); }
.nav-links a.nav-active { color: var(--blue); font-weight: 700; }

/* Hamburger (mobile) */
.nav-toggle { display: none; cursor: pointer; background: none; border: none; }
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: .3s;
}

/* ---- HERO ---- */
#hero {
  padding: 7.5rem 0 5rem;
  background: linear-gradient(135deg, var(--navy) 0%, #2b5797 60%, #3b82c4 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 { color: var(--white); margin-bottom: .3rem; }

.hero-tagline {
  font-size: 1.05rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 1.6rem;
  letter-spacing: .01em;
}

.hero-bio {
  font-size: .97rem;
  color: rgba(255,255,255,.88);
  line-height: 1.75;
  max-width: 580px;
  margin-bottom: 1.8rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: background .15s, color .15s, transform .12s;
}

.btn-outline-light {
  border: 1.5px solid rgba(255,255,255,.5);
  color: var(--white);
  background: transparent;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.12);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--white);
  color: var(--navy);
}
.btn-solid:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-1px);
}

/* Photo placeholder */
.hero-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 3.5rem;
  color: rgba(255,255,255,.6);
  overflow: hidden;
}

.hero-avatar img { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; }

/* Quick stats bar */
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Lora', Georgia, serif;
}
.stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.6);
}

/* ---- ABOUT ---- */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-info h3 { margin-bottom: .5rem; }

.info-list { list-style: none; }
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: .88rem;
  color: var(--gray-700);
}
.info-list li:last-child { border-bottom: none; }
.info-list .label {
  font-weight: 600;
  color: var(--navy);
  min-width: 80px;
  flex-shrink: 0;
}

/* ---- RESEARCH ---- */
.research-themes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.theme-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow);
}

.theme-card h3 {
  font-size: .95rem;
  margin-bottom: .4rem;
  color: var(--navy);
}

.theme-card p {
  font-size: .83rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ---- PAPERS ---- */
.paper-list { list-style: none; }

.paper-item {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.paper-item:last-child { border-bottom: none; }

.paper-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .25rem;
}

.paper-authors {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .3rem;
}

.paper-venue {
  font-size: .82rem;
  font-style: italic;
  color: var(--blue);
  margin-bottom: .5rem;
}

.paper-abstract {
  font-size: .83rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin: 0;
}

.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 100px;
  margin-left: .4rem;
  vertical-align: middle;
}

.badge-pub    { background: #dcfce7; color: #166534; }
.badge-wp     { background: #fef9c3; color: #854d0e; }
.badge-sw     { background: #e0e7ff; color: #3730a3; }

/* ---- EXPERIENCE ---- */
.exp-item { padding: 1.4rem 0; border-bottom: 1px solid var(--gray-200); }
.exp-item:last-child { border-bottom: none; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .3rem;
}

.exp-role {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}

.exp-date {
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
}

.exp-org {
  font-size: .88rem;
  color: var(--blue);
  font-style: italic;
  margin-bottom: .55rem;
}

.exp-body {
  font-size: .88rem;
  color: var(--gray-700);
  line-height: 1.65;
}

/* ---- PROJECTS ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}

.project-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.project-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
}

.project-tag {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .5rem;
}

.project-desc {
  font-size: .83rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin: 0;
}

/* ---- TEACHING ---- */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.course-chip {
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .7rem 1rem;
  font-size: .84rem;
  color: var(--gray-700);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: background .15s, color .15s, box-shadow .15s;
}

.course-chip:hover {
  background: var(--light);
  color: var(--blue);
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

.teaching-note {
  margin-top: 1rem;
  font-size: .88rem;
  color: var(--muted);
}

.teaching-note ul {
  margin-top: .4rem;
  padding-left: 1.2rem;
}

.award-row {
  font-size: .84rem;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: .3rem;
}

/* ---- AWARDS TABLE ---- */
.awards-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.awards-table tr { border-bottom: 1px solid var(--gray-200); }
.awards-table tr:last-child { border-bottom: none; }
.awards-table td { padding: .65rem .4rem; }
.awards-table td:last-child { text-align: right; color: var(--muted); white-space: nowrap; }
.awards-table td:first-child { color: var(--gray-900); }

/* ---- CONTACT ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-links { list-style: none; }
.contact-links li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: .9rem;
  color: var(--gray-700);
}
.contact-links li:last-child { border-bottom: none; }
.contact-links .icon { color: var(--blue); width: 20px; text-align: center; font-size: 1rem; }

/* ---- FOOTER ---- */
footer {
  background: var(--navy);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 1.8rem;
  font-size: .8rem;
}
footer a { color: rgba(255,255,255,.75); }
footer a:hover { color: var(--white); }

/* ---- UTILITIES ---- */
.text-muted { color: var(--muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 700px) {
  nav { }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--white); padding: 1rem; border-bottom: 1px solid var(--gray-200); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero-content { grid-template-columns: 1fr; }
  .hero-avatar { display: none; }
  #hero { padding: 6rem 0 3rem; }

  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .hero-stats { gap: 1.2rem; }
}
