/* ==========================================================================
   Mahmoud Islam - Modern Space Portfolio Stylesheet
   ========================================================================== */

/* --- Reset & Global Variables --- */
:root {
  /* Canvas & surfaces (neutralised: the old indigo tint clashes with emerald/gold) */
  --bg-color: #030907;
  --surface-card-top: rgba(16, 24, 21, 0.65);
  --surface-card-bottom: rgba(7, 12, 10, 0.45);
  --surface-card-elevated-top: rgba(20, 32, 27, 0.8);
  --surface-card-elevated-bottom: rgba(8, 14, 12, 0.6);
  --bg-glass-header: rgba(3, 9, 7, 0.65);
  --bg-drawer: rgba(6, 12, 10, 0.96);
  --bg-backdrop: rgba(3, 9, 7, 0.85);
  --bg-input: rgba(3, 8, 6, 0.85);

  /* Brand accents */
  --accent-primary: #34d399;
  /* emerald — replaces cyan var(--accent-primary) */
  --accent-primary-hover: #6ee7b7;
  /* replaces var(--accent-primary-hover) */
  --accent-primary-deep: #059669;
  /* replaces sky var(--accent-primary-deep) (gradient end) */
  --accent-primary-deeper: #047857;
  /* replaces var(--accent-primary-deeper) (hover gradient end) */
  --accent-secondary: #fbbf24;
  /* gold — replaces purple var(--accent-secondary) */
  --accent-secondary-warm: #f59e0b;
  /* replaces var(--accent-secondary-warm) */
  --accent-secondary-deep: #d97706;
  /* replaces var(--accent-secondary-deep) */
  --accent-secondary-soft: #fcd34d;
  /* replaces var(--accent-secondary-soft) (text on gold-tinted badges) */
  --accent-mint: #6ee7b7;
  /* replaces sky var(--accent-mint) / #0ea5e9 roles */

  /* RGB channels so every alpha variant derives from one value */
  --accent-primary-rgb: 52, 211, 153;
  --accent-secondary-rgb: 251, 191, 36;
  --accent-secondary-warm-rgb: 245, 158, 11;

  /* Consolidated glow / border / tint scale (replaces the ~20 arbitrary alphas) */
  --glow-subtle: rgba(var(--accent-primary-rgb), 0.18);
  --glow: rgba(var(--accent-primary-rgb), 0.38);
  --glow-strong: rgba(var(--accent-primary-rgb), 0.6);
  --glow-max: rgba(var(--accent-primary-rgb), 0.9);
  --glow-secondary: rgba(var(--accent-secondary-warm-rgb), 0.55);
  --tint-primary: rgba(var(--accent-primary-rgb), 0.1);
  --tint-secondary: rgba(var(--accent-secondary-rgb), 0.12);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(var(--accent-primary-rgb), 0.35);
  --border-accent-hover: rgba(var(--accent-primary-rgb), 0.6);

  /* Text */
  --text-main: #ffffff;
  --text-desc: #a0aec0;
  --text-muted: #8892b0;
  --on-accent: #03140e;
  /* dark text for use ON emerald/gold fills */

  /* Semantic */
  --color-success: var(--accent-primary);
  --color-warning: var(--accent-secondary);

  /* Fonts & transitions preserved */
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Pacifico', cursive;
  --transition: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- System & Interactive Controls --- */
::selection {
  background: rgba(var(--accent-primary-rgb), 0.3);
  color: var(--text-main);
}

/* Custom Thin Scrollbar */
html {
  scrollbar-color: rgba(var(--accent-primary-rgb), 0.35) var(--bg-color);
  scrollbar-width: thin;
  accent-color: var(--accent-primary);
  caret-color: var(--accent-primary);
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-primary-rgb), 0.35);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-primary-rgb), 0.6);
}

/* Focus-visible ring */
a:focus-visible,
button:focus-visible,
.resume-btn:focus-visible,
.hero-btn:focus-visible,
.repo-btn:focus-visible,
.launch-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* --- Starfield Background Canvas --- */
#star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* --- Entrance Splash Screen --- */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out, transform 0.8s ease-in-out;
  pointer-events: none;
}

#splash h2 {
  font-family: var(--font-accent);
  font-size: 3.5rem;
  color: #fff;
  margin: 0;
  padding: 0 20px;
  animation: 2s infinite pulseWhite;
  letter-spacing: 2px;
}

.splash-fade-out {
  opacity: 0 !important;
  transform: scale(1.08);
}

@keyframes pulseWhite {

  0%,
  100% {
    text-shadow: 0 0 12px #fff, 0 0 24px var(--glow-strong);
    transform: scale(1);
  }

  50% {
    text-shadow: 0 0 25px #fff, 0 0 50px var(--accent-primary), 0 0 75px var(--accent-primary);
    transform: scale(1.03);
  }
}

/* --- Fixed Header Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 50px;
  z-index: 1000;
  background: var(--bg-glass-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.logo {
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 2px;
  cursor: pointer;
  position: relative;
  text-transform: uppercase;
  color: #fff;
}

.logo::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  bottom: 2px;
  right: -12px;
  box-shadow: 0 0 10px var(--accent-primary);
  animation: 2s infinite pulseDot;
}

@keyframes pulseDot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

nav.nav-menu {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s;
}

nav a:hover {
  color: #fff;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  transition: width 0.3s ease-in-out;
}

nav a:hover::after {
  width: 100%;
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  color: #030308 !important;
  padding: 9px 18px;
  border-radius: 25px;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.resume-btn::after {
  display: none !important;
}

.resume-btn:hover {
  /* transform: scale(1.05) translateY(-2px); */
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
  background: #f0f0f0;
}

.resume-btn-ml {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-deep));
  color: var(--on-accent) !important;
}

.resume-btn-ml:hover {
  background: linear-gradient(135deg, var(--accent-primary-hover), var(--accent-primary-deeper));
  box-shadow: 0 8px 25px var(--glow);
  color: var(--on-accent) !important;
}

.status-info {
  display: flex;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-info span {
  display: inline-flex;
  align-items: center;
}

.inline-icon {
  display: inline-block;
  margin-right: 6px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.status-info span.white-dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 10px var(--color-success);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1002;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background-color: #fff;
  border-radius: 3px;
  transition: 0.3s ease-in-out;
}

/* Mobile Nav Backdrop */
.nav-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-glass-header);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.nav-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* --- Main Structure --- */
main {
  position: relative;
  z-index: 1;
}

section {
  position: relative;
  min-height: 100vh;
  padding: 110px 8%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 45px 0;
  display: inline-block;
  position: relative;
  text-shadow: 0 0 30px var(--glow-subtle);
}

.section-title::after {
  content: '';
  display: block;
  width: 75px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), transparent);
  box-shadow: 0 0 12px var(--glow-strong), 0 0 20px var(--glow-secondary);
  margin-top: 12px;
  border-radius: 4px;
}

/* --- Hero Section --- */
.hero-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 160px;
  padding-bottom: 80px;
  gap: 50px;
  overflow: hidden;
}

.hero-text {
  flex: 1.2;
  position: relative;
  z-index: 2;
}

#mahmoud-title {
  font-size: 6.8vw;
  margin: 0;
  letter-spacing: -2px;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  transform-origin: center left;
  white-space: nowrap;
  font-weight: 900;
  position: relative;
}

#mahmoud-title span {
  display: block;
  line-height: 0.9;
}

.text-white {
  color: #ffffff;
}

.text-gray {
  color: var(--text-muted);
  transition: color 0.3s, text-shadow 0.3s;
}

.text-gray:hover {
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
  cursor: default;
}

.smaller-role {
  font-size: 3.2vw !important;
  letter-spacing: 1px;
  margin-top: 12px;
  color: var(--accent-primary) !important;
  text-shadow: 0 0 20px var(--glow);
}

.rocket-fire {
  position: absolute;
  bottom: -10%;
  left: -350px;
  width: 350px;
  height: 120%;
  background: linear-gradient(to right, transparent, rgba(255, 235, 59, 0.4), #ff9800, #ff5722, #f44336);
  border-radius: 50% 0 0 50%;
  opacity: 0;
  filter: blur(15px);
  transition: opacity 0.3s;
  box-shadow: -50px 0 80px rgba(255, 87, 34, 0.8), -100px 0 150px rgba(233, 30, 99, 0.8);
  z-index: -1;
  pointer-events: none;
}

@keyframes launchRocket {
  0% {
    transform: translateY(0) rotate(0);
  }

  15% {
    transform: translateY(350px) rotate(0);
  }

  30% {
    transform: translateY(350px) rotate(-90deg);
  }

  100% {
    transform: translateY(350px) rotate(-90deg) translateX(3000px);
  }
}

@keyframes landRocket {
  0% {
    transform: translateY(350px) rotate(-90deg) translateX(3000px);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  70% {
    transform: translateY(350px) rotate(-90deg) translateX(0);
  }

  85% {
    transform: translateY(350px) rotate(0);
  }

  100% {
    transform: translateY(0) rotate(0);
  }
}

@keyframes fireFlicker {
  0% {
    transform: scaleX(1) translateY(0);
    opacity: 0.8;
  }

  100% {
    transform: scaleX(1.3) translateY(-10px);
    opacity: 1;
  }
}

.rocket-fly {
  animation: 1.8s cubic-bezier(0.5, 0, 0.2, 1) forwards launchRocket;
}

.rocket-fly .rocket-fire {
  opacity: 1;
  animation: 0.1s infinite alternate fireFlicker;
}

.rocket-return {
  animation: 1.8s cubic-bezier(0.5, 0, 0.2, 1) forwards landRocket;
}

.hero-desc {
  margin-top: 30px;
  max-width: 540px;
  color: var(--text-desc);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-cta-btns {
  margin-top: 35px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-deep));
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 1px;
  border-radius: 30px;
  box-shadow: 0 10px 25px var(--glow);
  transition: var(--transition);
}

.hero-btn-primary .btn-svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.hero-btn-primary:hover {
  box-shadow: 0 15px 35px var(--glow-strong);
  color: var(--on-accent);
}

.hero-btn-primary:hover .btn-svg {
  /* transform: translateY(2px); */
}

.hero-btn-ml {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-secondary-warm));
  box-shadow: 0 10px 25px var(--glow-secondary);
  color: var(--on-accent);
}

.hero-btn-ml:hover {
  background: linear-gradient(135deg, var(--accent-secondary-warm), var(--accent-secondary-deep));
  box-shadow: 0 15px 35px var(--glow-secondary);
  color: var(--on-accent);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  /* transform: translateY(-3px); */
}

.hero-image-container {
  flex: 1.1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  z-index: 2;
  width: 320px;
  height: 350px;
  max-width: 100%;
}

.hero-image-container::before {
  content: '';
  position: absolute;
  width: 95%;
  height: 95%;
  background: radial-gradient(circle, var(--glow-subtle), transparent 70%);
  filter: blur(50px);
  z-index: 1;
  pointer-events: none;
  transition: all 0.5s ease;
}

.hero-image-container:hover::before {
  width: 110%;
  height: 110%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  filter: blur(65px);
}

@media (min-width: 640px) {
  .hero-image-container {
    width: 400px;
    height: 440px;
  }
}

@media (min-width: 768px) {
  .hero-image-container {
    width: 480px;
    height: 530px;
  }
}

@media (min-width: 1024px) {
  .hero-image-container {
    width: 560px;
    height: 615px;
  }
}

@media (min-width: 1280px) {
  .hero-image-container {
    width: 620px;
    height: 680px;
  }
}

/* --- Magnet Component (Hero Image) --- */
.magnet-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 320px;
  max-width: 100%;
  will-change: transform;
}

@media (min-width: 640px) {
  .magnet-container {
    width: 400px;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 0);
  }
}

@media (min-width: 768px) {
  .magnet-container {
    width: 480px;
  }
}

@media (min-width: 1024px) {
  .magnet-container {
    width: 560px;
  }
}

@media (min-width: 1280px) {
  .magnet-container {
    width: 620px;
  }
}

.magnet-inner {
  width: 100%;
  height: 100%;
  will-change: transform;
  transition: transform 0.6s ease-in-out;
}

.hero-avatar-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1199 / 1312;
  border-radius: 35px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px var(--glow);
  border: 1px solid var(--border-accent);
  background: radial-gradient(circle at top, var(--glow-subtle), var(--surface-card-bottom) 75%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}

.hero-avatar-wrapper:hover {
  transform: scale(1.04);
  box-shadow: 0 35px 85px rgba(0, 0, 0, 0.95), 0 0 75px var(--glow-strong);
  border-color: var(--border-accent-hover);
  background: radial-gradient(circle at top, var(--glow), var(--surface-card-bottom) 80%);
}

.hero-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hero-avatar-wrapper:hover img {
  transform: scale(1.02);
}

/* --- Bento Grid (About Section) --- */
#about {
  padding-top: 130px;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  grid-gap: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.bento-box {
  background: linear-gradient(145deg, var(--surface-card-top), var(--surface-card-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.bento-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 5;
  pointer-events: none;
}

.bento-box:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent-hover);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--glow-subtle);
}

.bento-box:hover::before {
  opacity: 1;
}

.bento-col-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.title-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(145deg, var(--surface-card-top), var(--surface-card-bottom));
}

.title-box h2 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.map-box {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  background-color: var(--surface-card-bottom);
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.map-box::before {
  display: none;
}

.map-box::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-primary), 0 0 30px var(--accent-primary);
  z-index: 2;
  animation: 4s ease-in-out infinite alternate radarScan;
  pointer-events: none;
  opacity: 0.85;
}

@keyframes radarScan {
  0% {
    left: 5%;
  }

  100% {
    left: 95%;
  }
}

.map-content {
  position: relative;
  z-index: 3;
  padding-top: 15px;
}

.map-content h3 {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0 0 6px;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.map-box:hover .map-content h3 {
  color: var(--accent-primary-hover);
  text-shadow: 0 0 24px var(--glow-strong);
}

.map-content p {
  color: var(--text-desc);
  margin: 4px 0;
  font-size: 0.88rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

.pyramids-hover,
.map-hover-layer {
  position: absolute;
  top: -8px;
  left: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  background: linear-gradient(to top, rgba(3, 9, 7, 0.82) 0%, rgba(3, 9, 7, 0.28) 45%, rgba(3, 9, 7, 0.48) 100%),
              url('./assets/images/egypt-map.jpg') center center / cover no-repeat;
  opacity: 0.92;
  filter: blur(3.5px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.4s ease;
  z-index: 1;
  transform: scale(1);
}

.map-box:hover .pyramids-hover,
.map-box:hover .map-hover-layer {
  opacity: 1;
  transform: scale(1.04);
  filter: blur(2px) brightness(1.12);
}

.map-box:hover::after {
  opacity: 1;
  box-shadow: 0 0 20px var(--accent-primary), 0 0 40px var(--accent-primary);
}

.text-box {
  color: var(--text-desc);
  line-height: 1.8;
  font-size: 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.text-box p {
  margin-top: 0;
  margin-bottom: 18px;
}

.text-box p:last-child {
  margin-bottom: 0;
}

.text-box strong {
  color: #fff;
}

/* Timeline / Pipeline Box */
.timeline-box {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 45px;
  overflow-x: auto;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: default;
  white-space: nowrap;
}

.timeline-step .icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.timeline-step .icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.timeline-step p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.timeline-step:hover {
  color: #fff;
  /* transform: translateY(-4px); */
}

.timeline-step:hover .icon {
  color: var(--accent-primary);
  filter: drop-shadow(0 0 10px var(--glow-strong));
}

.timeline-box .line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--glow), rgba(var(--accent-secondary-rgb), 0.6), var(--glow));
  margin: 0 16px;
  position: relative;
  top: -14px;
  box-shadow: 0 0 10px var(--border-accent);
  border-radius: 2px;
}

/* Bottom Row */
.bottom-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
}

.stats-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
  padding: 26px 18px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-width: 0;
  padding: 0 6px;
}

.stat-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-number {
  font-size: clamp(1.2rem, 1.5vw, 1.55rem);
  font-weight: 900;
  color: var(--accent-primary);
  letter-spacing: 0.5px;
  text-shadow: 0 0 18px var(--border-accent-hover), 0 0 35px var(--border-accent);
  white-space: nowrap;
  line-height: 1.2;
}

.stat-item h4 {
  margin: 0;
  font-size: 0.76rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-item p {
  margin: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Stacked 3D Perspective Cards */
.stacked-cards-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  overflow: visible;
  padding: 0;
  perspective: 1000px;
}

.stacked-card {
  position: absolute;
  background: linear-gradient(145deg, rgba(16, 28, 22, 0.98), rgba(8, 14, 12, 0.98));
  border: 1px solid var(--border-accent);
  border-radius: 18px;
  padding: 22px 18px;
  width: 195px;
  text-align: center;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
              opacity 0.4s ease, 
              border-color 0.4s ease, 
              box-shadow 0.4s ease;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85), 0 0 20px var(--tint-primary);
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stacked-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 800;
  transition: text-shadow 0.3s ease;
}

.card-left h4 {
  color: var(--accent-secondary);
}

.card-center h4 {
  color: var(--accent-primary);
}

.card-right h4 {
  color: var(--accent-mint);
}

.stacked-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.card-center {
  z-index: 3;
  transform: translateY(8px) scale(1);
  border-color: rgba(var(--accent-primary-rgb), 0.45);
}

.card-left {
  z-index: 1;
  opacity: 0.78;
  transform: translateX(-52px) translateY(-6px) scale(0.92) rotate(-6deg);
}

.card-right {
  z-index: 2;
  opacity: 0.78;
  transform: translateX(52px) translateY(-6px) scale(0.92) rotate(6deg);
}

.stacked-cards-box:hover .stacked-card {
  opacity: 0.9;
}

.stacked-cards-box:hover .card-left {
  transform: translateX(-120px) translateY(0) scale(0.96) rotate(-8deg);
}

.stacked-cards-box:hover .card-right {
  transform: translateX(120px) translateY(0) scale(0.96) rotate(8deg);
}

.stacked-cards-box:hover .card-center {
  transform: translateY(0) scale(0.96);
}

.stacked-cards-box:hover .card-left:hover {
  transform: translateX(-120px) translateY(-12px) scale(1.05) rotate(-3deg);
  opacity: 1;
  z-index: 10;
  border-color: var(--accent-secondary);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.95), 0 0 35px var(--glow-secondary);
}

.stacked-cards-box:hover .card-right:hover {
  transform: translateX(120px) translateY(-12px) scale(1.05) rotate(3deg);
  opacity: 1;
  z-index: 10;
  border-color: var(--accent-mint);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(110, 231, 183, 0.45);
}

.stacked-cards-box:hover .card-center:hover {
  transform: translateY(-12px) scale(1.05) rotate(0deg);
  opacity: 1;
  z-index: 10;
  border-color: var(--accent-primary);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.95), 0 0 35px var(--glow-strong);
}

/* --- Skills Section ("My Tech Universe") --- */
.skills-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  gap: 40px;
}

.skills-content {
  flex: 1.1;
  z-index: 2;
}

.track-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

.track-card {
  background: linear-gradient(145deg, var(--surface-card-top), var(--surface-card-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--accent-primary);
  padding: 26px 30px;
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
  pointer-events: none;
}

.track-card:nth-child(2) {
  border-left-color: var(--accent-secondary);
}

.track-card:nth-child(3) {
  border-left-color: var(--accent-mint);
}

.track-card:hover {
  transform: translateX(10px) translateY(-4px);
  border-color: var(--border-accent-hover);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--glow-subtle);
}

.track-card:hover::before {
  opacity: 1;
}

.track-info {
  flex: 1;
}

.track-info h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: 0.5px;
}

.track-info p {
  margin: 0;
  color: var(--text-desc);
  font-size: 0.92rem;
  line-height: 1.6;
}

.track-info strong {
  color: #fff;
}

.mini-3d {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.sphere-wrapper {
  flex: 1.15;
  position: relative;
  height: 560px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#canvas-container {
  width: 100%;
  max-width: 540px;
  height: 540px;
  position: relative;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

#canvas-container:active {
  cursor: grabbing;
}

/* Glowing Cyber Orbital Frame & Rings */
#canvas-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  height: 90%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px dashed rgba(52, 211, 153, 0.32);
  box-shadow: 0 0 35px rgba(52, 211, 153, 0.14), inset 0 0 30px rgba(52, 211, 153, 0.08);
  pointer-events: none;
  z-index: 0;
  animation: rotateOrbitalRing 50s linear infinite;
}

#canvas-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 102%;
  height: 102%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, 0.22);
  box-shadow: 0 0 50px rgba(52, 211, 153, 0.16);
  pointer-events: none;
  z-index: 0;
}

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

.skill-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 85px;
  transition: 0.3s;
  user-select: none;
  pointer-events: none;
}

.skill-tag img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 4px;
  filter: drop-shadow(0px 0px 8px rgba(255, 255, 255, 0.2));
  transition: 0.35s;
}

.skill-tag:hover img {
  filter: drop-shadow(0px 8px 18px var(--glow-max));
  transform: scale(1.25);
}

.skill-tag p {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 1px 1px 4px #000;
  transition: color 0.3s;
}

/* --- Services / Expertise Section ("What I Do") --- */
.expertise-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 10px;
}

.expertise-card {
  background: linear-gradient(145deg, var(--surface-card-top), var(--surface-card-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 34px 30px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.expertise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
  pointer-events: none;
}

.expertise-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent-hover);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--glow-subtle);
}

.expertise-card:hover::before {
  opacity: 1;
}

.exp-icon-wrapper {
  position: relative;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.exp-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-card-bottom);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 20px var(--glow);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.expertise-card:hover .exp-icon {
  transform: scale(1.15) rotate(6deg);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 35px var(--glow-max), 0 0 60px var(--glow-secondary);
}

.exp-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.expertise-card h3 {
  color: #fff;
  font-size: 1.4rem;
  margin: 0 0 14px;
  letter-spacing: 0.5px;
}

.expertise-card p {
  color: var(--text-desc);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

/* --- Experience & Education --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

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

.card {
  background: linear-gradient(145deg, var(--surface-card-top), var(--surface-card-bottom));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 34px 30px;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent-hover);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--glow-subtle);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 1.35rem;
  margin: 0 0 10px;
  color: #fff;
  transition: transform 0.3s;
}

.card:hover h3 {
  transform: translateX(5px);
}

.card span.date {
  width: fit-content;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 14px;
  border-radius: 20px;
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border-accent);
  display: inline-block;
  margin-bottom: 18px;
}

.card p {
  color: var(--text-desc);
  line-height: 1.7;
  margin: 0;
  font-size: 0.94rem;
}

/* --- Education & Training Section (Longitudinal Animated Timeline) --- */
.education-training-section {
  padding-top: 120px;
  padding-bottom: 120px;
  position: relative;
  overflow: hidden;
}

.vertical-timeline {
  position: relative;
  max-width: 980px;
  margin: 50px auto 0;
  padding-left: 70px;
}

/* Central glowing animated spine */
.timeline-spine {
  position: absolute;
  left: 26px;
  top: 15px;
  bottom: 25px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary-warm) 50%, var(--accent-primary) 100%);
  border-radius: 3px;
  box-shadow: 0 0 15px var(--glow);
  z-index: 0;
}

.spine-beam {
  position: absolute;
  top: 0;
  left: -2px;
  width: 7px;
  height: 120px;
  background: linear-gradient(180deg, transparent, #ffffff, var(--accent-primary), transparent);
  border-radius: 4px;
  filter: drop-shadow(0 0 12px var(--accent-primary));
  animation: spineBeamMove 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: 0;
}

@keyframes spineBeamMove {
  0% {
    top: -10%;
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  85% {
    opacity: 1;
  }

  100% {
    top: 105%;
    opacity: 0;
  }
}

/* Timeline Item (Node + Card) */
.timeline-item {
  position: relative;
  margin-bottom: 45px;
  z-index: 2;
}

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

/* Timeline Marker / Beacon */
.timeline-marker {
  position: absolute;
  left: -70px;
  top: 26px;
  width: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.marker-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  box-shadow: 0 0 20px var(--glow);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.edu-icon {
  border-color: var(--accent-mint);
  color: var(--accent-mint);
  box-shadow: 0 0 25px rgba(var(--accent-primary-rgb), 0.5);
}

.marker-pulse {
  position: absolute;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 2px solid var(--border-accent-hover);
  animation: markerRadar 2.4s infinite ease-out;
  pointer-events: none;
}

@keyframes markerRadar {
  0% {
    transform: scale(0.65);
    opacity: 1;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.timeline-item:hover .marker-icon {
  transform: scale(1.15) rotate(6deg);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 35px var(--glow-max), 0 0 60px var(--glow-secondary);
}

/* Timeline Cards */
.timeline-card {
  background: linear-gradient(145deg, var(--surface-card-top), var(--surface-card-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 34px 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.timeline-card:hover {
  transform: translateY(-6px);
  border-color: var(--glow);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--glow-subtle);
}

/* Card Glow Edge Animation */
.card-glow-edge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.timeline-card:hover .card-glow-edge {
  opacity: 1;
}

/* Featured Education Card */
.edu-card {
  background: linear-gradient(145deg, var(--surface-card-elevated-top), var(--surface-card-elevated-bottom));
  border: 1px solid var(--border-accent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px var(--glow-subtle);
}

.edu-card:hover {
  border-color: var(--glow-strong);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85), 0 0 45px var(--border-accent);
}

/* Card Badges */
.card-header-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.badge-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge-academic {
  background: var(--tint-primary);
  color: var(--accent-primary);
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 15px var(--glow-subtle);
}

.badge-grade {
  background: var(--tint-primary);
  color: var(--color-success);
  border: 1px solid var(--border-accent);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 0 15px var(--glow-subtle);
}

.badge-grade strong {
  color: var(--accent-mint);
  font-weight: 900;
  text-shadow: 0 0 10px var(--glow-strong);
}

.badge-analytics {
  background: var(--tint-primary);
  color: var(--accent-mint);
  border: 1px solid var(--border-accent);
}

.badge-depi {
  background: var(--tint-secondary);
  color: var(--color-warning);
  border: 1px solid rgba(var(--accent-secondary-rgb), 0.3);
}

.badge-ml {
  background: var(--tint-secondary);
  color: var(--accent-secondary-soft);
  border: 1px solid rgba(var(--accent-secondary-rgb), 0.3);
}

.badge-score {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-score strong {
  color: var(--accent-primary);
  font-weight: 900;
  text-shadow: 0 0 8px var(--border-accent-hover);
}

.badge-status {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Card Typography */
.edu-degree {
  font-size: 1.65rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 10px;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

.timeline-card h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 10px;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.edu-institution,
.train-org {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.edu-institution strong,
.train-org strong {
  color: var(--accent-primary);
}

.timeline-meta-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
}

.sub-icon {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.edu-desc,
.timeline-card p {
  color: var(--text-desc);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 0 20px;
}

/* Coursework Box */
.coursework-box {
  background: var(--surface-card-bottom);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 15px;
}

.coursework-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.coursework-title svg {
  color: var(--accent-mint);
}

.coursework-tags,
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cw-tag {
  background: var(--tint-primary);
  color: #e2e8f0;
  border: 1px solid var(--border-accent);
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cw-tag:hover {
  background: var(--glow-subtle);
  border-color: var(--accent-primary);
  color: var(--text-main);
  transform: translateY(-2px);
}

.t-tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-desc);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 11px;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.t-tag:hover,
.alt-gold {
  background: var(--tint-secondary);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary-soft);
  transform: translateY(-2px);
}

/* Timeline Divider */
.timeline-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 40px 0 45px;
  position: relative;
  left: -20px;
  z-index: 2;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-secondary-rgb), 0.5), transparent);
}

.divider-text {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: var(--accent-secondary-soft);
  background: var(--bg-color);
  border: 1px solid rgba(var(--accent-secondary-rgb), 0.35);
  padding: 7px 22px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(var(--accent-secondary-rgb), 0.2);
  white-space: nowrap;
}

/* Responsive adjustments for vertical timeline */
@media (max-width: 768px) {
  .vertical-timeline {
    padding-left: 52px;
    margin-top: 35px;
  }

  .timeline-spine {
    left: 17px;
  }

  .timeline-marker {
    left: -52px;
    top: 20px;
    width: 44px;
  }

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

  .marker-icon svg {
    width: 18px;
    height: 18px;
  }

  .marker-pulse {
    width: 52px;
    height: 52px;
  }

  .timeline-card {
    padding: 24px 20px;
  }

  .edu-degree {
    font-size: 1.35rem;
  }

  .timeline-card h3 {
    font-size: 1.25rem;
  }

  .timeline-divider {
    left: 0;
    gap: 10px;
  }

  .divider-text {
    font-size: 0.7rem;
    padding: 6px 14px;
    letter-spacing: 1.5px;
  }
}

/* --- Selected Work (Projects) --- */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-icon-box {
  width: 100%;
  height: 125px;
  background: radial-gradient(circle at center, var(--glow-subtle), var(--surface-card-bottom));
  border-radius: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  border: 1px solid var(--glow-subtle);
  box-shadow: 0 0 20px var(--tint-primary);
  transition: transform 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.project-icon-box svg {
  width: 44px;
  height: 44px;
  stroke: currentColor;
}

.card:hover .project-icon-box {
  transform: scale(1.03);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 25px var(--border-accent-hover);
}

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

.repo-btn {
  display: block;
  width: 100%;
  padding: 13px 0;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  letter-spacing: 1.2px;
  transition: var(--transition);
  margin-top: auto;
  cursor: pointer;
}

.repo-btn:hover {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-deep));
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px var(--border-accent-hover);
  transform: translateY(-2px);
}

.project-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-top: auto;
}

.repo-btn-dual {
  flex: 1 1 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  padding: 13px 8px;
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.platform-btn-icon {
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.repo-btn-dual:hover .platform-btn-icon {
  transform: scale(1.2);
}

/* --- Contact Section --- */
.contact-section {
  padding-top: 120px;
  padding-bottom: 120px;
}

.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: min(320px, 100%);
}

.contact-info h3 {
  font-size: 2.4rem;
  font-weight: 900;
  margin: 0 0 18px;
  background: -webkit-linear-gradient(var(--text-main), var(--text-desc));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.contact-info p {
  color: var(--text-desc);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 35px;
}

.contact-links-wide {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.wide-link-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(145deg, var(--surface-card-top), var(--surface-card-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--accent-primary);
  padding: 16px 24px;
  border-radius: 16px;
  text-decoration: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  word-break: break-all;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.wide-link-box:hover {
  background: linear-gradient(145deg, var(--surface-card-elevated-top), var(--surface-card-elevated-bottom));
  transform: translateX(10px) translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 25px var(--border-accent);
  border-color: var(--border-accent-hover);
}

.wide-link-box .label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.5px;
  min-width: 120px;
}

.wide-link-box .platform-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
  flex-shrink: 0;
  transition: transform 0.3s ease, color 0.3s ease;
}

.wide-link-box:hover .platform-icon {
  color: #fff;
  transform: scale(1.15);
}

.wide-link-box .link-text {
  font-family: monospace;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.3s;
  text-align: right;
}

.wide-link-box:hover .link-text {
  color: #fff;
}

.space-form {
  flex: 1.1;
  background: linear-gradient(145deg, var(--surface-card-top), var(--surface-card-bottom));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 38px 36px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  min-width: min(320px, 100%);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.space-form:hover {
  border-color: var(--border-accent);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--tint-primary);
}

.space-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
  opacity: 0.8;
  z-index: 3;
}

.input-group {
  margin-bottom: 22px;
}

.space-form input,
.space-form textarea {
  width: 100%;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.space-form input:focus,
.space-form textarea:focus {
  outline: 0;
  border-color: var(--accent-primary);
  box-shadow: 0 0 25px var(--border-accent);
  background: var(--bg-input);
}

.space-form textarea {
  resize: vertical;
  min-height: 120px;
}

.launch-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary-warm));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 30px var(--glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.launch-btn .btn-icon {
  transition: transform 0.3s ease;
  stroke: currentColor;
}

.launch-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 40px var(--glow-secondary), 0 0 25px var(--border-accent);
  letter-spacing: 2.5px;
}

.launch-btn:hover .btn-icon {
  /* transform: translateX(4px) translateY(-2px); */
}

.launch-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

/* Cyber Contact Form Status Feedback */
.contact-status {
  display: none;
  margin-bottom: 20px;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.3px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeInStatus 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInStatus {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-status.status-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.15);
}

.contact-status.status-success {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: var(--accent-primary);
  box-shadow: 0 0 22px var(--glow);
}

.contact-status.status-error {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fb7185;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.25);
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnSpin 0.75s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Scroll Reveal Animations --- */
.hidden-left,
.hidden-right,
.hidden-up,
.hidden-zoom {
  opacity: 0;
  transition: 0.8s cubic-bezier(0.5, 0, 0, 1);
}

/* .hidden-up { transform: translateY(50px); }
.hidden-left { transform: translateX(-50px); }
.hidden-right { transform: translateX(50px); } */
.hidden-zoom {
  transform: scale(0.85);
}

.show-element {
  opacity: 1 !important;
  transform: translate(0, 0) scale(1) !important;
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

.delay-6 {
  transition-delay: 0.6s;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 35px 20px;
  background: var(--bg-backdrop);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.88rem;
  position: relative;
  z-index: 1;
}

footer p {
  margin: 0;
  letter-spacing: 1px;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  header {
    padding: 18px 30px;
  }

  .status-info {
    display: none;
  }

  nav.nav-menu {
    gap: 20px;
  }

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

@media (max-width: 900px) {
  header {
    padding: 18px 22px;
  }

  .hamburger {
    display: flex;
  }

  .timeline-box .line {
    display: none;
  }

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

  nav.nav-menu {
    position: fixed;
    top: 0;
    right: -105%;
    width: 82%;
    max-width: 330px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(8, 16, 13, 0.98) 0%, rgba(3, 9, 7, 0.99) 100%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-left: 1px solid rgba(52, 211, 153, 0.25);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 85px 22px 30px;
    gap: 8px;
    transition: right 0.42s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    z-index: 1001;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.85);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  nav.nav-menu::before {
    content: 'PORTFOLIO NAVIGATION';
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-primary);
    padding: 0 4px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  nav.nav-menu.active {
    right: 0;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.9), -2px 0 25px var(--glow);
  }

  nav.nav-menu a:not(.resume-btn) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #cbd5e1;
    text-transform: uppercase;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  }

  nav.nav-menu a:not(.resume-btn)::after {
    display: none !important;
  }

  nav.nav-menu a:not(.resume-btn):hover,
  nav.nav-menu a:not(.resume-btn):focus-visible {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.35);
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.15);
  }

  nav.nav-menu .resume-btn {
    width: 100%;
    margin-top: 6px;
    padding: 13px 18px;
    justify-content: center;
    font-size: 0.86rem;
    letter-spacing: 1px;
    border-radius: 12px;
  }

  nav.nav-menu .resume-btn:not(.resume-btn-ml) {
    margin-top: 14px;
  }

  .hamburger.active span:first-child {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--accent-primary);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-12px);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--accent-primary);
  }

  .hero-section {
    flex-direction: column;
    text-align: center;
    padding-top: 130px;
    padding-bottom: 60px;
    min-height: auto;
    height: auto;
    gap: 0;
  }

  .hero-text {
    flex: none;
    width: 100%;
    margin-bottom: 30px;
  }

  .hero-cta-btns {
    justify-content: center;
    margin-top: 28px;
    margin-bottom: 0;
  }

  .hero-image-container {
    flex: none;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 10px auto 0;
    position: relative;
  }

  .magnet-container {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-avatar-wrapper {
    width: 100%;
    margin: 0 auto;
  }

  #mahmoud-title {
    font-size: 10vw;
  }

  .smaller-role {
    font-size: 5vw !important;
  }

  .bento-grid,
  .bottom-row {
    grid-template-columns: 1fr;
  }

  .timeline-box {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .stacked-cards-box {
    margin-top: 40px;
    min-height: 200px;
  }

  .skills-section {
    flex-direction: column;
  }

  .sphere-wrapper {
    height: 480px;
    width: 100%;
    justify-content: center;
    margin: 30px auto 0;
  }

  #canvas-container {
    height: 480px;
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 650px) {
  section {
    padding: 80px 5%;
  }

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

  .bento-box {
    padding: 22px 18px;
  }

  .timeline-box {
    padding: 22px 14px;
    gap: 16px;
  }

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

  .wide-link-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .wide-link-box .link-text {
    text-align: left;
    font-size: 0.82rem;
  }

  .space-form {
    padding: 26px 18px;
  }

  .space-form input,
  .space-form textarea {
    font-size: 16px;
  }

  .stats-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
    padding: 22px 14px;
  }

  .stat-item:not(:last-child) {
    border-right: none;
  }

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

  .stacked-cards-box {
    margin-top: 30px;
    min-height: 180px;
  }

  .stacked-card {
    width: 160px;
    padding: 16px 12px;
  }

  .card-left {
    transform: translateX(-36px) translateY(-4px) scale(0.92) rotate(-5deg);
  }

  .card-right {
    transform: translateX(36px) translateY(-4px) scale(0.92) rotate(5deg);
  }

  .card-center {
    transform: translateY(6px) scale(1);
  }

  .stacked-cards-box:hover .card-left {
    transform: translateX(-65px) translateY(0) scale(0.95) rotate(-6deg);
  }

  .stacked-cards-box:hover .card-right {
    transform: translateX(65px) translateY(0) scale(0.95) rotate(6deg);
  }

  .stacked-cards-box:hover .card-left:hover {
    transform: translateX(-65px) translateY(-8px) scale(1.02) rotate(-3deg);
  }

  .stacked-cards-box:hover .card-right:hover {
    transform: translateX(65px) translateY(-8px) scale(1.02) rotate(3deg);
  }

  .stacked-cards-box:hover .card-center:hover {
    transform: translateY(-8px) scale(1.02);
  }

  #splash h2 {
    font-size: 2.4rem;
  }

  .hero-cta-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 330px;
    margin: 28px auto 0;
    gap: 12px;
  }

  .hero-btn-primary,
  .hero-btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 13px 20px;
  }

  .hero-image-container {
    max-width: 340px;
    margin-top: 25px;
  }

  .magnet-container {
    max-width: 340px;
  }
}

@media (max-width: 480px) {
  section {
    padding: 70px 4.5%;
  }

  .section-title {
    font-size: 1.85rem;
    margin-bottom: 30px;
  }

  .title-box h2 {
    font-size: 1.8rem;
  }

  .contact-info h3 {
    font-size: 1.85rem;
  }

  .bento-box {
    padding: 18px 14px;
    border-radius: 18px;
  }

  .timeline-box {
    padding: 18px 10px;
    gap: 14px;
  }

  .expertise-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .sphere-wrapper {
    height: 380px;
    margin: 20px auto 0;
  }

  #canvas-container {
    height: 380px;
    max-width: 380px;
    margin: 0 auto;
  }

  .track-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  .mini-3d {
    align-self: center;
  }

  .stacked-card {
    width: 140px;
    padding: 14px 10px;
  }

  .card-left {
    transform: translateX(-28px) translateY(-3px) scale(0.92) rotate(-4deg);
  }

  .card-right {
    transform: translateX(28px) translateY(-3px) scale(0.92) rotate(4deg);
  }

  .stacked-cards-box:hover .card-left {
    transform: translateX(-48px) translateY(0) scale(0.95) rotate(-5deg);
  }

  .stacked-cards-box:hover .card-right {
    transform: translateX(48px) translateY(0) scale(0.95) rotate(5deg);
  }

  .stacked-cards-box:hover .card-left:hover {
    transform: translateX(-48px) translateY(-6px) scale(1.02) rotate(-3deg);
  }

  .stacked-cards-box:hover .card-right:hover {
    transform: translateX(48px) translateY(-6px) scale(1.02) rotate(3deg);
  }

  .hero-cta-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 290px;
    margin: 22px auto 0;
    gap: 10px;
  }

  .hero-btn-primary,
  .hero-btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  .hero-image-container {
    max-width: 290px;
    margin-top: 25px;
  }

  .magnet-container {
    max-width: 290px;
  }
}