/* ==========================================================================
   CHRIS CASTALDI — PORTFOLIO DESIGN SYSTEM
   Editorial, Human-Crafted Architecture & Engineering Theme
   Ultra-Responsive, Zero-Gradient Geometric Square Design Engine
   ========================================================================== */

:root {
  /* Surface & Background Hierarchy */
  --bg-dark: #080a0f;
  --bg-card: #0e121a;
  --bg-card-hover: #131722;
  --bg-nav: rgba(8, 10, 15, 0.94);
  --bg-surface-raised: #151a26;

  /* Crisp Specular Borders (Zero Neon Halo) */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --border-accent: rgba(56, 189, 248, 0.35);

  /* Curated Intentional Solid Accents */
  --accent: #38bdf8;          /* Electric Sky / Ice Slate */
  --accent-hover: #0284c7;
  --accent-subtle: rgba(56, 189, 248, 0.08);
  --accent-subtle-hover: rgba(56, 189, 248, 0.16);
  --accent-emerald: #10b981;  /* Status / Active */
  --accent-amber: #f59e0b;    /* Highlight */

  /* High-Contrast Typographic Hierarchy */
  --text-main: #f8fafc;       /* Crisp White */
  --text-muted: #94a3b8;      /* Slate 400 */
  --text-dim: #64748b;        /* Slate 500 */

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'Fira Code', monospace;

  /* Strict Geometric Square Radii (0px) */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-full: 0px;

  /* Transitions & Realistic Diffused Shadows */
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
  --shadow-hover: 0 16px 40px -12px rgba(0, 0, 0, 0.9);
}

/* Base Reset & Globals */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0 !important;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Animation Canvas (PlexisNode Mesh Engine) */
#bg-canvas,
#plexis-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
  transform: translateZ(0);
  will-change: transform;
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #ffffff;
  letter-spacing: -0.02em;
  font-weight: 700;
}

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

a:hover {
  color: #7dd3fc;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

section {
  padding: 5.5rem 0;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.9rem 0;
  transition: var(--transition);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-logo img {
  width: 34px;
  height: 34px;
  border-radius: 0;
  border: 1px solid var(--border-subtle);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.3s ease;
}

.brand-logo:hover img {
  transform: scale(1.1) rotate(4deg);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

.brand-logo .accent {
  color: var(--text-main);
  font-weight: 800;
}

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

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

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

.nav-btn:hover {
  background: #ffffff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Sleek Plexis Theme Switcher Pills */
.nav-theme-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-subtle);
}

.nav-theme-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.8rem !important;
  font-family: var(--font-body);
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}

.nav-theme-pill::after {
  display: none !important;
}

.nav-theme-pill i {
  font-size: 0.75rem;
  color: var(--accent);
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-theme-pill:hover {
  color: #ffffff !important;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.nav-theme-pill:hover i {
  color: #ffffff;
  transform: scale(1.15);
}

.nav-theme-pill.geosite i {
  color: #fbbf24;
}

.nav-theme-pill.geosite:hover {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}

.nav-theme-pill.win95site i {
  color: #00d2d3;
}

.nav-theme-pill.win95site:hover {
  background: rgba(0, 128, 128, 0.3);
  border-color: rgba(0, 210, 211, 0.5);
  box-shadow: 0 0 12px rgba(0, 210, 211, 0.35);
}

.nav-theme-pill.win31site i {
  color: #facc15;
}

.nav-theme-pill.win31site:hover {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.nav-theme-pill.winxpsite i {
  color: #60a5fa;
}

.nav-theme-pill.winxpsite:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.4);
}

.nav-btn {
  background: #f8fafc;
  color: #080a0f !important;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 0;
  border: 1px solid #ffffff;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  background: #e2e8f0;
  border-color: #e2e8f0;
  transform: translateY(-1px);
  color: #080a0f !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0;
}

/* Hero Section */
.hero {
  padding-top: 8.5rem;
  padding-bottom: 4.5rem;
  display: flex;
  align-items: center;
  min-height: 82vh;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-text-content {
  background: rgba(14, 18, 26, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  padding: 2.75rem 2.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.hero-text-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.95rem;
  border-radius: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-emerald);
  border-radius: 0;
  display: inline-block;
}

.hero-title {
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-title .title-accent {
  color: #ffffff;
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
}

.tech-tag {
  background: #0e121a;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0;
  transition: var(--transition);
}

.tech-tag:hover {
  border-color: var(--border-hover);
  color: #ffffff;
  background: #141924;
}

.hero-ctas {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: #f8fafc;
  color: #080a0f !important;
  border-color: #ffffff;
  border-radius: 0;
}

.btn-primary:hover {
  background: #e2e8f0;
  border-color: #e2e8f0;
  transform: translateY(-2px);
  color: #080a0f !important;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-main) !important;
  border-radius: 0;
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* Hero Profile Card Widget (Square Architectural Framing) */
.hero-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  text-align: center;
  width: 100%;
}

.profile-avatar-wrap {
  width: 130px;
  height: 130px;
  margin: 0 auto 1.25rem auto;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--border-hover);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  border-radius: 0;
}

.profile-name {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
  color: #ffffff;
}

.profile-company {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 1.1rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item .stat-num {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-item .stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Company Focus Banner */
.focus-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 2.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.focus-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.focus-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
}

.focus-title-wrap h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.focus-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

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

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

.focus-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  padding: 1.1rem 1.15rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.focus-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transform: scaleY(0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.focus-card:hover::after {
  transform: scaleY(1);
}

.focus-card:hover {
  border-color: var(--border-hover);
  background: #192030;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.7);
}

.focus-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1rem;
  transition: var(--transition);
}

.focus-icon-wrap i {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.focus-card:hover .focus-icon-wrap {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: #ffffff;
}

.focus-card:hover .focus-icon-wrap i {
  transform: scale(1.22) rotate(-8deg);
  color: #ffffff;
}

.focus-text strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}

/* Section Header */
.section-title-wrap {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.25rem auto;
  background: rgba(14, 18, 26, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  padding: 2.2rem 2.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.section-title-wrap:hover {
  border-color: var(--border-hover);
}

.section-tag {
  color: var(--accent);
  font-family: var(--font-code);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  display: block;
  font-weight: 600;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 0.85rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

/* Filter Controls */
.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.75rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.55rem 1.25rem;
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: #ffffff;
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.08);
}

.filter-btn.active {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Fluid Responsive Card Grids */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
  gap: 1.75rem;
  width: 100%;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

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

.project-thumb-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #090c12;
  border-radius: 0;
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.project-cat-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: rgba(8, 10, 15, 0.92);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 0;
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  cursor: pointer;
}

.project-card:hover .video-play-overlay,
.video-card:hover .video-play-overlay {
  opacity: 1;
}

.play-btn-circle {
  width: 46px;
  height: 46px;
  background: #ffffff;
  color: #080a0f;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}

.play-btn-circle:hover {
  transform: scale(1.08);
}

.project-content {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  line-height: 1.55;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.project-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.proj-link-btn {
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 0.95rem;
  border-radius: 0;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.proj-link-btn:hover {
  background: var(--accent-subtle);
  color: #ffffff !important;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px -4px rgba(56, 189, 248, 0.35);
}

.proj-link-btn i {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-link-btn:hover i.fa-arrow-right,
.proj-link-btn:hover i.fa-external-link-alt {
  transform: translateX(4px);
}

.proj-link-btn:hover i.fa-video {
  transform: scale(1.2);
  color: var(--accent);
}

/* GitHub Open Source Lab Grid */
.github-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
  width: 100%;
}

.repo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.repo-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transform: scaleY(0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.repo-card:hover::after {
  transform: scaleY(1);
}

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

.repo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.repo-name {
  font-size: 1.05rem;
  color: #fff;
  font-family: var(--font-code);
  font-weight: 600;
  transition: color 0.2s ease;
}

.repo-card:hover .repo-name {
  color: var(--accent);
}

.repo-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1.15rem;
  flex-grow: 1;
}

.repo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}

.repo-lang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 500;
}

.repo-lang i {
  animation: langBreathe 2.5s infinite ease-in-out;
}

@keyframes langBreathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Video Showcase Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  width: 100%;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

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

.video-thumb-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: 0;
}

.video-thumb-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.4s ease;
}

.video-card:hover .video-thumb-container img {
  transform: scale(1.05);
}

.video-card-title {
  padding: 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
  flex-grow: 1;
}

/* Resume Timeline Section */
.resume-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(56, 189, 248, 0.25) 80%, transparent 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  background: rgba(14, 18, 26, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.timeline-item:hover {
  background: rgba(19, 23, 34, 0.98);
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 1.85rem;
  left: -2rem;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 0;
  background: var(--accent);
  border: 2px solid var(--bg-dark);
  box-shadow: 0 0 10px var(--accent);
}

.timeline-period {
  font-family: var(--font-code);
  font-size: 0.84rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: inline-block;
  letter-spacing: 0.04em;
}

.timeline-role {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
  color: #ffffff;
  font-weight: 700;
}

.timeline-company {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-bullets {
  list-style: none;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.65;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
}

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

.timeline-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Skills Matrix Cards */
.skills-block {
  background: rgba(14, 18, 26, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.skills-cat-title {
  font-size: 1rem;
  margin-bottom: 0.9rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skills-list-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Video Lightbox Modal */
body.modal-open .navbar {
  display: none !important;
}

body.modal-open #bg-canvas {
  display: none !important;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 10, 0.96);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 1.5rem;
  border-radius: 0;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #000;
  border-radius: 0;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95);
}

.modal-video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
  border-radius: 0;
}

.modal-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}

.modal-close {
  position: absolute;
  top: -42px;
  right: 0;
  background: #141924;
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 1.3rem;
  width: 34px;
  height: 34px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover {
  background: #ffffff;
  color: #080a0f;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2rem 0;
  background: #05070a;
  border-radius: 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  transition: var(--transition);
}

.social-icon:hover {
  background: #ffffff;
  color: #080a0f !important;
  border-color: #ffffff;
}

.copyright {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   BREAKPOINTS & RESPONSIVE LAYOUT ENGINE (100% FLUID)
   ========================================================================== */

@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 65px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 65px);
    background: #080a0f;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links a {
    font-size: 1.15rem;
  }

  .hero {
    padding-top: 6.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-profile-card {
    max-width: 460px;
    margin: 0 auto;
  }

  .resume-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  section {
    padding: 3.5rem 0;
  }

  .brand-logo {
    font-size: 1.1rem;
  }

  .brand-logo img {
    width: 30px;
    height: 30px;
  }

  .hero-text-content {
    padding: 1.8rem 1.4rem;
  }

  .section-title-wrap {
    padding: 1.6rem 1.4rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

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

  .focus-banner {
    padding: 1.5rem 1.2rem;
  }

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

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item::before {
    left: -1.5rem;
  }

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

/* ==========================================================================
   404 NOT FOUND PAGE STYLING (ZERO GRADIENT & SQUARE)
   ========================================================================== */
.error-page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.error-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 3rem 1.5rem;
}

.error-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 3rem 2.5rem;
  max-width: 660px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.error-glitch-title {
  font-family: var(--font-heading);
  font-size: clamp(4.5rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.error-heading {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.error-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

.error-terminal {
  background: #05070a;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-terminal .term-dim {
  color: var(--text-dim);
}

.error-terminal .term-err {
  color: #ef4444;
  font-weight: 600;
}

.error-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   DYNAMIC MICRO-INTERACTIONS, 3D TILT, & PARALLAX ENGINE
   ========================================================================== */

/* 1. Scroll Progress Indicator */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8), 0 0 20px rgba(56, 189, 248, 0.4);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s ease-out;
}

/* 2. Custom Ambient Spatial Cursor (Zero Backdrop Blur) */
.cursor-dot,
.cursor-aura {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9990;
  border-radius: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease, width 0.22s cubic-bezier(0.16, 1, 0.3, 1), height 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
}

.cursor-aura {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: transparent;
}

.cursor-aura.cursor-hover {
  width: 48px;
  height: 48px;
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.04);
}

.cursor-aura.cursor-active {
  width: 22px;
  height: 22px;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

@media (pointer: fine) {
  body.cursor-enabled .cursor-dot,
  body.cursor-enabled .cursor-aura {
    opacity: 1;
  }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-aura {
    display: none !important;
  }
}

/* 3. Parallax Section Watermarks */
.parallax-section {
  position: relative;
  overflow: hidden;
}

.section-watermark {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  font-family: var(--font-heading);
  font-size: clamp(4rem, 12vw, 11rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  will-change: transform;
}

/* 4. Hero HUD Pill */
.hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-badge-wrap .hero-badge {
  margin-bottom: 0;
}

.hero-hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(8, 10, 15, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.4rem 0.85rem;
  font-family: var(--font-code);
  font-size: 0.76rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  box-shadow: 0 0 12px -3px rgba(56, 189, 248, 0.25);
  animation: hudGlowPulse 4s infinite alternate ease-in-out;
}

.hero-hud-pill .hud-pulse {
  width: 6px;
  height: 6px;
  background: var(--accent);
  display: inline-block;
  animation: blinkFast 1.5s infinite ease-in-out;
}

@keyframes hudGlowPulse {
  0% {
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 0 10px -3px rgba(56, 189, 248, 0.2);
  }
  100% {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 16px -1px rgba(56, 189, 248, 0.4);
  }
}

@keyframes blinkFast {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 5. 3D Tilt Cards & Cursor Spotlight Sheen */
.tilt-card,
.project-card,
.focus-card,
.repo-card,
.video-card {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Specular Dynamic Spotlight */
.tilt-card::before,
.project-card::before,
.focus-card::before,
.repo-card::before,
.video-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(56, 189, 248, 0.12), transparent 75%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.tilt-card:hover::before,
.project-card:hover::before,
.focus-card:hover::before,
.repo-card:hover::before,
.video-card:hover::before {
  opacity: 1;
}

/* Subtle Specular Border Highlight */
.tilt-card::after,
.project-card::after,
.focus-card::after,
.repo-card::after,
.video-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(320px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(56, 189, 248, 0.4), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
}

.tilt-card:hover::after,
.project-card:hover::after,
.focus-card:hover::after,
.repo-card:hover::after,
.video-card:hover::after {
  opacity: 1;
}

/* 6. Magnetic Buttons Micro-Interaction */
.magnetic-btn {
  display: inline-flex;
  align-items: center;
  position: relative;
  will-change: transform;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.magnetic-btn:active {
  transform: scale(0.96) !important;
}

/* Tech Tag Micro-Pulse */
.tech-tag {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.tech-tag:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 4px 12px -2px rgba(56, 189, 248, 0.2);
}

/* 7. Staggered Scroll Reveal System */
.reveal-item {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-item.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 8. Stat item dynamic count up glow */
.stat-item .stat-num {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.stat-item:hover .stat-num {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

/* 9. Video Play Overlay micro-hover enhancement */
.play-btn-circle {
  width: 52px;
  height: 52px;
  background: rgba(8, 10, 15, 0.85);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.project-card:hover .play-btn-circle,
.video-card:hover .play-btn-circle {
  transform: scale(1.15);
  background: var(--accent);
  color: #080a0f;
  animation: playRipple 1.8s infinite ease-out;
}

@keyframes playRipple {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7), 0 0 16px rgba(56, 189, 248, 0.4);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(56, 189, 248, 0), 0 0 28px rgba(56, 189, 248, 0.8);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0), 0 0 16px rgba(56, 189, 248, 0.4);
  }
}

/* 10. Timeline Node Ping Animation */
@keyframes nodePinPing {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.8), 0 0 8px var(--accent);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(56, 189, 248, 0), 0 0 14px var(--accent);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0), 0 0 8px var(--accent);
  }
}

.timeline-item:hover::before {
  animation: nodePinPing 1.6s infinite ease-out;
  transform: translateX(-50%) scale(1.25);
}

/* 11. Social Icons Hover Micro-Interaction */
.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.3s ease;
}

.social-icon:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: #ffffff !important;
  transform: translateY(-4px) rotate(8deg);
  box-shadow: 0 6px 20px -2px rgba(56, 189, 248, 0.5);
}

/* 12. Prefers Reduced Motion Fallbacks */
@media (prefers-reduced-motion: reduce) {
  .section-watermark,
  .tilt-card,
  .project-card,
  .focus-card,
  .repo-card,
  .video-card,
  .magnetic-btn,
  .tech-tag,
  .reveal-item,
  .play-btn-circle,
  .timeline-item::before,
  .social-icon {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
  }
}


