/* ===== Dr. C. Roychoudhuri - Personal Website ===== */
/* Dark cosmic theme with gold accents */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

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

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2236;
  --bg-card-hover: #1f2a42;
  --border-subtle: #1e2a42;
  --border-accent: #2d3f63;
  --text-primary: #e8ecf4;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-gold: #d4a843;
  --accent-gold-light: #e8c36a;
  --accent-gold-dim: #b8922e;
  --accent-blue: #3b82f6;
  --accent-blue-dim: #2563eb;
  --accent-red: #ef4444;
  --gradient-hero: linear-gradient(135deg, #0a0e17 0%, #111827 40%, #1a1a3e 100%);
  --gradient-card: linear-gradient(180deg, #1a2236 0%, #151d30 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 20px rgba(212,168,67,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1100px;
  --transition: 0.25s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-gold-light);
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 2rem;
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.02em;
}

.navbar-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: width var(--transition);
}

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

.navbar-links a:hover::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ===== Hero Section ===== */
.hero {
  background: var(--gradient-hero);
  padding: 10rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212,168,67,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.03) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  opacity: 0.7;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hero h1 .gold {
  color: var(--accent-gold);
}

.hero .subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--accent-gold-dim);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.hero .description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.hero-links .btn-primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.hero-links .btn-primary:hover {
  background: var(--accent-gold-light);
  color: var(--bg-primary);
  box-shadow: var(--shadow-gold);
}

.hero-links .btn-secondary {
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
}

.hero-links .btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ===== Section Styling ===== */
.section {
  padding: 5rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-alt .section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.section-header .section-line {
  width: 50px;
  height: 3px;
  background: var(--accent-gold);
  margin: 0.8rem auto;
  border-radius: 2px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  transition: all var(--transition);
  position: relative;
}

.card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(212,168,67,0.1);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.45;
}

.card .card-authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.card .card-journal {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.8rem;
}

.card .card-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.card .card-actions a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-gold-dim);
  transition: color var(--transition);
}

.card .card-actions a:hover {
  color: var(--accent-gold);
}

.card .card-actions .dl-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ===== Publication Table ===== */
.pub-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.pub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pub-table thead th {
  background: var(--bg-card);
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 2px solid var(--border-accent);
  white-space: nowrap;
}

.pub-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}

.pub-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.pub-table tbody td {
  padding: 0.9rem 1.2rem;
  vertical-align: top;
  color: var(--text-secondary);
}

.pub-table .pub-year {
  font-weight: 600;
  color: var(--accent-gold-dim);
  white-space: nowrap;
  font-size: 0.85rem;
}

.pub-table .pub-title {
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.pub-table .pub-title a {
  color: var(--text-primary);
  transition: color var(--transition);
}

.pub-table .pub-title a:hover {
  color: var(--accent-gold);
}

.pub-table .pub-authors {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pub-table .pub-journal {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 300px;
}

.pub-table .pub-actions {
  white-space: nowrap;
}

.pub-table .pub-actions a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-gold-dim);
}

.pub-table .pub-actions a:hover {
  color: var(--accent-gold);
}

.pub-table .pub-actions .separator {
  color: var(--text-muted);
  margin: 0 0.3rem;
}

/* ===== Talks / Essays Cards ===== */
.talks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.talk-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: all var(--transition);
}

.talk-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.talk-card .talk-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  background: rgba(59,130,246,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.7rem;
}

.talk-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.talk-card .talk-venue {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.talk-card .talk-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.talk-card .talk-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-gold-dim);
}

.talk-card .talk-links a:hover {
  color: var(--accent-gold);
}

/* ===== Essays Section ===== */
.essay-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.essay-item {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.8rem;
  transition: all var(--transition);
}

.essay-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.essay-item .essay-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  background: rgba(212,168,67,0.1);
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}

.essay-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.45;
}

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

/* ===== Interview / Featured Section ===== */
.featured-box {
  max-width: 700px;
  margin: 0 auto;
  background: var(--gradient-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.featured-box .featured-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.featured-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.featured-box .featured-venue {
  font-size: 0.9rem;
  color: var(--accent-gold-dim);
  margin-bottom: 1rem;
}

.featured-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.featured-box .featured-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.featured-box .featured-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.featured-box .featured-links .listen {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.featured-box .featured-links .listen:hover {
  background: var(--accent-gold-light);
  color: var(--bg-primary);
}

.featured-box .featured-links .dl {
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
}

.featured-box .featured-links .dl:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ===== Email Form ===== */
.email-form-section {
  max-width: 550px;
  margin: 2rem auto 0;
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.email-form-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.email-form-section .form-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.email-form-section .form-note .red {
  color: var(--accent-red);
  font-weight: 600;
}

.email-form-section form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.email-form-section input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.email-form-section input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.email-form-section input[type="text"]::placeholder {
  color: var(--text-muted);
}

.email-form-section .form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.email-form-section .form-checkbox input {
  accent-color: var(--accent-gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.email-form-section input[type="submit"] {
  padding: 0.75rem 1.5rem;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.email-form-section input[type="submit"]:hover {
  background: var(--accent-gold-light);
  box-shadow: var(--shadow-gold);
}

/* ===== Success Message ===== */
.success-msg {
  text-align: center;
  padding: 1.5rem;
}

.success-msg h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #22c55e;
  margin-bottom: 0.5rem;
}

.success-msg p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer .footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.footer .footer-links {
  margin-top: 1.2rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer .footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding: 8rem 1.5rem 4rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1.1rem;
  }

  .hero .description {
    font-size: 0.95rem;
  }

  .section {
    padding: 3.5rem 1.5rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .card-grid,
  .talks-grid {
    grid-template-columns: 1fr;
  }

  .pub-table {
    font-size: 0.82rem;
  }

  .pub-table thead th,
  .pub-table tbody td {
    padding: 0.7rem 0.8rem;
  }

  .pub-table .pub-journal {
    max-width: 200px;
  }

  .email-form-section {
    padding: 1.5rem;
  }

  .featured-box {
    padding: 2rem 1.5rem;
  }

  .hero-links {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .pub-table .pub-journal {
    max-width: 160px;
  }

  .pub-table .pub-actions {
    min-width: 80px;
  }
}
