/* ===== CSS VARIABLES & THEME ===== */
:root {
  /* Green palette */
  --green-50: #f0fdf4;
  --green-100: #d8f3dc;
  --green-200: #b7e4c7;
  --green-300: #95d5b2;
  --green-400: #74c69d;
  --green-500: #52b788;
  --green-600: #40916c;
  --green-700: #2d6a4f;
  --green-800: lch(25.19% 19.89 162.1);
  --green-850: lch(16.82% 14.96 164.4);
  --green-900: lch(8.45% 10.03 166.6);

  /* Semantic tokens - Light mode */
  --bg: var(--green-50);
  --bg-secondary: var(--green-100);
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-elevated: #ffffff;

  /* Text */
  --text: #071a13;
  --text-secondary: #0f3d2e;
  --text-muted: #3b5d55;
  --text-faint: #6b8a82;

  /* Brand / accents */
  --accent: #2d6a4f;
  --accent-hover: #1b4332;
  --accent-light: rgba(45, 106, 79, 0.12);

  /* UI */
  --border: rgba(8, 28, 21, 0.12);
  --border-light: rgba(8, 28, 21, 0.08);
  --shadow: 0 1px 3px rgba(8, 28, 21, 0.06), 0 1px 2px rgba(8, 28, 21, 0.04);
  --shadow-md: 0 6px 20px rgba(8, 28, 21, 0.10);
  --shadow-lg: 0 18px 60px rgba(8, 28, 21, 0.14);

  --gradient: linear-gradient(135deg, #2d6a4f, #40916c);
  --gradient-text: linear-gradient(135deg, #1b4332, #52b788);
  --glow: rgba(45, 106, 79, 0.18);

  /* Aliases */
  --bg-main: var(--bg);
  --text-main: var(--text);

  /* Sizing */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --nav-height: 72px;

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

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===== DARK MODE ===== */
html[data-theme="dark"] {
  --bg: var(--green-900);
  --bg-secondary: var(--green-850);
  --bg-card: rgba(27, 67, 50, 0.55);
  --bg-elevated: rgba(27, 67, 50, 0.85);

  --text: #e7f7ef;
  --text-secondary: #c8ead9;
  --text-muted: #9cc8b4;
  --text-faint: #79a996;

  --accent: #52b788;
  --accent-hover: #74c69d;
  --accent-light: rgba(82, 183, 136, 0.14);

  --border: rgba(216, 243, 220, 0.14);
  --border-light: rgba(216, 243, 220, 0.10);

  --shadow: 0 1px 3px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.45);

  --gradient: linear-gradient(135deg, #40916c, #52b788);
  --gradient-text: linear-gradient(135deg, #52b788, #e7f7ef);
  --glow: rgba(82, 183, 136, 0.22);

  --bg-main: var(--bg);
  --text-main: var(--text);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  overflow-x: hidden;
  width: 100%;
}

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

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

a:hover {
  color: var(--accent-hover);
}

button {
  cursor: pointer;
  font-family: var(--font-sans);
  border: none;
  background: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

p {
  color: var(--text-muted);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.hidden {
  display: none;
}

/* ===== CURSOR GLOW ===== */
.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
  display: block;
  background: radial-gradient(
    circle,
    rgba(82, 183, 136, 0.28) 0%,
    rgba(82, 183, 136, 0.14) 35%,
    rgba(82, 183, 136, 0.06) 55%,
    transparent 72%
  );
  transform: translate(-50%, -50%);
  filter: blur(2px);
  mix-blend-mode: screen;
}

@media (hover: hover) {
  .cursor-glow {
    display: block;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.marquee-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  margin: 0 0.5rem;
  vertical-align: middle;
}



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

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

@keyframes scroll-infinite {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* ===== REVEAL ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s var(--ease) forwards;
}

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

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

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

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

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

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background-color 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.btn-primary {
  background: var(--gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.4);
  color: #ffffff;
}

.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  color: var(--accent);
}



/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition:
    background-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

html[data-theme="dark"] .navbar {
  background: rgba(10, 31, 19, 0.85);
}

.navbar.scrolled {
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition:
    color 0.3s var(--ease),
    background-color 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: var(--accent-light);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text);
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}

.theme-toggle:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* Light mode: show moon icon */
html[data-theme="light"] .icon-sun {
  display: none;
}

html[data-theme="light"] .icon-moon {
  display: block;
}

/* Dark mode: show sun icon */
html[data-theme="dark"] .icon-moon {
  display: none;
}

html[data-theme="dark"] .icon-sun {
  display: block;
}

.hamburger {
  display: none;
  margin-left: auto;
  position: relative;
  z-index: 2000;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--accent);
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition:
    transform 0.25s ease-in-out,
    opacity 0.25s ease-in-out,
    background-color 0.25s ease-in-out;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 9px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

.hamburger:hover {
  background: var(--accent-light);
}

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

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

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

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
  .nav-container {
    justify-content: flex-end;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    right: -100%;
    top: 0;
    width: 70%;
    height: 100vh;
    z-index: 1500;
    transition: right 0.4s var(--ease);
    display: flex;
    flex-direction: column;
    padding-top: 100px;
    gap: 2rem;
    align-items: center;
    background: var(--green-700);
    border-left: 1px solid var(--green-700);
    box-shadow: -15px 0 40px rgba(8, 28, 21, 0.15);
  }

  .nav-menu .nav-link {
    color: #ffffff;
    font-size: 1.1rem;
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
  }

  .hamburger.active span {
    background: #ffffff;
  }

  html[data-theme="dark"] .nav-menu {
    background: #0f2818;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
    border-left: 1px solid var(--border);
  }

  html[data-theme="dark"] .nav-menu .nav-link {
    color: var(--text-muted);
  }

  html[data-theme="dark"] .nav-menu .nav-link:hover,
  html[data-theme="dark"] .nav-menu .nav-link.active {
    color: var(--accent);
    background: var(--accent-light);
  }

  html[data-theme="dark"] .hamburger.active span {
    background: var(--accent);
  }

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

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 2rem;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.2;
  animation: float 6s ease-in-out infinite;
}

.hero-content {
  text-align: center;
  max-width: 740px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.typewriter-wrapper {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 1rem;
  min-height: 2rem;
  font-weight: 500;
}

.typewriter-prefix {
  color: var(--text-muted);
}

.typewriter-text {
  color: var(--accent);
}

.typewriter-cursor {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
  font-weight: 300;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 0.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== SECTIONS COMMON ===== */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.8rem;
  background: var(--accent-light);
  border-radius: 999px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== ABOUT SECTION ===== */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.about-image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.profile-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform 0.6s var(--ease);
}

.about-image-frame:hover .profile-image {
  transform: scale(1.03);
}

.image-decoration {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  transform: translate(12px, 12px);
  z-index: -1;
  opacity: 0.3;
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--gradient);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}

.exp-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.exp-text {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-intro {
  font-size: 1.15rem !important;
  color: var(--text-secondary) !important;
  font-weight: 500;
}

.about-quote {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent);
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
}

.highlight-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-image-wrapper {
    max-width: 320px;
    margin: 0 auto;
  }

  .experience-badge {
    bottom: -15px;
    right: -10px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }
}

/* ===== MARQUEE ===== */
.marquee-section {
  padding: 1.5rem 0;
  background: transparent;
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  overflow: hidden;
  width: 100%;
  position: relative;
  mask-image: none;
  -webkit-mask-image: none;
}

.marquee-track::before,
.marquee-track::after {
  content: "";
  position: absolute;
  top: 0;
  width: 150px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.marquee-track::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-main), transparent);
}

.marquee-track::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-main), transparent);
}

.marquee-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 2rem;
  animation: scroll-infinite 25s linear infinite;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ===== CONTACT CARDS GRID ===== */
.contact-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.contact-rect-card {
  display: flex;
  justify-content: space-between;
  background: var(--bg-elevated);
  align-items: center;
  border: 1px solid var(--border-light);
  padding: 1.5rem 2rem;
  border-radius: 16px;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
  color: var(--text);
}

.contact-rect-card:hover {
  border-color: var(--accent);
  transform: translateX(10px);
}

.contact-rect-card.highlight {
  background: var(--accent);
  color: #071a13;
  border: none;
}

.card-arrow {
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.contact-rect-card:hover .card-arrow {
  transform: translateX(4px);
}

.contact-rect-card.highlight .card-arrow {
  color: #071a13;
}

/* ===== SKILLS SECTION ===== */
.skills {
  background: var(--bg-secondary);
  padding-top: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.skill-card:hover::before {
  transform: scaleX(1);
}

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

.skill-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.skill-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.skill-pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border-radius: 999px;
  border: 1px solid var(--border-light);
}

.skill-bar-wrapper {
  height: 4px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  background: var(--gradient);
  border-radius: 999px;
  width: 0;
  transition: width 1.2s var(--ease);
}

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

/* ===== CONTACT SECTION ===== */
.contact {
  background: var(--bg);
}

.contact-form-wrapper {
  max-width: 100%;
  margin: 2.5rem auto 3.5rem;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2.25rem;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-form .form-row {
  display: flex;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-sans);
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-faint);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.contact-form button {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--gradient);
  color: var(--bg);
  font-weight: 700;
  font-family: var(--font-sans);
  box-shadow: var(--shadow);
  transition:
    transform 0.25s var(--ease-spring),
    box-shadow 0.25s var(--ease),
    opacity 0.25s var(--ease);
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.96;
}

.contact-form button:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .contact-form {
    padding: 1.5rem;
  }

  .contact-form .form-row {
    flex-direction: column;
    gap: 0.85rem;
  }
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease),
    background-color 0.3s var(--ease);
}

.contact-info-card:hover {
  border-color: var(--green-600);
  box-shadow: var(--shadow);
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.contact-info-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.contact-info-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 360px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  animation: slideInRight 0.4s var(--ease-spring);
}
.toast-success {
  background: var(--green-700);
  color: #fff;
  border-color: transparent;
}

.toast-error {
  background: #c0392b;
  color: #fff;
  border-color: transparent;
}

.toast.removing {
  animation: slideInRight 0.3s var(--ease) reverse forwards;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 3rem 0 0;
}


.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin: 0;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.3s var(--ease),
    visibility 0.3s var(--ease),
    transform 0.3s var(--ease),
    background-color 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ===== SELECTION ===== */
::selection {
  background: var(--accent);
  color: #ffffff;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

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

/* ===== TYPING GAME ===== */
.typing-game-container {
  margin-top: 6rem;
  padding-bottom: 4rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.game-main-title {
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.game-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.game-stats {
  display: flex;
  gap: 2rem;
}

.stat-box {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.game-body {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.code-display {
  background: rgba(8, 28, 21, 0.08);
  padding: 1.5rem;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

html[data-theme="dark"] .code-display {
  background: rgba(0, 0, 0, 0.28);
}

.code-display .correct {
  color: var(--accent);
}

.code-display .incorrect {
  color: #ff5555;
  background: rgba(255, 85, 85, 0.1);
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
}

.progress-container {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 2rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

.game-overlay {
  text-align: center;
}

.result-container {
  text-align: center;
  padding: 2rem 0;
}

.time-up-text {
  font-size: 2.5rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.main-stat {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
}

.sub-stats {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-muted);
}

.sub-stats span {
  color: var(--text);
  font-weight: 600;
}

#codeDisplay {
  display: inline-block;
  transition: transform 0.3s var(--ease-spring);
}
#playAgainBtn {
  margin-top: 2rem;
}

/* ===== AI ASSISTANT ===== */
.ai-assistant {
  position: fixed;
  bottom: 2rem;
  right: 6rem;
  z-index: 1100;
}

.ai-toggle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(45, 106, 79, 0.4);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease);
  cursor: pointer;
}

.ai-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(45, 106, 79, 0.5);
}

.ai-toggle-btn .ai-icon-close {
  display: none;
}

.ai-toggle-btn.active .ai-icon-chat {
  display: none;
}

.ai-toggle-btn.active .ai-icon-close {
  display: block;
}

/* Chat Panel */
.ai-chat-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease-spring), visibility 0.3s;
  overflow: hidden;
}

.ai-chat-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.ai-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===== GITHUB REPOSITORIES SECTION ===== */
.github-repos {
  background: var(--bg);
}

/* Loading state */
.repos-loading {
  text-align: center;
  padding: 3rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin: 0 auto;
  max-width: 400px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.repos-loading p {
  color: var(--text-muted);
  font-weight: 500;
}

/* Error state */
.repos-error {
  text-align: center;
  padding: 2.5rem;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius-lg);
  margin: 0 auto;
  max-width: 450px;
}

.repos-error svg {
  color: #dc2626;
  margin: 0 auto 1rem;
}

.repos-error p {
  color: #dc2626;
  font-weight: 500;
}

.repos-error.hidden,
.repos-loading.hidden {
  display: none;
}

/* Repositories grid */
.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.repo-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.repo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

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

.repo-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  word-break: break-word;
  flex: 1;
}

.repo-name a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.repo-name a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.repo-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.75rem 0 1rem;
  flex-grow: 1;
  min-height: 45px;
}

.repo-description.empty {
  font-style: italic;
  color: var(--text-faint);
  min-height: 0;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.repo-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.repo-meta-item svg {
  color: var(--accent);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.repo-language {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.8rem;
}

.repo-language::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.repo-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.repo-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition:
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease),
    color 0.3s var(--ease);
  text-decoration: none;
}

.repo-link-btn.primary {
  background: var(--gradient);
  color: #ffffff;
  border: none;
}

.repo-link-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

.repo-link-btn.secondary {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.repo-link-btn.secondary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

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

  .repo-card {
    padding: 1.5rem;
  }

  .repo-meta {
    flex-direction: column;
    gap: 0.75rem;
  }
}

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.ai-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ai-status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.ai-header-actions {
  display: flex;
  gap: 0.5rem;
}


.ai-stop-btn {
  background: #dc2626;
  color: #ffffff;
}

.ai-stop-btn:hover {
  background: #b91c1c;
  transform: scale(1.05);
}

/* Chat Messages */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
}

.ai-message {
  max-width: 88%;
  animation: fadeUp 0.3s var(--ease);
}

.ai-message-user {
  align-self: flex-end;
}

.ai-message-bot {
  align-self: flex-start;
}

.ai-message-content {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.6;
}

.ai-message-user .ai-message-content {
  background: var(--gradient);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ai-message-bot .ai-message-content {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}

.ai-message-content p {
  margin: 0;
  color: inherit;
}

.ai-message-content p + p {
  margin-top: 0.5rem;
}

.ai-message-content .ai-hint {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* Streaming indicator */
.ai-message-streaming .ai-message-content::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  animation: blink-cursor 0.8s infinite;
}

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

/* Suggestions */
.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.ai-faq-header {
  padding: 0.5rem 0;
  text-align: center;
}

.ai-faq-header h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-suggestion-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.ai-suggestion-btn:hover {
  background: transparent;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Typing Indicator */
.ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: 4px;
  max-width: 70px;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* Chat Input */
.ai-chat-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
}

.ai-chat-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.ai-chat-input input::placeholder {
  color: var(--text-faint);
}

.ai-chat-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.ai-send-btn {
  background: var(--gradient);
  color: #ffffff;
}

.ai-send-btn:hover {
  transform: scale(1.05);
}

.ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .ai-assistant {
    right: 1rem;
    bottom: 1rem;
  }

  .ai-chat-panel {
    width: calc(100vw - 2rem);
    right: -0.5rem;
    max-height: 70vh;
  }

  .ai-toggle-btn {
    width: 50px;
    height: 50px;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  section {
    padding: 4rem 0;
  }

  .hero-stats {
    gap: 1.25rem;
  }

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