/* ==========================================================================
   PRODUCT DESIGNER PORTFOLIO - DESIGN SYSTEM & STYLES
   ========================================================================== */

/* --- CSS Variables & Theme System --- */
:root {
  /* Dark Theme (Base Theme) */
  --bg-primary: #0A0A0A;
  --bg-secondary: #171717;
  --bg-tertiary: #242424;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-h1: #FFFFFF;
  --text-body: #D4D4D4;
  --text-subtitle: #A3A3A3;
  --text-primary: #FFFFFF;
  --text-secondary: #D4D4D4;
  --text-muted: #A3A3A3;
  --text-inverse: #0A0A0A;

  --accent-primary: #29B6B6;
  --accent-primary-hover: #229999;
  --accent-glow: rgba(41, 182, 182, 0.25);
  --accent-emerald: #10b981;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);

  --font-mono: 'Azeret Mono', ui-monospace, monospace;
  --font-sans: 'Satoshi', -apple-system, 'Segoe UI', sans-serif;
  --font-h1: var(--font-mono);
  --font-subtitle: var(--font-mono);
  --font-heading: var(--font-sans);
  --font-body: var(--font-sans);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #EDEDED;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #E5E5E5;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-card-hover: rgba(0, 0, 0, 0.06);

  --text-h1: #0A0A0A;
  --text-body: #404040;
  --text-subtitle: #737373;
  --text-primary: #0A0A0A;
  --text-secondary: #404040;
  --text-muted: #737373;
  --text-inverse: #FFFFFF;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.15);
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

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

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

/* --- Typography Helpers --- */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

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

.text-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Layout Containers --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 100px 0;
}

/* --- Header & Navigation --- */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: padding var(--transition-fast), background var(--transition-fast);
}

.navbar-wrapper.scrolled {
  padding: 10px 0;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  padding: 2px;
  position: relative;
}

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

.brand-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .nav-menu {
  background: rgba(0, 0, 0, 0.04);
}

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

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

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

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.theme-toggle-btn {
  font-size: 18px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

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

  .navbar {
    flex-wrap: wrap;
  }

  .nav-menu,
  .nav-actions {
    display: none;
  }

  .navbar-wrapper.nav-open .nav-menu {
    display: flex;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-top: 12px;
    padding: 12px 20px;
  }

  .navbar-wrapper.nav-open .nav-actions {
    display: flex;
    order: 4;
    width: 100%;
    justify-content: space-between;
    margin-top: 12px;
  }

  .nav-link {
    padding: 10px 0;
  }
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
}

.hero-title {
  font-family: var(--font-h1);
  font-weight: 200;
  font-size: clamp(38px, 6.5vw, 84px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-subtitle {
  font-family: var(--font-subtitle);
  font-weight: 200;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-badge.text-pop,
.hero-title.text-pop,
.hero-subtitle.text-pop {
  transform: scale(1.035);
  filter: brightness(1.4);
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-fast);
}

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

/* --- Hero Cursor Trail (homepage header only) --- */
.hero-cursor-trail {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.hero-cursor-trail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  filter: blur(0px);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out, filter 0.3s ease-out;
  will-change: transform, opacity, filter;
}

.hero-cursor-trail img[data-status="active"] {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease-out, filter 0.3s ease-out;
}

.hero-cursor-trail img[data-blur="true"] {
  filter: blur(10px);
}

@media (max-width: 768px) {
  .hero-cursor-trail {
    display: none;
  }
}

/* --- Site-Wide Pixel Cursor Trail (excludes hero/case-study headers) --- */
.pixel-trail-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.pixel-trail-dot {
  position: absolute;
  background: var(--accent-primary);
  border-radius: 2px;
  transition: width 0.1s ease-out, height 0.1s ease-out;
}

@media (max-width: 768px) {
  .pixel-trail-layer {
    display: none;
  }
}

/* --- Selected Work Section --- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

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

.filter-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

/* Projects Grid & Featured Card Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-card.featured-video-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  min-height: 340px;
}

.project-card.featured-video-card .project-media {
  width: 52%;
  height: auto;
  min-height: 340px;
}

.project-card.featured-video-card .project-body {
  width: 48%;
  justify-content: center;
  padding: 36px;
}

@media (max-width: 900px) {
  .project-card.featured-video-card {
    flex-direction: column;
  }
  .project-card.featured-video-card .project-media {
    width: 100%;
    min-height: 280px;
  }
  .project-card.featured-video-card .project-body {
    width: 100%;
  }
}

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

.project-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md), 0 0 30px rgba(59, 130, 246, 0.15);
}

.project-media {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #0d0d0d;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-media img {
  transform: scale(1.04);
}

.project-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 2;
}

.project-badge.video-badge {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.project-overlay-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  color: #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  opacity: 0.85;
  transform: scale(0.9);
  transition: all var(--transition-fast);
  z-index: 2;
}

.play-icon-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  padding-left: 3px;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6) !important;
  opacity: 1 !important;
  transform: scale(1) !important;
}

.project-card:hover .project-overlay-btn {
  opacity: 1;
  transform: scale(1.1) !important;
}

/* --- Animated UI Video Player Modal Styles --- */
.video-player-container {
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid var(--border-medium);
  overflow: hidden;
  margin: 20px 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.video-player-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.video-title-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #cbd5e1;
  letter-spacing: 0.05em;
  flex: 1;
}

.video-quality-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #3b82f6;
  color: #fff;
  letter-spacing: 0.05em;
}

.video-viewport {
  position: relative;
  width: 100%;
  height: 380px;
  background: #020617;
  overflow: hidden;
}

.video-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.video-ui-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.live-counter-box {
  align-self: flex-start;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.live-pulse {
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.08em;
}

.live-counter-val {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0;
}

.live-counter-lbl {
  font-size: 11px;
  color: #94a3b8;
}

.live-comment-toast {
  align-self: flex-end;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 13px;
  color: #f8fafc;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
}

.live-comment-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.play-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  padding-left: 4px;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.7);
  transition: transform 0.2s ease;
}

.play-center-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 10px #3b82f6;
  transition: width 0.2s linear;
}

.video-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #0f172a;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.video-ctrl-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.video-ctrl-btn:hover {
  color: #ffffff;
}

.video-time-display {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
}

.ctrl-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #64748b;
  text-transform: uppercase;
}

.project-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-category {
  font-family: var(--font-subtitle);
  font-weight: 200;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.project-desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

.project-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Section 1: Full-Bleed Edge-to-Edge Case Study Hero Header (100% Widescreen 4K) */
.case-study-hero-fullbleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 72px;
  background: var(--bg-primary);
  overflow: hidden;
}

.case-study-hero-fullbleed img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform-origin: center top;
  will-change: transform;
}

/* Dedicated Case Study Meta Grid (Role & Timeline only) */
.case-study-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 24px;
  align-items: center;
  margin-bottom: 40px;
}

@media (max-width: 840px) {
  .case-study-meta-grid {
    grid-template-columns: 1fr;
    padding: 24px 28px;
    gap: 20px;
  }
}

.case-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 32px;
  margin-top: 60px;
}

@media (max-width: 480px) {
  .case-nav-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .case-nav-footer .btn-primary,
  .case-nav-footer .btn-secondary {
    justify-content: center;
    text-align: center;
  }
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-family: var(--font-subtitle);
  font-size: 11px;
  font-weight: 200;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meta-val {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- About Me Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.about-text p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.skill-tag {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Experience Cards */
.exp-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  transition: border-color var(--transition-fast);
}

.exp-card:hover {
  border-color: var(--border-medium);
}

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

.exp-role {
  font-weight: 600;
  font-size: 16px;
}

.exp-company {
  color: var(--accent-primary);
  font-weight: 500;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.exp-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Interactive Design System Sandbox --- */
.sandbox-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 40px;
  margin-top: 40px;
}

.token-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-end;
  padding: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
}

/* --- Contact Section --- */
.contact-section {
  text-align: center;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-email-link {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 4px;
  display: inline-block;
  margin: 24px 0 32px;
  transition: all var(--transition-fast);
}

.contact-email-link:hover {
  color: var(--accent-primary);
  border-bottom-color: transparent;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  font-size: 13px;
  color: var(--text-muted);
}

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

/* ==========================================================================
   CASE STUDY MODAL SYSTEM
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-medium);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(30px) scale(0.96);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: sticky;
  top: 20px;
  right: 20px;
  float: right;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.modal-close-btn:hover {
  background: #ffffff;
  color: #141414;
  transform: scale(1.08);
}

.modal-header {
  padding: 60px 60px 40px;
}

.modal-body {
  padding: 0 60px 60px;
}

@media (max-width: 768px) {
  .modal-header, .modal-body {
    padding: 30px 24px;
  }
}

/* Case Study Meta Item details defined above */

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meta-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Tesla Web Mockup & AI Chatbot Simulator */
.tesla-web-frame {
  border-radius: 20px;
  border: 1px solid var(--border-medium);
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow-lg);
  margin: 32px 0;
  position: relative;
}

.browser-bar {
  background: #1e293b;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.browser-url {
  background: #0f172a;
  border-radius: 6px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  flex: 1;
  text-align: center;
}

.tesla-viewport {
  position: relative;
  min-height: 480px;
  background: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.8)), url('./Screenshot 2026-07-30 195415.png') center/cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.tesla-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
}

.tesla-logo {
  letter-spacing: 0.3em;
  font-weight: 800;
  font-size: 16px;
}

.tesla-hero-text {
  text-align: center;
  margin-top: 40px;
  color: #ffffff;
}

.tesla-hero-text h2 {
  font-size: 36px;
  font-weight: 700;
}

/* Chatbot Floating Widget Inside Viewport */
.chatbot-widget {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 360px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 600px) {
  .chatbot-widget {
    position: static;
    width: 100%;
    margin-top: 20px;
  }
}

.chat-header {
  background: rgba(30, 41, 59, 0.8);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.chat-title {
  font-size: 13px;
  font-weight: 600;
}

.chat-status {
  font-size: 10px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-messages {
  padding: 16px;
  height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
}

.msg-bot {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.msg-user {
  background: #3b82f6;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-chips {
  display: flex;
  gap: 6px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.chip-btn {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 11px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #ffffff;
  border-color: #3b82f6;
}

.chat-input-row {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  color: #ffffff;
  font-size: 12px;
  outline: none;
}

.chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #3b82f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Mobile App Frame for Facts Commando */
.mobile-phone-frame {
  width: 320px;
  height: 640px;
  border-radius: 44px;
  border: 10px solid #1a1a1a;
  background: #000000;
  box-shadow: var(--shadow-lg);
  margin: 32px auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 90px;
  height: 22px;
  background: #1a1a1a;
  border-radius: 12px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.phone-screen {
  background: #ffffff;
  color: #1a1a1a;
  flex: 1;
  overflow-y: auto;
  padding: 40px 16px 16px;
  display: flex;
  flex-direction: column;
}

.profile-card-ui {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Utility Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}
