/* =============================================
   DESIGN SYSTEM — CSS Custom Properties
   ============================================= */
:root {
  /* Core palette */
  --navy:       #0a0f1a;
  --navy-light: #0f1729;
  --charcoal:   #1a1f2e;
  --slate:      #2a2f3e;
  --slate-light:#3a3f4e;

  /* Accent colors */
  --mint:       #00c853;
  --mint-dim:   rgba(0, 200, 83, 0.15);
  --blue:       #e53935;
  --blue-dim:   rgba(229, 57, 53, 0.15);
  --purple:     #ff6f61;
  --purple-dim: rgba(255, 111, 97, 0.15);

  /* Text */
  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  /* Glass */
  --glass-bg:     rgba(26, 31, 46, 0.6);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur:   16px;

  /* Spacing */
  --section-padding: 120px;
  --container-max:   1200px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 0.3s var(--ease-out-expo);

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

/* =============================================
   LIGHT THEME
   ============================================= */
[data-theme="light"] {
  --navy:       #f8fafc;
  --navy-light: #f1f5f9;
  --charcoal:   #e2e8f0;
  --slate:      #cbd5e1;
  --slate-light:#94a3b8;

  --mint:       #2e7d32;
  --mint-dim:   rgba(46, 125, 50, 0.1);
  --blue:       #c62828;
  --blue-dim:   rgba(198, 40, 40, 0.1);
  --purple:     #d84315;
  --purple-dim: rgba(216, 67, 21, 0.1);

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #64748b;

  --glass-bg:     rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-blur:   16px;
}

[data-theme="light"] #bg-canvas {
  opacity: 0.15;
}

[data-theme="light"] #navbar.scrolled {
  background: rgba(248, 250, 252, 0.85);
}

[data-theme="light"] .nav-links {
  background: rgba(248, 250, 252, 0.97);
}

[data-theme="light"] .nav-link.active {
  color: var(--mint);
  background: var(--mint-dim);
}

[data-theme="light"] .nav-link--cta {
  color: #ffffff !important;
}

[data-theme="light"] .btn-primary {
  color: #ffffff;
}

[data-theme="light"] .float-card-icon {
  filter: brightness(0.85);
}

[data-theme="light"] .project-image-placeholder svg rect:first-child {
  fill: #e2e8f0;
}

[data-theme="light"] .timeline-code {
  background: #f1f5f9;
}

[data-theme="light"] .timeline-code code {
  color: #334155;
}

[data-theme="light"] .code-comment {
  color: #94a3b8;
}

[data-theme="light"] .insight-metric {
  background: #f1f5f9;
}

[data-theme="light"] .embed-placeholder {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .timeline-icon {
  background: #f8fafc;
}

[data-theme="light"] .project-badge {
  background: rgba(248, 250, 252, 0.9);
  color: var(--mint);
  border-color: rgba(46, 125, 50, 0.3);
}

[data-theme="light"] .hamburger span {
  background: var(--text-primary);
}

[data-theme="light"] ::selection {
  background: var(--mint);
  color: #ffffff;
}

/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--navy);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--mint);
  color: var(--navy);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* =============================================
   BACKGROUND CANVAS
   ============================================= */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  z-index: 1;
  padding: var(--section-padding) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--mint);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

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

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--mint), var(--blue));
  color: var(--navy);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 200, 83, 0.3);
}

.btn-outline {
  border: 1.5px solid var(--slate-light);
  color: var(--text-primary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--mint);
  color: var(--mint);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

/* =============================================
   NAVIGATION
   ============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-base);
  padding: 20px 0;
}

#navbar.scrolled {
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  transition: color var(--transition-base);
}

.logo-bracket {
  color: var(--mint);
  font-weight: 400;
}

.logo-dot {
  color: var(--mint);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 70%;
  height: 2px;
  background: var(--mint);
  border-radius: 2px;
  transition: transform var(--transition-base);
}

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

.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
  color: var(--mint);
  font-weight: 600;
  background: var(--mint-dim);
}

.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-link--cta {
  background: var(--mint) !important;
  color: var(--navy) !important;
  font-weight: 600;
  margin-left: 8px;
}

.nav-link--cta:hover {
  box-shadow: 0 4px 20px rgba(0, 200, 83, 0.3);
  transform: translateY(-1px);
}

/* Nav actions (theme toggle + hamburger) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  margin-left: 8px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--mint);
  color: var(--mint);
  transform: rotate(20deg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.5s var(--ease-out-expo);
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-tag {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-motto {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-motto .text-gradient {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 4px;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-description strong {
  color: var(--text-primary);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 40px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--mint);
  display: inline;
}

.stat-suffix {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mint);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-graphic {
  position: relative;
  width: 400px;
  height: 400px;
}

/* Floating metric cards */
.float-card {
  position: absolute;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}

.float-card-icon {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.float-card-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.float-card--1 {
  top: 30px;
  right: 20px;
  animation-delay: 0s;
}

.float-card--2 {
  bottom: 80px;
  left: 0;
  animation-delay: 2s;
}

.float-card--3 {
  top: 50%;
  right: -10px;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-15px); }
}

/* Rings */
.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 200, 83, 0.1);
}

.hero-ring--outer {
  width: 320px;
  height: 320px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 30s linear infinite, pulse-glow 4s ease-in-out infinite;
}

.hero-ring--inner {
  width: 220px;
  height: 220px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-color: rgba(229, 57, 53, 0.15);
  animation: spin 20s linear infinite reverse, pulse-glow 3s ease-in-out 1s infinite;
}

.hero-ring-center {
  position: absolute;
  width: 100px;
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Hero Profile Image */
.hero-profile-img {
  position: absolute;
  width: 240px;
  height: 240px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  border: 2px solid rgba(0, 200, 83, 0.2);
  box-shadow: 0 0 60px rgba(0, 200, 83, 0.1);
}

.hero-profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: brightness(0.95) contrast(1.05);
  transition: transform 0.6s var(--ease-out-expo);
}

.hero-graphic:hover .hero-profile-img img {
  transform: scale(1.05);
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.mouse-wheel {
  width: 3px;
  height: 8px;
  background: var(--mint);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%   { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 20px; }
}

/* =============================================
   TECH STACK SECTION
   ============================================= */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tech-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition-base);
  overflow: hidden;
}

.tech-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 200, 83, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 200, 83, 0.08);
}

.tech-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--mint-dim) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
}

.tech-card:hover .tech-card-glow {
  opacity: 1;
}

.tech-icon {
  font-size: 2.8rem;
  color: var(--mint);
  margin-bottom: 20px;
  transition: transform var(--transition-base);
}

.tech-card:hover .tech-icon {
  transform: scale(1.1);
}

.tech-icon svg {
  color: var(--mint);
}

.tech-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tech-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.tech-bar {
  height: 4px;
  background: var(--slate);
  border-radius: 4px;
  overflow: hidden;
}

.tech-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--mint), var(--blue));
  border-radius: 4px;
  transition: width 1.5s var(--ease-out-expo);
}

/* =============================================
   PROJECTS GALLERY
   ============================================= */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  transition: all var(--transition-base);
  background: transparent;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--navy);
  background: var(--mint);
  border-color: var(--mint);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 200, 83, 0.06);
  border-color: rgba(0, 200, 83, 0.15);
}

.project-card.hidden {
  display: none;
}

.project-image {
  position: relative;
  overflow: hidden;
}

.project-image-placeholder {
  width: 100%;
  height: auto;
}

.project-image-placeholder svg {
  width: 100%;
  height: auto;
  display: block;
}

.project-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
}

.project-badge {
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mint);
  border: 1px solid rgba(0, 200, 83, 0.2);
}

.project-body {
  padding: 28px;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-impact {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-impact strong {
  color: var(--mint);
}

.project-tech-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.project-tech-tags span {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
}

.project-links {
  display: flex;
  gap: 12px;
}

/* =============================================
   CASE STUDY SECTION
   ============================================= */
.case-study-wrapper {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.case-study-hero {
  padding: 48px;
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.05), rgba(229, 57, 53, 0.05));
  border-bottom: 1px solid var(--glass-border);
}

.case-study-badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--mint);
  background: var(--mint-dim);
  border-radius: 100px;
  margin-bottom: 16px;
}

.case-study-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.case-study-meta {
  display: flex;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.case-study-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

/* Timeline */
.case-study-timeline {
  padding: 48px;
  position: relative;
}

.case-study-timeline::before {
  content: '';
  position: absolute;
  left: 72px;
  top: 48px;
  bottom: 48px;
  width: 2px;
  background: linear-gradient(to bottom, var(--mint), var(--blue), var(--purple));
  opacity: 0.3;
}

.timeline-step {
  display: flex;
  gap: 32px;
  margin-bottom: 48px;
  position: relative;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--navy);
  border: 2px solid var(--mint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mint);
  z-index: 1;
}

.timeline-icon svg,
.timeline-icon i {
  width: 20px;
  height: 20px;
}

.timeline-content {
  flex: 1;
}

.timeline-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--mint);
  margin-bottom: 8px;
}

.timeline-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.timeline-content em {
  color: var(--text-primary);
  font-style: italic;
}

.timeline-content strong {
  color: var(--text-primary);
}

/* Code block inside timeline */
.timeline-code {
  background: var(--navy);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 16px;
  overflow-x: auto;
}

.timeline-code code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

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

/* Insight Metrics */
.insight-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.insight-metric {
  background: var(--navy);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.insight-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--mint);
  margin-bottom: 4px;
}

.insight-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Embed placeholder */
.case-study-embed {
  padding: 48px;
  border-top: 1px solid var(--glass-border);
}

.embed-placeholder {
  background: var(--navy);
  border: 2px dashed var(--slate);
  border-radius: var(--radius-md);
  padding: 60px;
  text-align: center;
  color: var(--text-muted);
}

.embed-placeholder p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 16px;
}

.embed-placeholder span {
  font-size: 0.85rem;
  display: block;
  margin-top: 8px;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  display: block;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.about-image:hover .about-photo {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 200, 83, 0.15);
}

.about-image-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 20px;
  left: 20px;
  border: 2px solid var(--mint);
  border-radius: var(--radius-lg);
  opacity: 0.15;
  z-index: -1;
}

.about-content .section-tag {
  text-align: left;
}

.about-content .section-title {
  text-align: left;
  margin-bottom: 24px;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-text strong {
  color: var(--text-primary);
}

.about-human {
  padding: 20px 24px;
  background: rgba(0, 200, 83, 0.04);
  border-left: 3px solid var(--mint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.about-cta {
  margin-top: 32px;
}

/* =============================================
   FOOTER / CONTACT
   ============================================= */
.footer {
  position: relative;
  z-index: 1;
  padding: 80px 0 40px;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.footer-link:hover {
  border-color: var(--mint);
  color: var(--mint);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.footer-link svg,
.footer-link i {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

/* =============================================
   REVEAL ANIMATIONS (scroll-triggered)
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.15s; }
.reveal--delay-2 { transition-delay: 0.3s; }
.reveal--delay-3 { transition-delay: 0.45s; }

/* Page load animation */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-left {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fade-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slide-in-up-stagger {
  from { opacity: 0; transform: translateY(50px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shimmer effect for buttons */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Pulse glow for rings */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 200, 83, 0.05), 0 0 60px rgba(0, 200, 83, 0.02); }
  50%      { box-shadow: 0 0 40px rgba(0, 200, 83, 0.15), 0 0 80px rgba(0, 200, 83, 0.05); }
}

/* Gradient border rotation */
@keyframes rotate-gradient {
  0%   { --angle: 0deg; }
  100% { --angle: 360deg; }
}

/* Text reveal clip */
@keyframes text-clip-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* Bounce subtle */
@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Wiggle */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-3deg); }
  75%      { transform: rotate(3deg); }
}

.hero-content {
  animation: fade-in-up 1s var(--ease-out-expo) 0.2s both;
  opacity: 1 !important;
  transform: none !important;
}

.hero-visual {
  animation: fade-in-up 1s var(--ease-out-expo) 0.5s both;
  opacity: 1 !important;
  transform: none !important;
}

/* Hero tag entrance */
.hero-tag {
  animation: fade-in-left 0.8s var(--ease-out-expo) 0.4s both;
}

/* Hero title lines stagger */
.hero-title {
  animation: fade-in-up 1s var(--ease-out-expo) 0.5s both;
}

/* Hero description entrance */
.hero-description {
  animation: fade-in-up 0.8s var(--ease-out-expo) 0.7s both;
}

/* Hero buttons entrance */
.hero-buttons {
  animation: fade-in-up 0.8s var(--ease-out-expo) 0.9s both;
}

/* Hero stats entrance with stagger */
.hero-stats .stat:nth-child(1) { animation: fade-in-up 0.6s var(--ease-out-expo) 1.1s both; }
.hero-stats .stat:nth-child(2) { animation: fade-in-up 0.6s var(--ease-out-expo) 1.25s both; }
.hero-stats .stat:nth-child(3) { animation: fade-in-up 0.6s var(--ease-out-expo) 1.4s both; }

/* Shimmer on primary button */
.btn-primary {
  background-size: 200% auto;
  background-image: linear-gradient(135deg, var(--mint) 0%, var(--blue) 50%, var(--mint) 100%);
}

.btn-primary:hover {
  animation: shimmer 1.5s linear infinite;
}

/* Float cards stagger entrance */
.float-card--1 { animation: float 6s ease-in-out infinite, fade-in-right 0.7s var(--ease-out-expo) 0.8s both; }
.float-card--2 { animation: float 6s ease-in-out 2s infinite, fade-in-left 0.7s var(--ease-out-expo) 1s both; }
.float-card--3 { animation: float 6s ease-in-out 4s infinite, fade-in-right 0.7s var(--ease-out-expo) 1.2s both; }

/* Tech card staggered reveal */
.tech-grid.visible .tech-card:nth-child(1) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.05s both; }
.tech-grid.visible .tech-card:nth-child(2) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.15s both; }
.tech-grid.visible .tech-card:nth-child(3) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.25s both; }
.tech-grid.visible .tech-card:nth-child(4) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.35s both; }
.tech-grid.visible .tech-card:nth-child(5) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.45s both; }
.tech-grid.visible .tech-card:nth-child(6) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.55s both; }

/* Tech card hover tilt + glow */
.tech-card {
  transition: all 0.4s var(--ease-out-expo);
}

.tech-card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  border-color: rgba(0, 200, 83, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 200, 83, 0.08);
}

.tech-icon {
  transition: transform 0.4s var(--ease-out-expo);
}

.tech-card:hover .tech-icon {
  transform: scale(1.15) rotate(-5deg);
}

/* Tech bar glow on fill */
.tech-bar-fill {
  position: relative;
}

.tech-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint), 0 0 24px rgba(0, 200, 83, 0.3);
  opacity: 0;
  transition: opacity 1s 1.5s;
}

.tech-grid.visible .tech-bar-fill::after {
  opacity: 1;
}

/* Project card stagger */
.projects-grid.visible .project-card:nth-child(1) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.05s both; }
.projects-grid.visible .project-card:nth-child(2) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.15s both; }
.projects-grid.visible .project-card:nth-child(3) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.25s both; }
.projects-grid.visible .project-card:nth-child(4) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.35s both; }
.projects-grid.visible .project-card:nth-child(5) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.45s both; }
.projects-grid.visible .project-card:nth-child(6) { animation: slide-in-up-stagger 0.6s var(--ease-out-expo) 0.55s both; }

/* Project card hover — lift + image zoom */
.project-card {
  transition: all 0.4s var(--ease-out-expo);
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 0 20px rgba(0, 200, 83, 0.06);
  border-color: rgba(0, 200, 83, 0.2);
}

.project-image-placeholder svg {
  transition: transform 0.6s var(--ease-out-expo);
}

.project-card:hover .project-image-placeholder svg {
  transform: scale(1.05);
}

/* Project badge pulse on card hover */
.project-card:hover .project-badge {
  animation: bounce-subtle 0.6s ease;
}

/* Section tag underline reveal */
.section-tag {
  position: relative;
}

.section-tag::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--mint);
  border-radius: 2px;
  transition: width 0.8s var(--ease-out-expo);
}

.reveal.visible .section-tag::after,
.about-content .section-tag::after {
  width: 100%;
}

/* Timeline step stagger */
.case-study-wrapper.visible .timeline-step:nth-child(1) { animation: fade-in-left 0.6s var(--ease-out-expo) 0.1s both; }
.case-study-wrapper.visible .timeline-step:nth-child(2) { animation: fade-in-left 0.6s var(--ease-out-expo) 0.25s both; }
.case-study-wrapper.visible .timeline-step:nth-child(3) { animation: fade-in-left 0.6s var(--ease-out-expo) 0.4s both; }
.case-study-wrapper.visible .timeline-step:nth-child(4) { animation: fade-in-left 0.6s var(--ease-out-expo) 0.55s both; }

/* Timeline icon pulse on hover */
.timeline-icon {
  transition: all 0.3s var(--ease-out-expo);
}

.timeline-step:hover .timeline-icon {
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(0, 200, 83, 0.25);
  background: var(--mint);
  color: var(--navy);
}

/* Insight metric hover */
.insight-metric {
  transition: all 0.3s var(--ease-out-expo);
}

.insight-metric:hover {
  transform: translateY(-4px);
  border-color: var(--mint);
  box-shadow: 0 8px 30px rgba(0, 200, 83, 0.1);
}

.insight-metric:hover .insight-value {
  animation: bounce-subtle 0.5s ease;
}

/* About section entrance */
.about-grid.visible .about-image {
  animation: fade-in-left 0.8s var(--ease-out-expo) 0.1s both;
}

.about-grid.visible .about-content {
  animation: fade-in-right 0.8s var(--ease-out-expo) 0.3s both;
}

/* About photo hover effect */
.about-photo {
  transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s var(--ease-out-expo), filter 0.6s var(--ease-out-expo);
}

.about-image:hover .about-photo {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 60px rgba(0, 200, 83, 0.15);
}

.about-image-decoration {
  transition: all 0.6s var(--ease-out-expo);
}

.about-image:hover .about-image-decoration {
  top: 12px;
  left: 12px;
  opacity: 0.3;
}

/* Footer links staggered entrance */
.footer-content.visible .footer-link:nth-child(1) { animation: fade-in-up 0.5s var(--ease-out-expo) 0.1s both; }
.footer-content.visible .footer-link:nth-child(2) { animation: fade-in-up 0.5s var(--ease-out-expo) 0.2s both; }
.footer-content.visible .footer-link:nth-child(3) { animation: fade-in-up 0.5s var(--ease-out-expo) 0.3s both; }
.footer-content.visible .footer-link:nth-child(4) { animation: fade-in-up 0.5s var(--ease-out-expo) 0.4s both; }

/* Footer link hover icon wiggle */
.footer-link:hover svg,
.footer-link:hover i {
  animation: wiggle 0.4s ease;
}

/* Nav link hover glow */
.nav-link {
  transition: all 0.3s var(--ease-out-expo);
}

.nav-link:hover {
  text-shadow: 0 0 20px rgba(0, 200, 83, 0.2);
}

/* Hero profile image pulse ring */
.hero-profile-img {
  animation: pulse-glow 4s ease-in-out infinite;
}

/* Logo bracket animation on hover */
.nav-logo:hover .logo-bracket {
  animation: wiggle 0.5s ease;
}

/* Gradient text shimmer */
.text-gradient {
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

/* Filter button click ripple */
.filter-btn {
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 200, 83, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.filter-btn:active::before {
  width: 200px;
  height: 200px;
}

/* Scroll-triggered section header */
.section-header.visible .section-title {
  animation: fade-in-up 0.7s var(--ease-out-expo) 0.1s both;
}

.section-header.visible .section-subtitle {
  animation: fade-in-up 0.7s var(--ease-out-expo) 0.25s both;
}

/* =============================================
   RESPONSIVE — Tablet (≤ 1024px)
   ============================================= */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-graphic {
    width: 300px;
    height: 300px;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .insight-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-image {
    max-width: 350px;
    margin: 0 auto;
  }

  .about-content .section-tag,
  .about-content .section-title {
    text-align: center;
  }

  .about-text {
    text-align: center;
  }

  .about-human {
    text-align: left;
  }

  .about-cta {
    text-align: center;
  }

  .case-study-timeline::before {
    left: 72px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* =============================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================= */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  /* Mobile nav */
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    background: rgba(10, 15, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    transition: right 0.5s var(--ease-out-expo);
    border-left: 1px solid var(--glass-border);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    font-size: 1.1rem;
    padding: 14px 20px;
    width: 100%;
    text-align: left;
  }

  .nav-link--cta {
    text-align: center;
    margin-left: 0;
    margin-top: 16px;
  }

  /* Mobile hero */
  .hero-graphic {
    width: 260px;
    height: 260px;
  }

  .hero-profile-img {
    width: 180px;
    height: 180px;
  }

  .float-card {
    padding: 12px 14px;
  }

  .float-card-icon {
    font-size: 1.1rem;
  }

  .float-card-text {
    font-size: 0.65rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .scroll-indicator {
    display: none;
  }

  /* Mobile grids */
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  /* Mobile case study */
  .case-study-hero {
    padding: 32px 24px;
  }

  .case-study-timeline {
    padding: 32px 24px;
  }

  .case-study-timeline::before {
    left: 47px;
  }

  .timeline-step {
    gap: 20px;
  }

  .timeline-icon {
    width: 40px;
    height: 40px;
  }

  .insight-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .case-study-embed {
    padding: 24px;
  }

  .embed-placeholder {
    padding: 40px 20px;
  }

  /* Mobile about */
  .about-photo {
    aspect-ratio: 1;
  }

  /* Mobile footer */
  .footer-links {
    flex-direction: column;
    align-items: center;
  }

  .footer-link {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================
   RESPONSIVE — Small Mobile (≤ 480px)
   ============================================= */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

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

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .project-links {
    flex-direction: column;
  }

  .project-links .btn {
    width: 100%;
    justify-content: center;
  }

  .case-study-meta {
    flex-direction: column;
    gap: 8px;
  }

  .insight-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .footer-title {
    font-size: 1.6rem;
  }
}
