:root {
  --primary: rgba(255, 255, 255, 1); /* White body */
  --secondary: rgba(66, 135, 245, 1); /* Sky blue accents */
  --accent: rgba(255, 165, 0, 1); /* Orange beak/feet highlights */
  --headers: rgba(50, 120, 230, 1); /* Blue headers */
  --bg-dark: rgba(20, 50, 80, 1); /* Deep ocean background */
  --bg-darker: rgba(10, 30, 60, 1); /* Darker sections/cards */
  --bg-card: rgba(70, 130, 180, 0.1); /* Light blue card backgrounds */
  --bg-hover: rgba(100, 160, 210, 0.15); /* Hover effect */
  --border: rgba(255, 165, 0, 0.8); /* Orange border */
  --circle: conic-gradient(
    rgba(66, 135, 245, 0.8),
    rgba(255, 255, 255, 0.2),
    rgba(66, 135, 245, 0.8),
    rgba(255, 255, 255, 0.2)
  );
  --text-primary: rgba(255, 255, 255, 1);
  --text-secondary: rgba(200, 220, 255, 0.9);
  --text-accent: rgba(12, 31, 63, 0.9);
  --text-muted: rgba(150, 180, 200, 0.7);

  /* Gradients for Light Theme */

  --gradient-1: linear-gradient(
    135deg,
    rgba(50, 120, 230, 1) 0%,
    /* --headers blue */ rgba(66, 135, 245, 1) 50%,
    /* --secondary sky blue */ rgba(200, 220, 255, 1) 100%
  );

  --gradient-2: linear-gradient(
    135deg,
    rgba(100, 160, 255, 1) 0%,
    rgba(66, 135, 245, 1) 50%,
    rgba(50, 120, 230, 1) 100%
  );

  --gradient-3: linear-gradient(
    135deg,
    rgba(200, 220, 255, 1) 0%,
    rgba(150, 180, 255, 1) 100%
  );

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(66, 135, 245, 0.5);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Fonts */
  --font-family: system-ui;
}

/* Espeon Theme */
[data-theme="dark"] {
  /* Umbreon Theme */
  --primary: rgba(26, 26, 26, 1);
  --secondary: rgba(255, 221, 0, 1);
  --accent: rgba(255, 221, 0, 1);
  --headers: rgba(165, 86, 86, 1);
  --bg-dark: rgba(13, 13, 13, 1);
  --bg-darker: rgba(1, 1, 1, 1);
  --bg-card: rgba(31, 31, 31, 1);
  --bg-hover: rgba(42, 42, 42, 1);
  --border: rgba(255, 221, 0, 1);
  --circle: conic-gradient(
    rgba(255, 221, 0, 0.8),
    rgba(255, 221, 0, 0.2),
    rgba(255, 221, 0, 0.8),
    rgba(255, 221, 0, 0.2)
  );
  --text-primary: rgba(253, 231, 231, 1);
  --text-secondary: rgba(187, 187, 187, 1);
  --text-accent: rgb(100, 100, 100);
  --text-muted: rgba(182, 153, 153, 1);

  /* Gradients */
  --gradient-1: linear-gradient(
    135deg,
    rgba(26, 26, 26, 1) 0%,
    rgba(255, 221, 0, 1) 50%,
    rgba(255, 221, 0, 1) 100%
  );
  --gradient-2: linear-gradient(
    135deg,
    rgba(51, 51, 51, 1) 0%,
    rgba(255, 221, 0, 1) 50%,
    rgba(255, 221, 0, 1) 100%
  );
  --gradient-3: linear-gradient(
    135deg,
    rgba(34, 34, 34, 1) 0%,
    rgba(51, 51, 51, 1) 100%
  );

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(255, 221, 0, 0.3);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Fonts */
  --font-family: system-ui;
}

/* =======================
  Scroll bar styling
======================= */
/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 7px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 10px;
  border: 2px solid var(--bg-darker);
  transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
::-webkit-scrollbar-thumb:hover {
  box-shadow: var(--shadow-glow);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-sm);
}

/* =======================
   Base Reset & Global Styles
======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-card));
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 60px; /* height of nav */
}

main {
  flex-grow: 1;
  max-width: 960px;
  margin: var(--spacing-lg) auto 0;
  padding: var(--spacing-lg) var(--spacing-sm);
}

#main-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -99;
}

/* ---------------- Loader Screen ---------------- */
.loader-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-darker);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition:
    opacity 0.5s,
    visibility 0.5s;
}

.loader-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

/* Loading text */
.loader-code-text {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  white-space: nowrap;
}

/* Slide-in LOADING */
.loader-code-text span:first-child {
  display: inline-block;
  transform: translateX(-100%);
  animation: slideIn 0.8s forwards;
}

/* Bouncing dots */
.loader-dots {
  display: inline-block;
  margin-left: 0.3rem;
  opacity: 0;
  animation: fadeIn 0.8s forwards;
  animation-delay: 0.8s;
}

.loader-dots span {
  display: inline-block;
  font-weight: bold;
  font-size: 1.2rem;
  animation: bounce 1.2s infinite;
}
.loader-dots span:nth-child(1) {
  animation-delay: 0s;
}
.loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
@keyframes bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
}

/* Spinner */
.loader-spinner-wrapper {
  margin: 2rem 0;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-right-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Progress bar */
.loader-progress-wrapper {
  width: 200px;
  height: 4px;
  background: var(--headers);
  border-radius: 2px;
  margin: 2rem auto;
  overflow: hidden;
}

.loader-progress-bar {
  height: 100%;
  background: var(--secondary);
  width: 0%;
  box-shadow: 0 0 10px var(--text-primary);
  transition: width 0.15s linear; /* smooth steps */
}

/* Percentage */
.loader-percentage {
  color: var(--text-primary);
  font-size: 1rem;
  margin-top: 1rem;
}

/*=====================================*/
/*       H2 for ALL SECTIONS
/*=====================================*/
.title-h2 {
  font-size: 2.5rem;
  color: var(--headers);
  display: flex;
  align-items: center;
  gap: 1rem;

  text-shadow:
    2px 2px 0 var(--text-accent),
    var(--shadow-lg);
}

/* The line */
.title-h2::after {
  content: "";
  flex: 1; /* fills remaining space */
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--accent) 50%,
    var(--headers) 100%
  );
}
/*=====================================*/
/*       HEADER MENU
/*=====================================*/
.main-header.scrolled {
  backdrop-filter: blur(15px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--primary);
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(15px) saturate(180%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--headers);
  z-index: 1000;
  transition: all var(--transition);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-logo {
  font-family: var(--font-family);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.logo-icon {
  color: var(--headers);
}

.logo-text {
  background: var(--text-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  z-index: 999;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width var(--transition);
}

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

.nav-link.active::before {
  width: 80%;
}

.nav-link i {
  font-size: 1rem;
}

.nav-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.theme-toggle,
.menu-toggle {
  background: var(--bg-card);
  border: 1px solid var(--text-secondary);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--headers);
  color: var(--headers);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0.6rem;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

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

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.main-content {
  margin-top: 80px;
}

/* =======================
   Hero Section
======================= */
#hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100vh; /* full screen height */
  min-height: 820px;
  padding: var(--spacing-xl) var(--spacing-sm) var(--spacing-md);
  text-align: center;
  border-bottom: 2px solid var(--bg-hover);
  background-color: var(--bg-dark);
}

#hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  animation: dropIn 0.8s ease-out 0.2s;
}

/* Squares background overlay */
#hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.125) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
}

/* Hero canvas background */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Hero container (centers content) */
.hero-container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical center */
  align-items: center; /* horizontal center */
  height: 100%;
  z-index: 1;
  text-align: center;
}

/* =======================
   Hero Profile Image
======================= */
.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 280px;
  height: 280px;
}

.hero-image-container {
  position: relative;
  width: 280px;
  height: 280px;
}

.profile-image-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  inset: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--headers), transparent 70%);
  filter: blur(20px);
  animation: pulseGlow 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.profile-image-frame {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: visible;
  z-index: 1;
}

/* Glowing spinning ring */
.profile-image-frame::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  border-radius: 50%;
  background: var(--circle);
  animation: spinRing 3s linear infinite;
  filter: blur(6px);
  z-index: 1;
}

@keyframes spinRing {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.profile-image-frame .profile-image {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  animation: subtleZoomOutIn 5s ease-in-out infinite alternate;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes subtleZoomOutIn {
  0%,
  100% {
    transform: scale(0.98);
  }
  50% {
    transform: scale(1);
  }
}

.name-wrapper {
  display: inline-block;
  margin-top: 50px;
}

/* =======================
   Hero Floating Badges
======================= */
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--accent);
  box-shadow: 0 0 6px var(--accent);
  padding: 0.4rem 1.2rem;
  border-radius: 12px;
  animation: float 4s ease-in-out infinite;
  z-index: 2;
  width: max-content;
}

.badge-content {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.1;
}

.floating-badge img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 5px;
  flex-shrink: 0;
  animation: pulseGlow 3s ease-in-out infinite;
}

.badge-text {
  display: flex;
  flex-direction: column;
}

.badge-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--secondary);
  margin-bottom: 2px;
  text-align: left;
}

.badge-libs {
  font-size: 0.65rem;
  color: var(--primary);
}

/* Badge positions */
.badge-1 {
  top: 10px;
  left: -80px;
  animation-delay: 0.3s;
}
.badge-2 {
  top: 75%;
  right: -100px;
  transform: translateY(-50%);
  animation-delay: 0s;
}
.badge-3 {
  bottom: 40px;
  left: -100px;
  animation-delay: 2s;
}
.badge-4 {
  top: 10%;
  left: 75%;
  animation-delay: 0.5s;
}
.badge-5 {
  bottom: 30%;
  right: 60%;
  animation-delay: 1.5s;
}

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

/* =======================
   Hero Text
======================= */
.hero-name-typing {
  font-size: 2.75rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  animation: dropIn 0.8s ease-out 0.1s;
}

.hero-title {
  color: var(--headers);
  font-size: 1.2rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.bounce-up {
  display: inline-block;
  animation: bounceUp 1.2s ease-in-out infinite alternate;
}
.bounce-down {
  display: inline-block;
  animation: bounceDown 1.2s ease-in-out infinite alternate;
}

@keyframes bounceUp {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-6px);
  }
}
@keyframes bounceDown {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(6px);
  }
}

.cursor {
  display: inline-block;
  font-weight: bold;
  font-size: 2.75rem;
  color: var(--headers);
  animation: blink 0.8s steps(1) infinite;
}

/* =======================
   Scroll Progress Dots
======================= */
#scroll-progress {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 998;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.progress-dot.active {
  background-color: var(--secondary);
  box-shadow: 0 0 6px var(--accent);
  animation: bounceDot 0.6s infinite alternate;
}

@keyframes bounceDot {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.4);
  }
  100% {
    transform: scale(1);
  }
}

/* =======================
   Hero Social Icons
======================= */
.hero-social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 20px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  transition: all var(--transition-fast);
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.social-icon:hover {
  background: var(--bg-hover);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(192, 132, 252, 0.2);
}

/* =======================
   Scroll Indicator (bottom center)
======================= */
.scroll-indicator {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  z-index: 10;
}

.scroll-mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--accent);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-wheel {
  width: 4px;
  height: 10px;
  background: var(--headers);
  border-radius: 2px;
  animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(20px);
    opacity: 0;
  }
}

/* =======================
   Hero Bottom Line
======================= */
.hero-line,
#hero::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--headers),
    var(--text-primary),
    var(--accent)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s ease-out;
  pointer-events: none;
  z-index: 20;
}
/* =======================
   Sections & Fade Animation
======================= */
section {
  margin-bottom: var(--spacing-xl);
}

.fade-section {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

/* visible class will be added when scrolling */
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-section.hidden {
  opacity: 0;
  transform: translateY(30px);
}

/* ---------------- About Section Layout ---------------- */
.about-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap; /* allows stacking on small screens */
}

.about-window {
  overflow: hidden;
  margin: 1.2rem auto;
  max-width: auto;
  flex: 2;
  min-width: auto;
  height: auto;
  background-color: var(--bg-dark);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  box-shadow: inset 0 0 20px var(--bg-card);
}

/* Window header */
.about-window .window-header {
  position: relative; /* for the pseudo-element */
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
}

.about-window .window-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px; /* border thickness */
  background: linear-gradient(
    to right,
    var(--headers) 0%,
    var(--text-muted) 50%,
    var(--text-primary) 100%
  );
}

/* Mac buttons */
.about-window .window-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Window content */
.about-window .window-content {
  color: var(--text-primary);
  padding: 0.5rem 1rem;
}

.about-window .window-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.about-window .window-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Mini Windows Container */
.mini-windows .mini-windows {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 150px;
}

/* Mini Windows */
.mini-windows .mini-window {
  height: auto;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(50px); /* start slightly off to the right */
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* subtle bounce */
}

/* When visible, slide in */
.mini-windows .mini-window.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Center content in mini windows */
.mini-windows .mini-window .window-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  padding: 0.5rem 1rem;
}

.mini-windows .mini-window h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.mini-windows .mini-window p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

/*------------------ Experience window -------------------*/
/* Max-style Mac Window for Experience */
.experience-window {
  width: 100%;
  height: auto;
  margin: 1.2rem auto;
  overflow: hidden;
  background-color: var(--bg-dark);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  box-shadow: inset 0 0 20px var(--bg-card);
}

/* Window header */
.experience-window .window-header {
  position: relative; /* for the pseudo-element */
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
}

.experience-window .window-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px; /* border thickness */
  background: linear-gradient(
    to right,
    var(--headers) 0%,
    var(--text-muted) 50%,
    var(--text-primary) 100%
  );
}

/* Buttons */
.experience-window .window-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}
/* Window content */
.experience-window .window-content {
  padding: 0.5rem 1rem;
  color: var(--text-primary);
}

.experience-window h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.experience-window ul.terminal-list {
  list-style: none;
  padding-left: 1rem;
}

.experience-window ul.terminal-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Add ">" like terminal */
.experience-window ul.terminal-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: bold;
}

/* ----------------- Education Mac Window Styling ----------------------*/

.education-wrapper {
  display: flex;
  gap: 2rem; /* space between windows */
  flex-wrap: wrap; /* stack on smaller screens */
  justify-content: center; /* center horizontally */
  margin-top: 2rem;
}

.education-window {
  flex: 1;
  max-width: auto; /* fixed width for cards */
  overflow: hidden;
  text-align: center; /* center content */
  padding-bottom: 1rem;
  margin: 2rem;
  background-color: var(--bg-dark);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  box-shadow: inset 0 0 20px var(--bg-card);
}

/* Logo */
.education-window .edu-logo {
  display: block;
  margin: 1rem auto 0.5rem;
  width: auto; /* uniform width */
  height: 150px;
  object-fit: fill; /* scale nicely without cropping */
  border-radius: 8px; /* optional: slightly rounded corners */
  background-color: var(--text-secondary);
  padding: 0.25rem;
}

/* Window header (University name) */
.education-window .window-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0;
}

.education-window .window-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px; /* border thickness */
  background: linear-gradient(
    to right,
    var(--headers) 0%,
    var(--text-muted) 50%,
    var(--text-primary) 100%
  );
}

.education-window .window-header h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
}

/* Year */
.education-window .edu-year {
  display: inline-block;
  background: var(--headers);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.education-window ul.terminal-list {
  list-style: none;
}

.education-window ul.terminal-list li {
  position: relative;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =======================
   3D Interactive Project Cards (Mac Window Style)
======================= */
.grid {
  margin: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-window {
  padding: 12px;
  position: relative;
  border-radius: 2px;

  cursor: default;
  transform-style: preserve-3d;

  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-dark);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  box-shadow: inset 0 0 20px var(--bg-card);
}

.project-window .year {
  display: inline-block;
  background: var(--headers);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Image container */
.project-image {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Image itself */
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center center;
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
  transform-style: preserve-3d;
  position: relative;
  border-radius: 8px;
}

/* Optional: lift card slightly */
.project-window:hover img {
  transform: translateY(-20px);
  box-shadow: 0 0 12px var(--border);
}

.project-overlay h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    0 0 8px rgba(255, 221, 0, 0.5);
  transition:
    transform 0.3s ease,
    text-shadow 0.3s ease;
  border-bottom: 3px solid var(--secondary);
}

.project-window:hover .project-overlay h3 {
  transform: translateY(-8px);
  text-shadow:
    0 4px 6px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(255, 221, 0, 0.7);
}

.project-overlay p {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;

  font-weight: 500; /* slightly bolder for clarity */
  line-height: 1.4; /* more readable spacing */
  letter-spacing: 0.5px; /* subtle polish */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); /* improves readability over background */
  border-radius: 2px;
  transform: translateY(-2px);
  transition: all 0.3s ease;
  background: var(--bg-card);
  padding: 8px;
}

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

.tech-tags span {
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.tech-tags span:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.view-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--headers);
  margin-top: 5px;
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s ease;
  width: 100%;
}

.view-btn:hover {
  background: var(--secondary);
}

/* Disabled button */
.view-btn.disabled {
  background-color: #9ca3af; /* Gray */
  color: #e5e7eb; /* Light gray text */
  cursor: not-allowed;
  pointer-events: none; /* Makes it unclickable */
  opacity: 0.7; /* Slightly faded */
}

/* Individual tech colors */
.tech-tags span.angular {
  background-color: #dd3737;
}
.tech-tags span.html {
  background-color: #ff6a33;
}
.tech-tags span.css {
  background-color: #994daa;
}
.tech-tags span.js {
  background-color: #e4de2e;
  color: #fff;
}
.tech-tags span.firebase {
  background-color: orange;
}
.tech-tags span.mongodb {
  background-color: #47a248;
  color: #fff;
}
.tech-tags span.docker {
  background-color: #2496ed;
}
.tech-tags span.aws {
  background-color: #ffae18;
  color: #fff;
}
.tech-tags span.mysql {
  background-color: #00618a;
}
.tech-tags span.springboot {
  background-color: #6db33f;
}
.tech-tags span.java {
  background-color: #f89820;
}
.tech-tags span.python {
  background-color: #3776ab;
  color: #fff;
}
.tech-tags span.weatherAPI {
  background: linear-gradient(145deg, #e3e3e3, #ff4800);
  color: #fff;
}
.tech-tags span.opentdb {
  background: linear-gradient(135deg, #3498db, #f39c12, #9b59b6, #2ecc71);
  color: #fff;
}

/* =======================
   Skills
======================= */

/* Mac-style window for skills */
.skills-window {
  width: 100%;
  max-width: auto;
  height: auto;
  margin: 2rem auto;
  overflow: hidden;
  background-color: var(--bg-dark);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  box-shadow: inset 0 0 20px var(--bg-card);
}

/* Window header buttons (red, yellow, green) */
.skills-window .window-header {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

.skills-window .window-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px; /* border thickness */
  background: linear-gradient(
    to right,
    var(--headers) 0%,
    var(--text-muted) 50%,
    var(--text-primary) 100%
  );
}

/* Window content */
.skills-window .window-content {
  padding: 1.5rem;
  color: var(--text-primary);
}

#skills .skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: 3.8rem;
}

#skills h3 {
  font-size: 1.5rem;
  text-align: left;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  width: 40px;
  text-align: center;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.skill:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.skill img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
}

.sql-icon {
  filter: brightness(0) saturate(100%) invert(1);
}

/*------------------ Article window -------------------*/
.article-window {
  overflow: hidden;
  margin: 1.2rem auto;
  max-width: auto;
  flex: 2;
  min-width: auto;
  height: auto;
  background-color: var(--bg-dark);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  box-shadow: inset 0 0 20px var(--bg-card);
  padding: 1rem;
}

/* Window header */
.article-window .window-header {
  position: relative; /* for the pseudo-element */
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  margin-bottom: 10px;
}

.article-window .window-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px; /* border thickness */
  background: linear-gradient(
    to right,
    var(--headers) 0%,
    var(--text-muted) 50%,
    var(--text-primary) 100%
  );
}

/* Window content */
.article-window .window-content {
  color: var(--text-primary);
}

.article-window h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Article card styling */
.article-window p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.article-window .meta {
  font-size: 12px;
  color: #777;
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
}

.article-window a {
  color: var(--text-primary); /* use your accent color (yellow in your theme) */
  text-decoration: none; /* remove underline */
  font-weight: bold; /* make it stand out */
  transition: 0.3s ease; /* smooth transition on hover */
}

.article-window a:hover {
  text-decoration: underline; /* optional extra emphasis */
}

/* =======================
   Contact Section
======================= */
#contact {
  text-align: center;
}

#contact a.button {
  display: inline-block;
  margin: 0.5rem;
  background-color: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

#contact a.button:hover {
  background-color: var(--secondary);
}

/* =======================
   Footer
======================= */
footer {
  background-color: var(--bg-dark);
  color: var(--text-muted);
  padding: var(--spacing-lg) var(--spacing-sm);
  text-align: center;
  border-top: 1px solid var(--border);
}

footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* always full screen height */
  min-height: 820px; /* optional for very short screens */
  pointer-events: none;
  z-index: 0;

  background-image: radial-gradient(
    rgba(255, 255, 255, 0.125) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
}

footer .footer-links {
  margin-bottom: 1rem;
}

footer .footer-links a {
  color: var(--headers);
  text-decoration: none;
  margin: 0 0.75rem;
  font-weight: 600;
}

footer .footer-links a:hover {
  color: var(--text-primary);
}

footer small {
  font-size: 0.9rem;
}

/* =======================
   Animations
======================= */
@keyframes dropIn {
  0% {
    opacity: 0;
    transform: translateY(-40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

@keyframes bounceInRight {
  0% {
    opacity: 0;
    transform: translateX(100px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateX(-10px) scale(1.02);
  }
  80% {
    transform: translateX(5px) scale(0.98);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

#footer-canvas {
  position: absolute; /* or relative if you want it contained */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* so it doesn’t block clicks */
  z-index: 0;
}
footer {
  position: relative; /* so canvas is positioned inside footer */
  overflow: hidden;
}

/* =======================
   Mobile & Responsive Styles
======================= */

/* Extra small devices (phones, <=480px) */
@media (max-width: 480px) {
  #scroll-progress {
    display: none;
  }
  .nav-container {
    padding: 0.7rem 0.8rem;
  }

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

  .nav-controls {
    gap: 0.5rem;
  }
  .theme-toggle {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  .badge-stack {
    display: none;
  }

  body {
    padding-top: 5px; /* slightly smaller nav padding */
  }

  main {
    width: 100vw;
  }

  .title-h2 {
    font-size: 1rem;
  }

  .floating-badge {
    display: none;
  }

  /* Hero Section */
  .hero-image-container {
    width: 180px;
    height: 180px;
    margin-bottom: 30px;
  }

  .hero-photo {
    width: 120px;
    height: 120px;
  }

  .hero-name-typing {
    font-size: 1.8rem;
  }

  #hero {
    height: auto;
  }

  #hero p {
    font-size: 1rem;
  }

  /* Floating badges stack vertically */
  .floating-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
  }

  /* About Section */
  .about-container {
    flex-direction: column;
    gap: 1rem;
  }

  .about-window,
  .mini-windows .mini-windows {
    min-width: 100%;
  }
  /* Education Windows */
  .education-wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  .experience-window .window-header {
    padding: 15px 10px; /* less padding on sides */
    text-align: left; /* optional, keeps things readable */
  }

  .experience-window .window-header h3 {
    font-size: 0.9rem; /* smaller, fits mobile width */
    line-height: 1.2; /* tighter spacing */
    margin-bottom: 6px; /* space to small text */
  }

  .experience-window .window-header small {
    font-size: 0.8rem; /* small but readable */
    display: block; /* stacks below h3 */
    color: var(--text-secondary); /* subtle color */
    margin-bottom: 6px; /* space to small text */
  }

  .education-window {
    margin: 1rem auto;
    width: 100%;
  }

  .education-window .edu-logo {
    height: 100px;
  }

  .education-window .window-header h3 {
    font-size: 1rem;
  }

  .education-window .edu-year {
    font-size: 0.75rem;
  }

  /* Skills Window */
  #skills .skills-list {
    justify-content: center;
    gap: 2rem;
  }

  .skill img {
    width: 36px;
    height: 36px;
  }

  .skill {
    width: 32px;
    font-size: 0.7rem;
  }

  /* Project Cards */
  .grid {
    margin: 1rem;
    gap: 1rem;
  }

  .project-window {
    width: 100%;
  }

  .project-overlay h3 {
    font-size: 1.2rem;
  }

  .project-overlay p {
    font-size: 0.8rem;
  }

  /* Article Window */
  .article-window p {
    font-size: 1rem;
  }

  /* Footer */
  footer {
    padding: var(--spacing-md) var(--spacing-xs);
  }
}

/* Small devices / tablets (481px - 768px) */
@media (max-width: 768px) {
  .nav-container {
    padding: 0.8rem 1rem;
  }

  .nav-brand {
    flex: 1;
  }

  .nav-controls {
    gap: 0.5rem;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    transition: left var(--transition);
    z-index: 999;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

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

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .badge-stack {
    display: none;
  }
  main {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .title-h2 {
    font-size: 2rem;
  }

  .hero-image-container {
    margin-top: 100px;
    width: 250px;
    height: 250px;
  }

  .hero-name-typing {
    font-size: 2rem;
  }

  #hero p {
    font-size: 1.1rem;
  }

  .about-container {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .education-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .education-window .edu-logo {
    height: 120px;
  }

  #skills .skills-list {
    gap: 3rem;
  }

  .skill img {
    width: 42px;
    height: 42px;
  }

  /* Scroll indicator fixed at bottom center of hero */
  .scroll-indicator {
    position: absolute; /* make it absolute within #hero */
    bottom: -150px; /* distance from bottom of hero */
    left: 50%; /* center horizontally */
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    z-index: 10;
  }

  .scroll-mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
  }

  .scroll-wheel {
    width: 4px;
    height: 10px;
    background: var(--headers);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
  }

  @keyframes scrollWheel {
    0% {
      transform: translateY(0);
      opacity: 1;
    }
    100% {
      transform: translateY(20px);
      opacity: 0;
    }
  }
}

/* Medium devices / small laptops (769px - 1024px) */
@media (max-width: 1024px) {
  main {
    max-width: 720px;
  }

  .hero-image-container {
    width: 300px;
    height: 300px;
  }

  .hero-photo {
    width: 160px;
    height: 160px;
  }

  .hero-name-typing {
    font-size: 2.2rem;
  }

  #hero p {
    font-size: 1.15rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Large devices / desktops (1025px+) */
@media (min-width: 1025px) {
  main {
    max-width: 960px;
  }

  .hero-image-container {
    width: 350px;
    height: 350px;
  }

  .hero-photo {
    width: 180px;
    height: 180px;
  }

  .hero-name-typing {
    font-size: 2.75rem;
  }

  #hero p {
    font-size: 1.25rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}
