/* ============================================================
   PORTFOLIO STYLESHEET — Dr. Suvarna Kadam
   Edit colours in :root, fonts in @import
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design tokens ────────────────────────────────────────── */
:root {
  --heading:       'Source Serif 4', Georgia, serif;
  --body:          'DM Sans', -apple-system, sans-serif;
  --mono:          'JetBrains Mono', monospace;

  --bg:            #fafaf8;
  --card-bg:       #ffffff;
  --text:          #1a1a1a;
  --text-secondary:#3a3a3a;
  --muted:         #777777;
  --border:        #e2e2dd;
  --tag-bg:        #f0f0ec;
  --accent:        #0f766e;
  --accent-light:  #ccfbf1;
  --applied-accent:#1e40af;
  --applied-bg:    rgba(219, 234, 254, 0.33);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: rgba(15, 118, 110, 0.2); }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Fade-in animation ────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 0 20px;
}

.nav-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  font-family: var(--body);
  color: var(--muted);
  padding-bottom: 4px;
  transition: all 0.2s;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active {
  font-weight: 600;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding-bottom: 60px; }
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 60px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero { padding: 80px 24px 60px; }

.hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 12px;
}

.hero-name {
  font-size: 44px;
  font-weight: 700;
  font-family: var(--heading);
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-bio {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ── Badges row ───────────────────────────────────────────── */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.badge {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
}

/* ── Links row ────────────────────────────────────────────── */
.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.link-item {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.link-item:hover { text-decoration: underline; }

.link-label {
  display: block;
  font-family: var(--body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ── Section headings ─────────────────────────────────────── */
.section-title {
  font-size: 28px;
  font-family: var(--heading);
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ── Filter pills ─────────────────────────────────────────── */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--body);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  border: 1.5px solid var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

/* ── Project cards grid ───────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}
.project-card.highlighted {
  border-left: 3px solid var(--accent);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.cat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.cat-label.research {
  color: var(--accent);
  background: rgba(204, 251, 241, 0.2);
}
.cat-label.applied {
  color: var(--applied-accent);
  background: var(--applied-bg);
}

.card-period {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--heading);
  color: var(--text);
  line-height: 1.3;
  margin: 8px 0 4px;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}

/* ── Card CTA ─────────────────────────────────────────────── */
.card-cta {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}
.project-card:hover .card-cta {
  color: var(--accent);
}

/* ── Demo badge (shown on card header) ───────────────────── */
.card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Modal / lightbox ─────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.modal-box {
  background: var(--card-bg);
  border-radius: 10px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  transform: translateY(16px);
  transition: transform 0.25s ease;
}
.modal-backdrop.open .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--tag-bg);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--border); }

.modal-category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-period {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--heading);
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 6px;
}

.modal-meta {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 20px;
}

.modal-video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--tag-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.modal-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-media {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal-external-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}
.modal-external-link:hover { text-decoration: underline; }

.modal-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.modal-pub {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

/* Tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  font-size: 11px;
  color: var(--muted);
  background: var(--tag-bg);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--mono);
}

/* ── Publications ─────────────────────────────────────────── */
.pub-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.pub-item:last-child { border-bottom: none; }

.pub-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: var(--mono);
  min-width: 85px;
  text-align: center;
}

.pub-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pub-note {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.pub-footer {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 16px;
}

/* ── Teaching ─────────────────────────────────────────────── */
.teaching-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.teaching-card h3 {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--heading);
  color: var(--text);
  margin-bottom: 16px;
}

.courses-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-chip {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--tag-bg);
  padding: 6px 14px;
  border-radius: 6px;
}

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.highlight-item {
  padding: 12px;
  border-left: 2px solid var(--accent);
  background: var(--bg);
  border-radius: 0 6px 6px 0;
}

.highlight-item p:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.highlight-item p:last-child {
  font-size: 12px;
  color: var(--muted);
}

/* ── Awards ───────────────────────────────────────────────── */
.award-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.award-year {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 500;
  min-width: 40px;
}

.award-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-btn {
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.contact-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-name        { font-size: 32px; }
  .nav-inner        { gap: 14px; }
  .projects-grid    { grid-template-columns: 1fr; }
  .highlights-grid  { grid-template-columns: 1fr; }
  .hero             { padding: 48px 16px 40px; }
  .container        { padding: 0 16px; }
  .pub-item         { flex-direction: column; gap: 8px; }
  .modal-box        { padding: 20px; }
  .modal-title      { font-size: 18px; }
}
