/* ============================================
   ANIL YADAV — Executive Personal Site
   Design Tokens + Component Styles
   ============================================ */

/* --- DESIGN TOKENS --- */
:root {
  /* Type Scale (fluid clamp) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts — Cabinet Grotesk (display) + Satoshi (body), loaded from Fontshare */
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

/* --- DARK MODE (DEFAULT) --- */
:root,
[data-theme='dark'] {
  --color-bg: #0f1117;
  --color-surface: #161822;
  --color-surface-2: #1c1f2e;
  --color-surface-offset: #1a1c28;
  --color-border: #2a2d3d;
  --color-border-accent: #2e4a5a;
  --color-divider: #22253a;

  --color-text: #e2e4ed;
  --color-text-muted: #8b8fa3;
  --color-text-faint: #555872;
  --color-text-inverse: #0f1117;

  /* Primary — Electric Teal (EV / electrification) */
  --color-primary: #00c2d1;
  --color-primary-hover: #00a8b5;
  --color-primary-active: #008e99;
  --color-primary-glow: rgba(0, 194, 209, 0.15);
  --color-primary-subtle: rgba(0, 194, 209, 0.08);

  /* Accent — Deep Blue */
  --color-accent: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(0, 194, 209, 0.12);
}

/* --- LIGHT MODE --- */
[data-theme='light'] {
  --color-bg: #f5f6fa;
  --color-surface: #ffffff;
  --color-surface-2: #f0f1f5;
  --color-surface-offset: #e8e9f0;
  --color-border: #d0d3de;
  --color-border-accent: #9fd3db;
  --color-divider: #dfe1ea;

  --color-text: #1a1d2e;
  --color-text-muted: #5a5e73;
  --color-text-faint: #9095a8;
  --color-text-inverse: #f5f6fa;

  --color-primary: #0097a2;
  --color-primary-hover: #007d87;
  --color-primary-active: #00666e;
  --color-primary-glow: rgba(0, 151, 162, 0.1);
  --color-primary-subtle: rgba(0, 151, 162, 0.05);

  --color-accent: #2563eb;

  --shadow-sm: 0 1px 3px rgba(26, 29, 46, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 29, 46, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 29, 46, 0.12);
  --shadow-glow: 0 0 30px rgba(0, 151, 162, 0.08);
}

/* System preference fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg: #f5f6fa;
    --color-surface: #ffffff;
    --color-surface-2: #f0f1f5;
    --color-surface-offset: #e8e9f0;
    --color-border: #d0d3de;
    --color-border-accent: #9fd3db;
    --color-divider: #dfe1ea;
    --color-text: #1a1d2e;
    --color-text-muted: #5a5e73;
    --color-text-faint: #9095a8;
    --color-text-inverse: #f5f6fa;
    --color-primary: #0097a2;
    --color-primary-hover: #007d87;
    --color-primary-active: #00666e;
    --color-primary-glow: rgba(0, 151, 162, 0.1);
    --color-primary-subtle: rgba(0, 151, 162, 0.05);
    --color-accent: #2563eb;
    --shadow-sm: 0 1px 3px rgba(26, 29, 46, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 29, 46, 0.08);
    --shadow-lg: 0 12px 40px rgba(26, 29, 46, 0.12);
    --shadow-glow: 0 0 30px rgba(0, 151, 162, 0.08);
  }
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

body {
  font-family: var(--font-body);
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

/* Scroll reveal */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ============================================
   HEADER / NAV
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--color-divider);
  padding: var(--space-3) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.logo-link:hover {
  color: var(--color-primary);
}

.logo-svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}

.nav-desktop a:hover {
  color: var(--color-text);
}

.nav-desktop a:hover::after {
  width: 100%;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-primary-subtle);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s ease;
}

.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

.nav-toggle.active span { background: transparent; }
.nav-toggle.active span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span::after { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--color-bg) 97%, transparent);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.nav-mobile a:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--color-bg) 0%, transparent 30%, transparent 60%, var(--color-bg) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--color-bg) 70%, transparent) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-16);
  width: 100%;
}

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

.hero-text h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

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

.hero-text .subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-10);
  max-width: 60ch;
}

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-subtle);
}

/* Hero photo */
.hero-avatar {
  width: clamp(160px, 18vw, 240px);
  height: clamp(160px, 18vw, 240px);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.hero-avatar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-full);
  background: conic-gradient(from 0deg, var(--color-primary), transparent, var(--color-primary));
  opacity: 0.3;
  z-index: -1;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-avatar { display: none; }
  .hero-ctas { justify-content: center; }
  .hero-text .subtitle { margin-inline: auto; }
}

/* ============================================
   ABOUT
   ============================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.about-text p {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-6);
}

.about-philosophy {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.about-philosophy .tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-4);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.about-quote {
  margin-top: var(--space-8);
  padding: var(--space-6) var(--space-8);
  border-left: 3px solid var(--color-primary);
  background: var(--color-primary-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.about-quote blockquote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  font-style: italic;
}

/* World map dots */
.about-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.world-map-container {
  width: 100%;
  position: relative;
}

.world-map-container svg {
  width: 100%;
  height: auto;
}

.map-dot {
  fill: var(--color-primary);
  filter: drop-shadow(0 0 6px var(--color-primary));
}

.map-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  fill: var(--color-text-muted);
}

.map-line {
  stroke: var(--color-primary);
  stroke-width: 0.5;
  stroke-dasharray: 4 3;
  opacity: 0.4;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .about-visual {
    min-height: 240px;
  }
}

/* ============================================
   CAREER TIMELINE
   ============================================ */

.career-section {
  position: relative;
  background: var(--color-surface);
}

.timeline {
  position: relative;
  padding-left: var(--space-12);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-border), var(--color-border));
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-10);
}

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

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-12) + 10px);
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  border: 3px solid var(--color-primary);
  z-index: 1;
}

.timeline-item:first-child .timeline-dot {
  background: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary-glow);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-2);
}

.timeline-year {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.timeline-company {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.timeline-achievements {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.timeline-achievements li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  padding-left: var(--space-5);
  position: relative;
}

.timeline-achievements li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  opacity: 0.6;
}

.timeline-earlier {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: var(--space-5);
}

.timeline-earlier p {
  line-height: 1.6;
}

@media (max-width: 768px) {
  .timeline {
    padding-left: var(--space-8);
  }
  .timeline-dot {
    left: calc(-1 * var(--space-8) + 10px);
  }
}

/* ============================================
   EXPERTISE
   ============================================ */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.expertise-card {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  position: relative;
  overflow: hidden;
}

.expertise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

.expertise-card:hover {
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-glow);
}

.expertise-card:hover::before {
  opacity: 1;
}

.expertise-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  color: var(--color-primary);
}

.expertise-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.expertise-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .expertise-grid { grid-template-columns: 1fr; }
}

/* ============================================
   KEY PROJECTS
   ============================================ */

.projects-section {
  background: var(--color-surface);
}

.projects-placeholder {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.projects-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--color-primary-subtle), transparent 70%);
  pointer-events: none;
}

.projects-placeholder-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-lg);
  margin: 0 auto var(--space-6);
  color: var(--color-primary);
  position: relative;
}

.projects-placeholder-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  position: relative;
}

.projects-placeholder-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 50ch;
  margin: 0 auto var(--space-8);
  position: relative;
}

.projects-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  position: relative;
}

.projects-preview-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-4);
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

/* ============================================
   INSIGHTS
   ============================================ */

.insights-header {
  margin-bottom: var(--space-12);
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

a.insight-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.insight-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

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

.insight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

.insight-card:hover::before {
  opacity: 1;
}

.insight-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.insight-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border-radius: var(--radius-full);
}

.insight-date {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
}

.insight-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.insight-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  flex-grow: 1;
}

.insight-read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  margin-top: auto;
  transition: gap var(--transition-interactive);
}

.insight-card:hover .insight-read-more {
  gap: var(--space-3);
}

@media (max-width: 768px) {
  .insights-grid { grid-template-columns: 1fr; }
}

/* ============================================
   MEDIA & SPEAKING
   ============================================ */

.media-section {
  background: var(--color-surface);
}

.media-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.media-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5) var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

a.media-item:hover {
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateX(4px);
}

.media-item-inactive {
  opacity: 0.65;
  cursor: default;
}

.media-type-badge {
  font-size: 11px;
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.media-type-video {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

[data-theme='light'] .media-type-video {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.media-type-article {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

[data-theme='light'] .media-type-article {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.media-type-interview {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.media-item-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-1);
}

.media-item-source {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
}

.media-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.media-item-date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.media-item-arrow {
  color: var(--color-text-faint);
  transition: color var(--transition-interactive), transform var(--transition-interactive);
  flex-shrink: 0;
}

a.media-item:hover .media-item-arrow {
  color: var(--color-primary);
  transform: translate(2px, -2px);
}

.media-item-offline {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-style: italic;
}

@media (max-width: 640px) {
  .media-item {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-5);
  }

  .media-item-type {
    order: -1;
  }

  .media-item-meta {
    justify-content: space-between;
  }
}

/* ============================================
   CONTACT
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.contact-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-item-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-1);
}

.contact-item-value {
  font-size: var(--text-base);
  color: var(--color-text);
  font-weight: 500;
}

.contact-item-value a {
  color: var(--color-text);
  text-decoration: none;
}

.contact-item-value a:hover {
  color: var(--color-primary);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-faint);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit {
  align-self: flex-start;
}

.form-success {
  display: none;
  padding: var(--space-4) var(--space-6);
  background: var(--color-primary-subtle);
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-sm);
}

.form-success.visible {
  display: block;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

/* ============================================
   DASHBOARD TEASER
   ============================================ */

/* Stats row */
.dashboard-stats {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.dashboard-stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.dashboard-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.dashboard-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Preview cards grid */
.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.preview-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
  position: relative;
}

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

.preview-card-img {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.preview-card-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s var(--ease-out);
}

.preview-card:hover .preview-card-img img {
  transform: scale(1.02);
}

/* Fade-to-dark at bottom of image */
.preview-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(0deg, var(--color-surface), transparent);
  pointer-events: none;
}

.preview-card-info {
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.preview-card-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.preview-card-info p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* CTA row */
.dashboard-cta-row {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.dashboard-access-btn {
  gap: var(--space-2);
  flex-shrink: 0;
}

.dashboard-cta-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .preview-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .preview-cards {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    gap: var(--space-4);
  }

  .dashboard-cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

/* ============================================
   SECTION DIVIDER
   ============================================ */

.section-divider {
  height: 120px;
  overflow: hidden;
  position: relative;
}

.section-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

[data-theme='light'] .section-divider img {
  opacity: 0.1;
}

.section-divider::before,
.section-divider::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  z-index: 1;
}

.section-divider::before {
  top: 0;
  background: linear-gradient(180deg, var(--color-bg), transparent);
}

.section-divider.from-surface::before {
  background: linear-gradient(180deg, var(--color-surface), transparent);
}

.section-divider::after {
  bottom: 0;
  background: linear-gradient(0deg, var(--color-bg), transparent);
}

.section-divider.to-surface::after {
  background: linear-gradient(0deg, var(--color-surface), transparent);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-10) 0 var(--space-8);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

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

.footer-education,
.footer-affiliations {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.6;
}

.footer-copyright {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================
   CIRCUIT BOARD SVG PATTERN (background)
   ============================================ */

.circuit-pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.04;
  z-index: 0;
}

.circuit-pattern svg {
  width: 100%;
  height: 100%;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   DASHBOARD GATE OVERLAY
   ============================================ */

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}

.gate-overlay.active {
  opacity: 1;
  visibility: visible;
}

.gate-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gate-overlay-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: var(--space-6);
}

.gate-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: color var(--transition-interactive), background var(--transition-interactive);
  z-index: 2;
}

.gate-close:hover {
  color: var(--color-text);
  background: var(--color-surface-raised);
}

.gate-card {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-10);
  position: relative;
  overflow: hidden;
}

.gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-primary));
}

.gate-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
}

.gate-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-3);
}

.gate-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.gate-input-group {
  position: relative;
}

.gate-input {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  padding-right: 48px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  box-sizing: border-box;
}

.gate-input::placeholder {
  color: var(--color-text-faint);
}

.gate-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.gate-input.error {
  border-color: #e5484d;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.15);
}

.gate-toggle-pw {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-interactive);
}

.gate-toggle-pw:hover {
  color: var(--color-text-muted);
}

.gate-error {
  font-size: var(--text-xs);
  color: #e5484d;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  min-height: 1.5em;
}

.gate-error.visible {
  opacity: 1;
}

.gate-submit {
  width: 100%;
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

.gate-submit:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.gate-submit:active {
  transform: translateY(0);
}

.gate-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.gate-footer-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  margin-top: var(--space-6);
  line-height: 1.6;
}

.gate-footer-note a {
  color: var(--color-primary);
  text-decoration: none;
}

.gate-footer-note a:hover {
  text-decoration: underline;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* ============================================
   DASHBOARD FULLSCREEN VIEW
   ============================================ */

.dashboard-view {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #fff;
}

.dashboard-view.active {
  display: block;
}

.dashboard-topbar {
  height: 48px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  z-index: 2001;
  position: relative;
}

.dashboard-topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.dashboard-topbar-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}

.dashboard-topbar-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.dashboard-exit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.dashboard-exit:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.dashboard-iframe {
  width: 100%;
  height: calc(100dvh - 48px);
  border: none;
  background: #fff;
}

@media (max-width: 480px) {
  .gate-card {
    padding: var(--space-8) var(--space-6);
  }
}
