/* 
  Sandhya Bharti Portfolio CSS
  Premium Analytics Theme (Dark/Light Modes)
*/

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

:root {
  /* Dark Theme Default */
  --bg: #070D19;
  --bg-gradient: radial-gradient(circle at top right, #0d1e36 0%, #070d19 100%);
  --surface: #0F172A;
  --surface-hover: #1E293B;
  --primary: #60A5FA;
  --primary-hover: #3b82f6;
  --accent: #2DD4BF;
  --accent-rgb: 45, 212, 191;
  --success: #22C55E;
  --warning: #FBBF24;
  --text: #F3F4F6;
  --text-muted: #94A3B8;
  --border: rgba(148, 163, 184, 0.1);
  --border-focus: rgba(96, 165, 250, 0.4);
  --glow: rgba(96, 165, 250, 0.15);
  --glass-bg: rgba(7, 13, 25, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="light"] {
  /* Light Theme Overrides */
  --bg: #F8FAFC;
  --bg-gradient: radial-gradient(circle at top right, #e2e8f0 0%, #f8fafc 100%);
  --surface: #FFFFFF;
  --surface-hover: #F1F5F9;
  --primary: #2563EB;
  --primary-hover: #1d4ed8;
  --accent: #14B8A6;
  --accent-rgb: 20, 184, 166;
  --success: #22C55E;
  --warning: #F59E0B;
  --text: #111827;
  --text-muted: #64748B;
  --border: rgba(100, 116, 139, 0.12);
  --border-focus: rgba(37, 99, 235, 0.4);
  --glow: rgba(37, 99, 235, 0.08);
  --glass-bg: rgba(248, 250, 252, 0.8);
  --glass-border: rgba(0, 0, 0, 0.05);
  --shadow: 0 10px 30px -10px rgba(100, 116, 139, 0.15);
}

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

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

body {
  background: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: var(--transition-slow);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Common Typography & Utility classes */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.italic-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}

.text-accent-teal {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

/* Layout section grid */
.section-wrapper {
  padding: 8rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

/* Section Header structure to align with screenshots */
.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
}

.section-sidebar {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.section-sidebar::before {
  content: "— ";
  color: var(--primary);
}

.section-content {
  width: 100%;
}

.section-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: var(--primary);
  color: var(--bg);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.btn svg {
  margin-left: 0.5rem;
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
}

.btn:hover svg {
  transform: translate(2px, -2px);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
}

.logo-text {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

.nav-link.active {
  background: rgba(148, 163, 184, 0.08);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.clock-indicator {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.btn-resume {
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-resume:hover {
  background: transparent;
  color: var(--text);
}

/* Hero Section */
.hero-wrapper {
  padding-top: 180px;
  padding-bottom: 6rem;
  position: relative;
  overflow: hidden;
}

.hero-header-line {
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 6.5rem;
  line-height: 1.0;
  font-weight: 400;
  letter-spacing: -0.03em;
  max-width: 1100px;
}

.cursor-blink {
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background-color: var(--primary);
  margin-left: 5px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

.hero-body-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
  align-items: center;
}

.hero-description {
  font-size: 1.35rem;
  line-height: 1.5;
  font-weight: 400;
  max-width: 650px;
}

.hero-description strong {
  font-weight: 600;
  color: var(--text);
}

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

/* Hero KPI Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.kpi-card {
  display: flex;
  flex-direction: column;
}

.kpi-num {
  font-family: var(--font-sans);
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.kpi-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
}

.about-text {
  font-size: 1.25rem;
  line-height: 1.6;
}

.about-text-lead {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.about-text-secondary {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 2rem;
}

.philosophy-container {
  border-left: 1px solid var(--border);
  padding-left: 3rem;
}

.philosophy-title {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 600;
  font-family: var(--font-sans);
}

.philosophy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.philosophy-item {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.philosophy-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.about-profile-col {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-image-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: var(--transition-slow);
}

.about-image-wrapper:hover {
  border-color: var(--border-focus);
  box-shadow: 0 12px 40px var(--glow);
  transform: translateY(-4px);
}

.about-profile-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
  transition: var(--transition-slow);
  display: block;
}

.about-image-wrapper:hover .about-profile-img {
  transform: scale(1.05);
}

/* Selected Work (Projects) */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card {
  display: grid;
  grid-template-columns: 50px 1.2fr 1.3fr 50px;
  gap: 2.5rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: var(--transition-slow);
}

.project-card:hover {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  background: var(--surface);
  border-bottom-color: var(--primary);
  border-radius: 12px;
}

.project-num {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 500;
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card-title {
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.2;
}

.project-card:hover .project-card-title {
  color: var(--primary);
}

.project-card-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

.project-tags {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-tags span:not(:last-child)::after {
  content: " • ";
  color: var(--primary);
  margin: 0 0.5rem;
}

/* Chart Preview Container inside Project Card */
.project-visual {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 200px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
}

.project-card:hover .project-visual {
  background: rgba(15, 23, 42, 0.8);
  border-color: var(--border-focus);
  box-shadow: 0 8px 30px var(--glow);
}

.project-visual-canvas {
  width: 100%;
  height: 110px;
  position: relative;
}

.project-visual-stats {
  display: flex;
  gap: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
}

.project-visual-stat {
  display: flex;
  flex-direction: column;
}

.visual-stat-num {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.visual-stat-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.project-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.project-card:hover .project-arrow {
  color: var(--text);
  border-color: var(--text);
  background: var(--bg);
  transform: rotate(45deg);
}

.project-arrow svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* Business Impact Metrics */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.impact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.impact-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: 0 10px 30px var(--glow);
}

.impact-val {
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.impact-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 500;
}

/* Toolkit Marquee Section */
.marquee-container {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  background: var(--surface);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.marquee-row {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.marquee-scroll {
  display: flex;
  white-space: nowrap;
  width: fit-content;
  animation: marquee-left 40s linear infinite;
}

.marquee-scroll-reverse {
  animation: marquee-right 35s linear infinite;
}

.marquee-scroll:hover {
  animation-play-state: paused;
}

.marquee-item-large {
  display: flex;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  color: var(--text);
  padding: 0 2.5rem;
  position: relative;
}

.marquee-item-large::after {
  content: "✦";
  font-size: 1.5rem;
  position: absolute;
  right: -0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
}

.marquee-item-small {
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 2rem;
  position: relative;
}

.marquee-item-small::after {
  content: "✦";
  font-size: 0.8rem;
  position: absolute;
  right: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
}

/* Experience / Education Timeline */
.timeline-block {
  margin-bottom: 4rem;
}

.timeline-subtitle {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 600;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding-top: 0.25rem;
}

.timeline-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-role {
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.2;
}

.timeline-company {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.timeline-bullet {
  font-size: 1rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
}

/* Certifications Layout */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: 0 8px 25px var(--glow);
}

.cert-num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.cert-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.3;
}

/* Contact Section Override light background */
.contact-section {
  background: var(--bg);
  transition: var(--transition-slow);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
}

.contact-intro {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-text {
  font-size: 1.25rem;
  line-height: 1.6;
}

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

.contact-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-val {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.btn-copy {
  background: transparent;
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.btn-copy:hover {
  color: var(--text);
  border-color: var(--text);
}

.btn-copy svg {
  width: 0.85rem;
  height: 0.85rem;
}

/* Footer styling */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Case Study Modal Overlays (Dialog) */
.dialog-overlay {
  border: none;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: none; /* Handled via active status class in script */
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.dialog-overlay.active {
  display: flex;
  opacity: 1;
}

.dialog-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 13, 25, 0.6);
  backdrop-filter: blur(8px);
}

.dialog-content {
  position: relative;
  z-index: 2;
  width: 65%;
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-y: auto;
}

.dialog-overlay.active .dialog-content {
  transform: translateX(0);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.dialog-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dialog-tag {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}

.dialog-title {
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.2;
}

.btn-close {
  background: transparent;
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
}

.btn-close:hover {
  transform: scale(1.1);
  border-color: var(--text);
  background: var(--surface);
}

.btn-close svg {
  width: 1.2rem;
  height: 1.2rem;
}

.dialog-body {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* Case Study Structure */
.case-study-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.case-study-chart-container {
  width: 100%;
  height: 250px;
  position: relative;
  margin-top: 1rem;
}

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

.case-study-kpi {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.kpi-val-cs {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.kpi-lbl-cs {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.case-study-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.cs-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cs-h {
  font-size: 1.5rem;
  font-weight: 400;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.cs-p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cs-item {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.cs-item::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.8rem;
  top: 0.15rem;
}

.cs-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cs-tech-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.cs-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Animations */
@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--accent); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Custom styles for SVG charts */
.chart-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2.5s ease-out forwards;
}

.chart-point {
  opacity: 0;
  animation: showPoint 0.5s ease-out forwards;
}

.chart-bar-rect {
  transform-origin: bottom;
  transform: scaleY(0);
  animation: growBar 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.chart-donut-circle {
  stroke-dasharray: 283; /* 2 * PI * 45 */
  stroke-dashoffset: 283;
  transform-origin: center;
  transform: rotate(-90deg);
  animation: drawDonut 1.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes showPoint {
  to { opacity: 1; }
}

@keyframes growBar {
  to { transform: scaleY(1); }
}

@keyframes drawDonut {
  to { stroke-dashoffset: var(--dashoffset, 0); }
}

/* Tooltip design for SVG charts */
.chart-tooltip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-focus);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text);
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 100;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 4.5rem;
  }
  .section-grid {
    grid-template-columns: 1fr;
  }
  .section-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 1rem;
  }
  .project-card {
    grid-template-columns: 30px 1.2fr 1fr;
  }
  .project-visual {
    display: none; /* Hide preview canvases on medium viewports to save space */
  }
  .contact-grid, .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .dialog-content {
    width: 85%;
  }
}

@media (max-width: 768px) {
  .nav-links, .clock-indicator {
    display: none; /* Standard mobile collapse - menu toggled via drawer could be added */
  }
  .hero-title {
    font-size: 3.2rem;
  }
  .hero-body-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .certs-grid {
    grid-template-columns: 1fr;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .dialog-content {
    width: 100%;
  }
  .dialog-header {
    padding: 1.5rem 2rem;
  }
  .dialog-body {
    padding: 2rem;
  }
  .case-study-kpis {
    grid-template-columns: 1fr;
  }
}
