/* ==========================================================================
   PRATEEK JAIN — PORTFOLIO DESIGN SYSTEM (SAAS LIGHT THEME)
   ========================================================================== */

:root {
  /* Colors */
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;
  --border-focus: #818cf8;

  /* Typography */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-inverse: #ffffff;

  /* Accent Colors */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;

  --emerald: #059669;
  --emerald-bg: #ecfdf5;
  --emerald-border: #a7f3d0;

  --amber: #d97706;
  --amber-bg: #fffbeb;

  --blue: #2563eb;
  --blue-bg: #eff6ff;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-indigo: 0 10px 25px -5px rgba(79, 70, 229, 0.25);

  /* Transitions */
  --trans-fast: 0.15s ease;
  --trans-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Surfaces that differ per theme */
  --nav-bg: rgba(255, 255, 255, 0.85);
  --hero-glow: rgba(199, 210, 254, 0.55);
  --hero-glow-2: rgba(167, 243, 208, 0.35);
  --grid-line: rgba(15, 23, 42, 0.045);

  color-scheme: light;
}

/* Dark theme tokens */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --bg-subtle: #0f1629;
    --bg-muted: #172036;
    --surface: #121a2e;
    --surface-hover: #172036;
    --border: #232e48;
    --border-dark: #33405f;
    --text-main: #e8ecf5;
    --text-muted: #a3adc2;
    --text-dim: #7c879e;
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: rgba(129, 140, 248, 0.12);
    --primary-border: rgba(129, 140, 248, 0.35);
    --emerald: #34d399;
    --emerald-bg: rgba(52, 211, 153, 0.1);
    --emerald-border: rgba(52, 211, 153, 0.35);
    --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(11, 16, 32, 0.8);
    --hero-glow: rgba(99, 102, 241, 0.22);
    --hero-glow-2: rgba(16, 185, 129, 0.12);
    --grid-line: rgba(255, 255, 255, 0.04);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --bg-subtle: #0f1629;
  --bg-muted: #172036;
  --surface: #121a2e;
  --surface-hover: #172036;
  --border: #232e48;
  --border-dark: #33405f;
  --text-main: #e8ecf5;
  --text-muted: #a3adc2;
  --text-dim: #7c879e;
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-light: rgba(129, 140, 248, 0.12);
  --primary-border: rgba(129, 140, 248, 0.35);
  --emerald: #34d399;
  --emerald-bg: rgba(52, 211, 153, 0.1);
  --emerald-border: rgba(52, 211, 153, 0.35);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(11, 16, 32, 0.8);
  --hero-glow: rgba(99, 102, 241, 0.22);
  --hero-glow-2: rgba(16, 185, 129, 0.12);
  --grid-line: rgba(255, 255, 255, 0.04);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--trans-smooth), color var(--trans-smooth);
}

body.modal-open {
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--primary);
  color: #fff;
}

section[id] {
  scroll-margin-top: 72px;
}

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

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

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

/* Layout Utilities */
.container {
  width: 90%;
  max-width: 1140px;
  margin: 0 auto;
}

.section {
  padding: 90px 0;
}

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

.section-header {
  margin-bottom: 52px;
}

.section-header.center {
  text-align: center;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--r-full);
  margin-bottom: 12px;
  border: 1px solid var(--primary-border);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-main);
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-top: 10px;
  line-height: 1.65;
}

.section-header.center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--trans-smooth);
  white-space: nowrap;
}

.btn-primary {
  background-color: #4f46e5;
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-indigo);
  color: var(--text-inverse);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-main);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--border-dark);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: var(--r-sm);
}

.btn-lg {
  padding: 13px 26px;
  font-size: 0.98rem;
}

/* Tags & Badges */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--r-sm);
  transition: all var(--trans-fast);
}

.tag:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background-color: var(--primary-light);
}

.tag-primary {
  color: var(--primary);
  background-color: var(--primary-light);
  border-color: var(--primary-border);
}

/* ==========================================================================
   1. NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--trans-smooth);
  height: 72px;
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-xs);
  height: 64px;
}

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

.nav-brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--primary);
}

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

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  transition: all var(--trans-fast);
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

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

.mobile-nav .nav-link {
  font-size: 1rem;
  padding: 8px 0;
}

/* ==========================================================================
   2. HERO SECTION
   ========================================================================== */
.hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 28%, var(--hero-glow) 0%, transparent 38%),
    radial-gradient(circle at 10% 90%, var(--hero-glow-2) 0%, transparent 35%);
}

/* Faint engineering grid behind the hero, fading out at the edges */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
}

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

.hero-avail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--emerald);
  background-color: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  padding: 5px 14px;
  border-radius: var(--r-full);
  margin-bottom: 24px;
}

.avail-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald);
  border-radius: 50%;
  position: relative;
}

.avail-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--emerald);
  opacity: 0.4;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

.hero-headline {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 18px;
}

.hero-headline span {
  color: var(--primary);
  background: linear-gradient(90deg, var(--primary) 0%, #7c3aed 55%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subheadline {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 14px;
}

.role-rotator {
  color: var(--primary);
  font-weight: 700;
  border-right: 2px solid var(--primary);
  padding-right: 3px;
  animation: caret 1s step-end infinite;
}

@keyframes caret {
  50% { border-color: transparent; }
}

.hero-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 600px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-meta-row .hero-location {
  margin-bottom: 0;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--trans-fast);
}

.social-link:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

/* Right Side Photo & Floating Tech Chips */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  width: 340px;
  max-width: 100%;
  justify-self: center;
}

.photo-frame {
  width: 280px;
  height: 340px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background-color: #1a1a1a;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-border), 0 20px 60px -20px rgba(79, 70, 229, 0.45);
  position: relative;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Floating tech chips around frame */
.tech-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  animation: float 4s ease-in-out infinite;
}

.chip-1 { top: 20px; left: -20px; animation-delay: 0s; }
.chip-2 { top: 120px; right: -25px; animation-delay: 1s; }
.chip-3 { bottom: 60px; left: -30px; animation-delay: 2s; }
.chip-4 { bottom: 15px; right: -10px; animation-delay: 1.5s; }

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

/* ==========================================================================
   3. QUICK CREDIBILITY STRIP
   ========================================================================== */
.credibility-strip {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.credibility-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: center;
}

.cred-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.cred-sub {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-dim);
}

.cred-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--r-md);
  transition: background-color var(--trans-fast);
}

.cred-item:hover {
  background-color: var(--bg-subtle);
}

.cred-icon svg {
  width: 17px;
  height: 17px;
}

.cred-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   4. ABOUT SECTION
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-prose p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}

.about-prose p strong {
  color: var(--text-main);
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.highlight-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-smooth);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.card-header-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   5. FEATURED PROJECTS (CASE STUDIES & GRID)
   ========================================================================== */

.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Project filter tabs */
.project-filters {
  display: inline-flex;
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  background-color: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: var(--r-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--trans-fast);
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background-color: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

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

.project-actions {
  display: flex;
  gap: 8px;
}

/* New Projects Grid & Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-smooth);
}

.project-card.featured {
  border-color: var(--primary-border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--primary-light) 120%);
  position: relative;
  overflow: hidden;
}

/* Accent bar across the top of featured cards */
.project-card.featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #7c3aed, #0ea5e9);
}

.project-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.project-header {
  margin-bottom: 12px;
}

.project-category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.project-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bullet-item svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   6. AI SYSTEM ARCHITECTURE SECTION
   ========================================================================== */
.architecture-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.arch-flow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 30px;
}

.arch-node {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--trans-smooth);
  position: relative;
}

.arch-node:hover,
.arch-node.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.arch-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: var(--primary);
  display: flex;
  justify-content: center;
}

.arch-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.arch-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.arch-connector {
  text-align: center;
  color: var(--border-dark);
  font-weight: 800;
}

.arch-detail-panel {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.arch-detail-panel strong {
  color: var(--text-main);
}

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

.skill-category-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-smooth);
}

.skill-category-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.category-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-icon {
  color: var(--primary);
}

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

/* ==========================================================================
   8. EXPERIENCE SECTION
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  width: 2px;
  background-color: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 54px;
  margin-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  top: 4px;
  left: 13px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--primary);
}

.timeline-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

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

.timeline-role {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.timeline-company {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  background-color: var(--bg-muted);
  padding: 3px 10px;
  border-radius: var(--r-full);
}

.timeline-bullets {
  list-style: none;
  margin-bottom: 16px;
}

.timeline-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* ==========================================================================
   9. EDUCATION & CERTIFICATIONS
   ========================================================================== */
.edu-cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.edu-card-group, .cert-card-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edu-item-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}

.edu-degree {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.edu-school {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

.status-pursuing {
  color: var(--primary);
  background-color: var(--primary-light);
  border: 1px solid var(--primary-border);
}

.status-completed {
  color: var(--emerald);
  background-color: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
}

.cert-item-chip {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cert-badge-icon {
  font-size: 1.2rem;
}

.cert-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.cert-issuer {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================================
   11. CONTACT SECTION
   ========================================================================== */
.contact-card {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: var(--text-inverse);
  border-radius: var(--r-xl);
  padding: 56px 40px;
  text-align: center;
  box-shadow: var(--shadow-indigo);
}

.contact-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.contact-desc {
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 32px;
  opacity: 0.9;
  line-height: 1.65;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.contact-actions .btn-secondary {
  background-color: #ffffff;
  color: var(--primary-hover);
  border: none;
}

.contact-actions .btn-secondary:hover {
  background-color: var(--primary-light);
}

.contact-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.contact-actions .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.contact-availability {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background-color: var(--bg);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.footer-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
}

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

/* Current-role date pill */
.timeline-date-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald);
  background-color: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
}

.timeline-date-current .avail-dot {
  width: 6px;
  height: 6px;
}

.timeline-date-current .avail-dot::after {
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
}

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

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.theme-toggle-mobile {
  display: none;
  margin-left: auto;
  margin-right: 8px;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 88px;
  right: 30px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--trans-smooth);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover {
  color: var(--primary);
  border-color: var(--primary-border);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* Scroll reveal (only when JS has opted in) */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   13. CASE STUDY MODAL SYSTEM
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.modal-close:hover {
  background-color: var(--border);
  color: var(--text-main);
}

/* ==========================================================================
   14. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .photo-frame {
    width: 220px;
    height: 270px;
  }

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

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

  .arch-connector {
    display: none;
  }

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

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

  .edu-cert-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu, .nav-actions {
    display: none;
  }

  .nav-toggle,
  .theme-toggle-mobile {
    display: flex;
  }

  /* Hamburger animation when open */
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .section {
    padding: 60px 0;
  }

  .hero {
    padding: 110px 0 60px;
  }

  .hero-headline {
    font-size: 2rem;
  }

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

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .about-grid, .edu-cert-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  /* Architecture section: vertical stack on mobile */
  .arch-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .architecture-box {
    padding: 20px 16px;
  }

  .contact-card {
    padding: 36px 20px;
  }

  .contact-title {
    font-size: 1.65rem;
  }

  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .section-title {
    font-size: 1.8rem;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .edu-item-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

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

  /* Modal full-width on mobile */
  .modal-card {
    padding: 24px 18px;
    max-height: 95vh;
    border-radius: var(--r-lg);
  }

  /* Bigger touch targets for social links */
  .social-link {
    width: 44px;
    height: 44px;
  }

  /* Project card improvements */
  .project-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-footer .btn {
    align-self: stretch;
    justify-content: center;
  }

  .project-actions {
    align-self: stretch;
  }

  .project-actions .btn {
    flex: 1;
  }
}

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

  .hero {
    padding: 100px 0 50px;
  }

  .hero-headline {
    font-size: 1.75rem;
    letter-spacing: -0.5px;
  }

  .chip-1, .chip-2, .chip-3, .chip-4 {
    display: none;
  }

  .photo-frame {
    width: 180px;
    height: 220px;
  }

  .contact-card {
    padding: 28px 16px;
  }

  .contact-title {
    font-size: 1.4rem;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.92rem;
  }

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

  .timeline-role {
    font-size: 1.05rem;
  }

  /* Reserve two lines so the typewriter role doesn't make the page jump */
  .hero-subheadline {
    min-height: 3em;
  }

  /* Tighter timeline so cards get more width on phones */
  .timeline::before {
    left: 7px;
  }

  .timeline-item {
    padding-left: 28px;
  }

  .timeline-dot {
    left: 0;
  }

  .timeline-card {
    padding: 18px 16px;
  }

  .project-card {
    padding: 22px 18px;
  }

  .filter-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .nav-brand {
    font-size: 1.05rem;
  }

  /* Ensure chips wrap nicely */
  .chips-wrap {
    gap: 6px;
  }

}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 1500;
  transition: all var(--trans-smooth);
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
  color: #ffffff;
}

/* Floating WA button slightly smaller on phones (must follow the base rule) */
@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .back-to-top {
    bottom: 76px;
    right: 20px;
  }
}

/* Brand-coloured social icons (hero + footer) */
.social-link.brand-wa { --brand: #25d366; }
.social-link.brand-li { --brand: #0a66c2; }
.social-link.brand-phone { --brand: #4f46e5; }
.social-link.brand-mail { --brand: #ea4335; }

.social-link[class*="brand-"] {
  color: var(--brand);
}

.social-link[class*="brand-"]:hover {
  color: #ffffff;
  background-color: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 6px 16px -6px var(--brand);
}

:root[data-theme="dark"] .social-link.brand-li { --brand: #3b8fe0; }
:root[data-theme="dark"] .social-link.brand-phone { --brand: #818cf8; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .social-link.brand-li { --brand: #3b8fe0; }
  :root:not([data-theme="light"]) .social-link.brand-phone { --brand: #818cf8; }
}

/* Soft attention ring on the floating WhatsApp button */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #25d366;
  opacity: 0.45;
  z-index: -1;
  animation: wa-ring 2.4s ease-out infinite;
}

@keyframes wa-ring {
  0% { transform: scale(1); opacity: 0.45; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
}

