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

:root {
  --bg-dark: #0A0A0F;
  --purple: #AD46FF;
  --purple-light: #C27AFF;
  --purple-pale: #DAB2FF;
  --blue: #2B7FFF;
  --blue-light: #51A2FF;
  --text-primary: #D1D5DC;
  --text-muted: #99A1AF;
  --text-placeholder: #6A7282;
  --card-bg: linear-gradient(135deg, rgba(173, 70, 255, 0.10) 0%, rgba(43, 127, 255, 0.10) 100%);
  --card-border: rgba(173, 70, 255, 0.20);
  --tag-bg: rgba(173, 70, 255, 0.10);
  --tag-border: rgba(173, 70, 255, 0.30);
  --gradient-primary: linear-gradient(90deg, #AD46FF 0%, #2B7FFF 100%);
  --gradient-text: linear-gradient(90deg, #C27AFF 0%, #51A2FF 100%);
  --font-family: 'Inter', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

ul {
  list-style: none;
}

/* ===== UTILITIES ===== */

/* Skip to content link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.section-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 16px;
}

.section-underline {
  width: 96px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 9999px;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Remove outline on mouse clicks */
:focus:not(:focus-visible) {
  outline: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
}

.navbar__logo-icon {
  width: 40px;
  height: 28px;
  object-fit: contain;
}

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

.navbar__link {
  font-size: 16px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 4px;
}

.navbar__link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--gradient-text);
  border-radius: 9999px;
  transition: left 0.3s ease, right 0.3s ease;
}

.navbar__link:hover::before {
  left: 0;
  right: 0;
}

.navbar__link:hover {
  color: var(--purple-light);
}

.navbar__link--active {
  color: var(--purple-light);
}

.navbar__link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-text);
  border-radius: 9999px;
}

/* Hamburger toggle (hidden on desktop) */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.navbar__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(2) {
  opacity: 0;
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 60px;
  overflow: hidden;
}

.hero__bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(89, 22, 139, 0.20) 0%, rgba(28, 57, 142, 0.10) 50%, transparent 100%);
  pointer-events: none;
}

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

.hero__stars .star-layer {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0);
}

.hero__stars .star-layer--sm {
  width: 1px;
  height: 1px;
  box-shadow:
    164px 527px 0px white,
    586px 384px 0px white,
    1231px 960px 0px white,
    479px 969px 0px white,
    1629px 835px 0px white,
    1722px 243px 0px white,
    347px 1776px 0px white,
    1084px 232px 0px white,
    820px 150px 0px white,
    290px 680px 0px white,
    1400px 500px 0px white,
    950px 820px 0px white;
  animation: twinkle-sm 3s ease-in-out infinite;
}

.hero__stars .star-layer--md {
  width: 2px;
  height: 2px;
  box-shadow:
    1386px 568px 0px white,
    684px 944px 0px white,
    1237px 677px 0px white,
    1420px 324px 0px white,
    1246px 376px 0px white,
    799px 493px 0px white,
    149px 75px 0px white,
    1045px 690px 0px white,
    400px 200px 0px white,
    1100px 420px 0px white;
  animation: twinkle-md 4s ease-in-out infinite;
}

.hero__stars .star-layer--lg {
  width: 3px;
  height: 3px;
  box-shadow:
    348px 387px 0px rgba(194, 122, 255, 0.9),
    988px 844px 0px rgba(81, 162, 255, 0.9),
    548px 562px 0px white,
    1950px 248px 0px rgba(194, 122, 255, 0.8),
    1682px 684px 0px white,
    1419px 770px 0px rgba(81, 162, 255, 0.9),
    1320px 223px 0px white,
    1114px 161px 0px rgba(194, 122, 255, 0.8);
  animation: twinkle-lg 5s ease-in-out infinite;
}

@keyframes twinkle-sm {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@keyframes twinkle-md {
  0%, 100% { opacity: 0.15; }
  40% { opacity: 0.9; }
  70% { opacity: 0.4; }
}

@keyframes twinkle-lg {
  0%, 100% { opacity: 0.1; }
  35% { opacity: 1; }
  65% { opacity: 0.3; }
}

/* ===== SHOOTING STARS ===== */
.shooting-star {
  position: absolute;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, white, rgba(194, 122, 255, 0.9), rgba(194, 122, 255, 0));
  border-radius: 9999px;
  opacity: 0;
  --shoot-angle: -35deg;
  filter: drop-shadow(0 0 6px rgba(194, 122, 255, 0.6));
}

.shooting-star--1 {
  top: 12%; left: 70%;
  animation: shootingStar 6s 1s ease-in infinite;
}
.shooting-star--2 {
  top: 25%; left: 40%;
  width: 80px;
  animation: shootingStar 8s 3.5s ease-in infinite;
  background: linear-gradient(90deg, white, rgba(81, 162, 255, 0.9), rgba(81, 162, 255, 0));
  filter: drop-shadow(0 0 6px rgba(81, 162, 255, 0.6));
}
.shooting-star--3 {
  top: 45%; left: 85%;
  width: 100px;
  animation: shootingStar 9s 6s ease-in infinite;
  --shoot-angle: -40deg;
}
.shooting-star--4 {
  top: 8%; left: 20%;
  width: 60px;
  animation: shootingStar 7s 4.2s ease-in infinite;
  background: linear-gradient(90deg, white, rgba(81, 162, 255, 0.8), rgba(81, 162, 255, 0));
  filter: drop-shadow(0 0 4px rgba(81, 162, 255, 0.5));
  --shoot-angle: -30deg;
}
.shooting-star--5 {
  top: 60%; left: 55%;
  width: 90px;
  animation: shootingStar 11s 8s ease-in infinite;
  --shoot-angle: -45deg;
}

@keyframes shootingStar {
  0%   { opacity: 0; transform: rotate(var(--shoot-angle, -35deg)) translateX(0); }
  2%   { opacity: 1; }
  6%   { opacity: 0; transform: rotate(var(--shoot-angle, -35deg)) translateX(-300px); }
  100% { opacity: 0; transform: rotate(var(--shoot-angle, -35deg)) translateX(-300px); }
}

/* Dynamic shooting stars (JS-spawned) */
.shooting-star--dynamic {
  position: absolute;
  height: 2px;
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
  animation: shootDynamic 1.2s ease-in forwards;
}

@keyframes shootDynamic {
  0%   { opacity: 0; transform: rotate(var(--shoot-angle, -35deg)) translateX(0); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--shoot-angle, -35deg)) translateX(-350px); }
}

/* ===== NEBULA CLOUDS ===== */
.nebula {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.nebula--1 {
  width: 400px;
  height: 400px;
  top: -5%;
  right: -8%;
  background: radial-gradient(circle, rgba(173, 70, 255, 0.08) 0%, transparent 70%);
  animation: nebulaPulse 12s ease-in-out infinite;
}

.nebula--2 {
  width: 300px;
  height: 300px;
  bottom: 10%;
  left: -5%;
  background: radial-gradient(circle, rgba(43, 127, 255, 0.06) 0%, transparent 70%);
  animation: nebulaPulse 15s 3s ease-in-out infinite;
}

.nebula--3 {
  width: 250px;
  height: 250px;
  top: 40%;
  right: 20%;
  background: radial-gradient(circle, rgba(194, 122, 255, 0.05) 0%, transparent 70%);
  animation: nebulaDrift 20s ease-in-out infinite;
}

@keyframes nebulaPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.15); }
}

@keyframes nebulaDrift {
  0%, 100% { opacity: 0.2; transform: translate(0, 0) scale(1); }
  33%      { opacity: 0.5; transform: translate(20px, -15px) scale(1.1); }
  66%      { opacity: 0.3; transform: translate(-15px, 10px) scale(1.05); }
}

/* ===== COMET ===== */
.comet {
  position: absolute;
  top: 15%;
  left: 110%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  box-shadow:
    0 0 8px 2px rgba(194, 122, 255, 0.8),
    0 0 20px 4px rgba(173, 70, 255, 0.4);
  opacity: 0;
  transform: rotate(-20deg);
  animation: cometFly 16s 5s linear infinite;
}

.comet::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, rgba(194, 122, 255, 0.7), rgba(173, 70, 255, 0.2), transparent);
  border-radius: 9999px;
}

@keyframes cometFly {
  0%   { left: 110%; top: 10%; opacity: 0; }
  5%   { opacity: 1; }
  40%  { left: -15%; top: 55%; opacity: 0.8; }
  45%  { opacity: 0; }
  100% { opacity: 0; left: -15%; top: 55%; }
}

/* ===== PULSING BRIGHT STARS ===== */
.pulse-star {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
}

.pulse-star::before,
.pulse-star::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.pulse-star::before {
  inset: -2px;
  background: radial-gradient(circle, rgba(194, 122, 255, 0.9), transparent 70%);
  animation: starPulse 4s ease-in-out infinite;
}

.pulse-star::after {
  inset: 0;
  background: white;
  box-shadow: 0 0 6px 2px rgba(194, 122, 255, 0.5);
}

.pulse-star--1 { top: 18%; left: 30%; }
.pulse-star--1::before { animation-delay: 0s; }

.pulse-star--2 { top: 55%; left: 75%; }
.pulse-star--2::before {
  animation-delay: 1.5s;
  background: radial-gradient(circle, rgba(81, 162, 255, 0.9), transparent 70%);
}
.pulse-star--2::after { box-shadow: 0 0 6px 2px rgba(81, 162, 255, 0.5); }

.pulse-star--3 { top: 35%; left: 90%; }
.pulse-star--3::before { animation-delay: 3s; }

.pulse-star--4 { top: 72%; left: 15%; }
.pulse-star--4::before {
  animation-delay: 2s;
  background: radial-gradient(circle, rgba(81, 162, 255, 0.9), transparent 70%);
}
.pulse-star--4::after { box-shadow: 0 0 6px 2px rgba(81, 162, 255, 0.5); }

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

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 768px;
  animation: heroFadeIn 1.2s ease-out forwards;
}

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

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 9999px;
  margin-bottom: 24px;
  animation: badgePulse 3s ease-in-out infinite, heroFadeIn 1s ease-out forwards;
  animation-delay: 0s, 0.2s;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(173, 70, 255, 0.3); }
  50% { box-shadow: 0 0 20px 4px rgba(173, 70, 255, 0.15); }
}

.hero__badge-icon {
  width: 16px;
  height: 16px;
  color: var(--purple-light);
}

.hero__badge-text {
  font-size: 14px;
  color: var(--purple-pale);
  line-height: 20px;
}

.hero__title {
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  opacity: 0;
  animation: heroFadeIn 1s ease-out 0.3s forwards;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-primary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: heroFadeIn 1s ease-out 0.5s forwards;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  animation: heroFadeIn 1s ease-out 0.7s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 9999px;
  font-size: 16px;
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 24px rgba(173, 70, 255, 0.30);
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: btnShimmer 3s ease-in-out infinite;
}

@keyframes btnShimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.btn--primary:hover {
  box-shadow: 0 8px 32px rgba(173, 70, 255, 0.45);
}

.btn--outline {
  background: transparent;
  color: white;
  border: 1px solid rgba(173, 70, 255, 0.50);
}

.btn--outline:hover {
  background: rgba(173, 70, 255, 0.10);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 13px;
  margin-top: 12px;
  display: inline-block;
}

.btn__icon {
  width: 20px;
  height: 20px;
}

/* ===== GLOW ORBS (decorative) ===== */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
}

.glow-orb--purple {
  width: 256px;
  height: 256px;
  background: rgba(173, 70, 255, 0.20);
  animation: floatOrb 8s ease-in-out infinite;
}

.glow-orb--blue {
  width: 384px;
  height: 384px;
  background: rgba(43, 127, 255, 0.20);
  animation: floatOrb 10s ease-in-out infinite reverse;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  25% { transform: translate(30px, -20px) scale(1.1); opacity: 0.8; }
  50% { transform: translate(-20px, 30px) scale(0.95); opacity: 1; }
  75% { transform: translate(20px, 15px) scale(1.05); opacity: 0.7; }
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: 120px 0 80px;
  position: relative;
}

.about__header {
  margin-bottom: 48px;
}

.about__header .section-underline {
  margin-top: 16px;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}

.about__image {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(173, 70, 255, 0.20);
  aspect-ratio: 552 / 340;
  object-fit: cover;
  object-position: center 40%;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about__image:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px -12px rgba(173, 70, 255, 0.35);
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about__text p {
  font-size: 18px;
  line-height: 1.625;
  color: var(--text-primary);
}

/* Skills */
.skills {
  margin-top: 32px;
}

.skills__title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(173, 70, 255, 0.15);
  border-color: rgba(173, 70, 255, 0.5);
}

.skill-card__icon {
  width: 48px;
  height: 48px;
  color: var(--purple-light);
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.skill-card:hover .skill-card__icon {
  transform: scale(1.15) rotate(-5deg);
}

.skill-card__title {
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

.skill-card__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== PROJECTS SECTION ===== */
.projects {
  padding: 80px 0 120px;
  position: relative;
}

.projects__header {
  margin-bottom: 64px;
}

.projects__header .section-underline {
  margin-top: 16px;
  margin-bottom: 20px;
}

.projects__subtitle {
  font-size: 20px;
  color: var(--text-primary);
  line-height: 1.4;
  max-width: 640px;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.projects__col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(173, 70, 255, 0.25);
  border-color: rgba(173, 70, 255, 0.45);
}

.project-card__image-wrapper {
  position: relative;
  overflow: hidden;
}

.project-card__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.project-card:hover .project-card__image-wrapper img {
  transform: scale(1.05);
}

.project-card__image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.6) 0%, transparent 50%);
  pointer-events: none;
}

.project-card--tall .project-card__image-wrapper {
  height: 400px;
}

.project-card--short .project-card__image-wrapper {
  height: 280px;
}

.project-card--medium .project-card__image-wrapper {
  height: 340px;
}

.project-card__body {
  padding: 24px;
}

.project-card__title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.project-card__desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--purple-pale);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 9999px;
  line-height: 16px;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.tag:hover {
  background: rgba(173, 70, 255, 0.20);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(173, 70, 255, 0.15);
}

/* ===== CONTACT SECTION ===== */
.contact {
  padding: 80px 0 0;
  position: relative;
}

.contact__header {
  text-align: center;
  margin-bottom: 64px;
}

.contact__header .section-title {
  margin-bottom: 16px;
}

.contact__header .section-underline {
  margin: 0 auto 24px;
}

.contact__subtitle {
  font-size: 20px;
  color: var(--text-primary);
  line-height: 1.4;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 20px;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 10px;
  color: white;
  font-size: 16px;
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(194, 122, 255, 0.15);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

.btn--submit {
  width: 100%;
  border-radius: 10px;
  font-weight: 600;
}

.btn--submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

.form-status--success {
  color: #4ADE80;
}

.form-status--error {
  color: #F87171;
}

/* Rocket launch animation */
.rocket-launch {
  display: inline-block;
  position: relative;
}

.rocket-icon {
  display: inline-block;
  font-size: 2rem;
  animation: rocketLaunch 1.2s ease-in forwards;
}

@keyframes rocketLaunch {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  30% {
    transform: translateY(4px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateY(-80px) scale(0.4);
    opacity: 0;
  }
}

.rocket-launch::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 0;
  background: linear-gradient(180deg, #FF8C42, #FF4500, transparent);
  border-radius: 0 0 4px 4px;
  filter: blur(2px);
  animation: rocketFlame 1.2s ease-in forwards;
}

@keyframes rocketFlame {
  0% {
    height: 0;
    opacity: 0;
  }
  15% {
    height: 20px;
    opacity: 1;
  }
  60% {
    height: 40px;
    opacity: 0.8;
  }
  100% {
    height: 0;
    opacity: 0;
  }
}

.rocket-msg {
  display: inline-block;
  animation: rocketMsgFade 0.5s ease-out forwards;
}

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

/* Exhaust sparkle particles */
.rocket-exhaust {
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FF8C42;
  opacity: 0;
}

.rocket-exhaust:nth-child(2) {
  animation: exhaustParticle 0.9s 0.15s ease-out forwards;
}

.rocket-exhaust:nth-child(3) {
  animation: exhaustParticle 0.9s 0.3s ease-out forwards;
  background: #C27AFF;
}

.rocket-exhaust:nth-child(4) {
  animation: exhaustParticle 0.9s 0.45s ease-out forwards;
  background: #51A2FF;
}

@keyframes exhaustParticle {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(calc(-15px + 30px * var(--spread, 0.5)), 20px) scale(1.5);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-20px + 40px * var(--spread, 0.5)), 40px) scale(0.5);
  }
}

.rocket-exhaust:nth-child(2) { --spread: 0.2; }
.rocket-exhaust:nth-child(3) { --spread: 0.8; }
.rocket-exhaust:nth-child(4) { --spread: 0.5; }

/* Sidebar Card */
.contact-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.contact-sidebar:hover {
  border-color: rgba(173, 70, 255, 0.4);
  box-shadow: 0 12px 40px rgba(173, 70, 255, 0.12);
}

.contact-sidebar__title {
  font-size: 24px;
  font-weight: 600;
  color: white;
  margin-bottom: 24px;
}

.contact-sidebar__links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 10px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
  background: rgba(173, 70, 255, 0.10);
  transform: translateX(6px);
}

.social-link__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(173, 70, 255, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.social-link:hover .social-link__icon {
  background: rgba(173, 70, 255, 0.35);
  box-shadow: 0 0 16px rgba(173, 70, 255, 0.25);
}

.social-link__icon svg {
  width: 24px;
  height: 24px;
  color: var(--purple-light);
}

.social-link__label {
  font-size: 18px;
  color: white;
  font-weight: 500;
}

.contact-sidebar__divider {
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
  margin-top: 8px;
}

.contact-sidebar__note {
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.625;
}

/* ===== FOOTER ===== */
.footer {
  margin-top: 64px;
  padding: 48px 0 24px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}

.footer__text {
  font-size: 16px;
  color: var(--text-muted);
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grid children */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.2s; }
.stagger > *:nth-child(4) { transition-delay: 0.3s; }
.stagger > *:nth-child(5) { transition-delay: 0.4s; }
.stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* Section underline grow animation */
.section-underline {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.6s ease 0.3s;
}

.visible .section-underline,
.reveal.visible .section-underline {
  transform: scaleX(1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .projects__col:nth-child(3) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .hero__title {
    font-size: 4rem;
  }

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

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

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

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

  .projects__col:nth-child(3) {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__subtitle {
    font-size: 1.1rem;
  }

  .hero__actions {
    flex-direction: column;
  }

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

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

  /* Mobile navigation */
  .navbar__toggle {
    display: flex;
  }

  .navbar__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transition: right 0.35s ease;
    border-left: 1px solid var(--card-border);
    z-index: 100;
  }

  .navbar__nav--open {
    right: 0;
  }

  .navbar__nav .navbar__link {
    font-size: 20px;
  }

  .project-card--tall .project-card__image-wrapper,
  .project-card--short .project-card__image-wrapper,
  .project-card--medium .project-card__image-wrapper {
    height: 240px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .navbar__logo span {
    display: none;
  }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .hero__content,
  .hero__title,
  .hero__subtitle,
  .hero__actions,
  .hero__badge {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ===== HIDDEN TETRIS GAME ===== */
.tetris-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.tetris-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.tetris-container {
  position: relative;
  text-align: center;
  padding: 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(173, 70, 255, 0.08) 0%, rgba(43, 127, 255, 0.08) 100%);
  border: 1px solid var(--card-border);
  box-shadow: 0 0 80px rgba(173, 70, 255, 0.15), 0 0 160px rgba(43, 127, 255, 0.08);
  animation: tetrisFadeIn 0.4s ease;
}

@keyframes tetrisFadeIn {
  from { transform: scale(0.92) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.tetris-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.3s;
  line-height: 1;
}

.tetris-close:hover {
  color: var(--purple-light);
}

.tetris-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tetris-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}

.tetris-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
}

.tetris-board-wrapper {
  border: 2px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(10, 10, 15, 0.6);
  box-shadow: inset 0 0 40px rgba(173, 70, 255, 0.06);
  line-height: 0;
}

#tetris-canvas {
  display: block;
}

.tetris-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 120px;
}

.tetris-info-card {
  background: rgba(173, 70, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tetris-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tetris-value {
  font-size: 1.5rem;
  font-weight: 700;
}

#tetris-next {
  display: block;
  margin: 4px auto 0;
  border-radius: 4px;
}

.tetris-start-btn {
  margin-top: 4px;
  width: 100%;
  text-align: center;
  justify-content: center;
}

.tetris-easter-egg-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-placeholder);
  font-style: italic;
}

/* Hint toggling: show desktop hint by default, mobile hint on touch devices */
.tetris-hint--mobile { display: none; }

/* Mobile touch control buttons */
.tetris-touch-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.tetris-touch-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.tetris-touch-btn {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(173, 70, 255, 0.10);
  color: var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tetris-touch-btn svg {
  width: 24px;
  height: 24px;
}

.tetris-touch-btn:active {
  background: rgba(173, 70, 255, 0.25);
  transform: scale(0.92);
}

/* ===== TETRIS MOBILE RESPONSIVE ===== */
@media (max-width: 600px) {
  .tetris-container {
    padding: 16px 12px;
    border-radius: 12px;
    max-height: 100dvh;
    overflow-y: auto;
  }

  .tetris-title {
    font-size: 1.4rem;
  }

  .tetris-hint--desktop { display: none; }
  .tetris-hint--mobile { display: block; }

  .tetris-layout {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .tetris-board-wrapper {
    max-width: 240px;
  }

  .tetris-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
  }

  .tetris-info-card {
    flex: 1 1 auto;
    min-width: 60px;
    padding: 6px 10px;
  }

  .tetris-info-card:has(#tetris-next) {
    display: none;
  }

  .tetris-value {
    font-size: 1.1rem;
  }

  .tetris-start-btn {
    flex: 0 0 100%;
  }

  .tetris-touch-controls {
    display: flex;
  }

  .tetris-easter-egg-note {
    margin-top: 10px;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .tetris-board-wrapper {
    max-width: 200px;
  }

  #tetris-canvas {
    width: 200px;
    height: 400px;
  }

  .tetris-touch-btn {
    width: 48px;
    height: 48px;
  }
}
