:root {
  --bg: #040916;
  --bg-dark: #02050f;
  --text: #e6f6ff;
  --muted: #a0b8ce;
  --accent: #00f5d4;
  --accent-dark: #00cec5;
  --card: rgba(11, 18, 36, 0.66);
  --card-border: rgba(0, 245, 212, 0.2);
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    url('https://images.unsplash.com/photo-1446774771373-2b7b2b1e9d42?auto=format&fit=crop&w=2400&q=80') center/cover fixed no-repeat,
    radial-gradient(circle at 15% 25%, rgba(0, 10, 40, 0.85), transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(0, 5, 30, 0.8), transparent 45%),
    radial-gradient(circle at 40% 70%, rgba(0, 15, 50, 0.75), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(0, 8, 35, 0.9), transparent 40%),
    radial-gradient(circle at 25% 50%, rgba(0, 12, 45, 0.7), transparent 60%),
    radial-gradient(circle at 60% 30%, rgba(0, 6, 25, 0.6), transparent 50%);
  background-blend-mode: normal;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  overflow-x: hidden;
}

.bg-layers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  contain: layout paint style;
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 2;
}
.layer {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 0, 0);
  overflow: hidden;
  will-change: transform;
}
.gradient { background: radial-gradient(circle at 40% 20%, rgba(0, 245, 212, 0.09), transparent 45%); }
.nebula {
  opacity: 0.85;
  mix-blend-mode: screen;
  filter: blur(24px) saturate(125%);
}
.nebula::before,
.nebula::after {
  content: '';
  position: absolute;
  inset: -18%;
  background-repeat: no-repeat;
}
.nebula::before {
  background-image:
    radial-gradient(45% 40% at 18% 22%, rgba(58, 134, 255, 0.58), rgba(58, 134, 255, 0)),
    radial-gradient(38% 36% at 76% 28%, rgba(112, 65, 255, 0.48), rgba(112, 65, 255, 0)),
    radial-gradient(34% 38% at 52% 72%, rgba(0, 188, 255, 0.4), rgba(0, 188, 255, 0));
  animation: nebulaDriftA 28s ease-in-out infinite alternate;
}
.nebula::after {
  background-image:
    radial-gradient(40% 34% at 30% 70%, rgba(36, 86, 220, 0.4), rgba(36, 86, 220, 0)),
    radial-gradient(42% 38% at 84% 62%, rgba(0, 165, 255, 0.36), rgba(0, 165, 255, 0));
  animation: nebulaDriftB 34s ease-in-out infinite alternate;
}

.space {
  opacity: 0.4;
  background:
    radial-gradient(circle at 20% 30%, rgba(100, 180, 255, 0.09), transparent 44%),
    radial-gradient(circle at 75% 55%, rgba(95, 70, 180, 0.1), transparent 48%);
  animation: hazeFloat 26s ease-in-out infinite alternate;
}

.stars {
  mix-blend-mode: screen;
}
.star {
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 1), rgba(196, 225, 255, 0.85) 45%, rgba(102, 160, 255, 0) 76%);
  opacity: var(--star-alpha, 0.7);
  box-shadow: 0 0 7px rgba(210, 236, 255, 0.75);
  animation:
    starTwinkleVar var(--twinkle-duration, 4.2s) ease-in-out infinite,
    starDrift var(--drift-duration, 30s) ease-in-out infinite;
  animation-delay: var(--twinkle-delay, 0s), var(--twinkle-delay, 0s);
  will-change: transform, opacity;
}
.star.bright {
  box-shadow: 0 0 12px rgba(223, 240, 255, 0.95), 0 0 22px rgba(188, 220, 255, 0.6);
}
.shooting-stars {
  overflow: hidden;
}
.shooting-star {
  position: absolute;
  width: var(--trail-width, 120px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(170, 220, 255, 0.72), rgba(125, 185, 255, 0));
  box-shadow: 0 0 12px rgba(170, 220, 255, 0.65);
  transform: rotate(var(--trail-angle, -23deg));
  animation: shootingTrail var(--trail-duration, 1.6s) ease-out forwards;
  pointer-events: none;
}
body.sky-low .shooting-star {
  box-shadow: 0 0 6px rgba(170, 220, 255, 0.45);
}

body.sky-medium .nebula {
  opacity: 0.7;
  filter: blur(18px) saturate(115%);
}
body.sky-medium .stars {
  mix-blend-mode: screen;
}
body.sky-medium .star {
  box-shadow: 0 0 4px rgba(210, 236, 255, 0.55);
}

body.sky-low .nebula {
  opacity: 0.52;
  mix-blend-mode: normal;
  filter: blur(11px) saturate(105%);
}
body.sky-low .space {
  opacity: 0.28;
}
body.sky-low .stars {
  mix-blend-mode: normal;
}
body.sky-low .star {
  box-shadow: none;
}
body.sky-low .star.bright {
  box-shadow: 0 0 5px rgba(225, 240, 255, 0.55);
}

@keyframes starTwinkleVar {
  0%, 100% { opacity: calc(var(--star-alpha, 0.7) * 0.38); }
  40% { opacity: calc(var(--star-alpha, 0.7) * 0.85); }
  50% { opacity: calc(var(--star-alpha, 0.7) * 1); }
}
@keyframes starDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(var(--drift-x, 2px), var(--drift-y, -2px), 0) scale(1.08); }
}
@keyframes hazeFloat {
  0% { opacity: 0.22; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0.42; transform: translate3d(-22px, -16px, 0) scale(1.04); }
}
@keyframes shootingTrail {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--trail-angle, -23deg)) scaleX(0.25);
  }
  18% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--trail-dx, 220px), var(--trail-dy, 180px), 0) rotate(var(--trail-angle, -23deg)) scaleX(1.05);
  }
}
@keyframes nebulaDriftA {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate3d(-26px, -20px, 0) scale(1.05); opacity: 0.9; }
  100% { transform: translate3d(-10px, 12px, 0) scale(1.02); opacity: 0.78; }
}
@keyframes nebulaDriftB {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate3d(18px, -14px, 0) scale(1.08); opacity: 0.72; }
  100% { transform: translate3d(-12px, 18px, 0) scale(1.03); opacity: 0.58; }
}

@keyframes circuitFlow {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px, 40px) scale(1.01); }
  100% { transform: translate(0,0) scale(1); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}
.topnav {
  background: rgba(3, 8, 23, 0.48);
  backdrop-filter: blur(10px);
  transition: background 0.4s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}
.topnav.active { background: rgba(1, 9, 22, 0.9); box-shadow: var(--shadow); }
.brand {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 1.4px;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  background: linear-gradient(90deg, #00f5d4, #67fdfa, #60d6ff, #7f5fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  --brand-offset: 0px;
  transform: translateY(var(--brand-offset));
  text-shadow: 0 0 13px rgba(0, 245, 212, 0.4), 0 0 26px rgba(0, 145, 180, 0.4);
  transition: transform 0.25s ease, text-shadow 0.25s ease;
}
.brand:hover,
.brand:focus-visible {
  transform: translateY(calc(var(--brand-offset) - 2px)) scale(1.01);
  text-shadow: 0 0 15px rgba(0, 245, 212, 0.8), 0 0 30px rgba(100, 255, 220, 0.8);
}
.brand::after {
  content: '';
  position: absolute;
  inset: -4px 0 0 0;
  height: 3px;
  width: 48%;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.95), transparent);
  transform: translateX(var(--brand-sweep, -110%));
  transition: transform 0.08s linear;
  opacity: 0.9;
}
.brand.scrolling::after {
  /* no animation, movement controlled in JS */
}
@keyframes brandLoader {
  0%,100% { transform: translateX(-100%); }
  50% { transform: translateX(90%); }
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.nav-list a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-list a:hover,
.nav-list a:focus-visible { background: rgba(0, 245, 212, 0.12); color: var(--accent); outline: none; }
.nav-list a[aria-current="page"] { color: var(--accent); }
.menu-toggle { display: none; background: transparent; border: 1px solid rgba(191, 255, 240, 0.35); color: #fff; padding: 0.4rem 0.6rem; border-radius: 0.35rem; cursor: pointer; }

.section { padding: 2.35rem 1.1rem; max-width: 1100px; margin: 0 auto 2rem; }
.section h2 { font-size: 2rem; color: var(--accent); margin-bottom: 1rem; text-shadow: 0 0 8px rgba(0, 245, 212, 0.4); }
.content-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; box-shadow: var(--shadow); }
.content-card { position: relative; }
.content-card > h2 { margin-top: 0.15rem; padding-right: 2.2rem; }
.section-toggle-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.8rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 212, 0.45);
  background: rgba(6, 16, 39, 0.9);
  color: #d9ffff;
  font-size: 1.1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.section-toggle-btn:hover {
  background: rgba(0, 245, 212, 0.16);
  transform: translateY(-1px);
}
.section-toggle-btn:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}
.section-collapsible-body {
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  max-height: none;
  transition: max-height 0.56s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.38s ease, transform 0.44s ease;
}
.content-card.section-collapsed .section-collapsible-body {
  pointer-events: none;
}

.hero {
  min-height: 80vh;
  display: grid;
  place-items: center;
  padding: 4rem 1.1rem;
}
.hero-content {
  background: rgba(2, 7, 17, 0.72);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 20px;
  padding: 2rem;
  max-width: 780px;
  text-align: center;
}
.hero-content h1 { font-size: clamp(2rem, 4vw, 3.3rem); margin-top: 0; color: #f0f7ff; text-shadow: 0 0 20px rgba(0, 245, 212, 0.35); }
.hero-content p { margin: 0.7rem 0; line-height: 1.6; }
.hero-actions { margin-top: 1.3rem; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; align-items: center; }
.social-links { display: inline-flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.btn { text-decoration: none; display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 600; transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.2s ease; }
.btn:focus-visible { outline: 2px dashed var(--accent); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(120deg, rgba(58, 246, 220, 0.95), rgba(98, 216, 255, 0.92));
  color: #03242f;
  border: 1px solid rgba(173, 255, 245, 0.72);
  box-shadow: 0 8px 24px rgba(0, 220, 200, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  padding: 0.85rem 1.3rem;
}
.btn-secondary { background: rgba(6, 16, 39, 0.85); color: var(--text); border: 1px solid rgba(0, 245, 212, 0.4); padding: 0.7rem 1rem; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 25px rgba(0, 245, 212, 0.25); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(0, 225, 204, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.btn[disabled] { cursor: not-allowed; opacity: 0.68; transform: none; }

.hero .small-text { font-size: 0.8rem; color: var(--muted); margin-top: 1rem; }
.skill-grid, .project-grid, .cert-grid, .timeline { display: grid; gap: 1rem; }
.skill-grid article,
.badge-card,
.project-card,
.cert-card,
.timeline-item {
  background: rgba(10, 20, 40, 0.7);
  border: 1px solid rgba(0, 245, 212, 0.19);
  border-radius: 14px;
  padding: 1rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { padding: 0.3rem 0.55rem; border-radius: 999px; font-size: 0.8rem; color: #d9ffff; background: rgba(0, 245, 212, 0.16); border: 1px solid rgba(0, 245, 212, 0.3); font-family: 'Fira Code', monospace; }
.badge-card { display: flex; flex-direction: column; gap: 0.9rem; }
.placeholder-badge { background: rgba(10, 20, 40, 0.7); color: var(--muted); border: 1px dashed rgba(0, 245, 212, 0.4); border-radius: 12px; padding: 1.5rem; text-align: center; }

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.project-card h3,
.cert-card h3 { margin-top: 0; }
.project-card ul,
.timeline-item ul { margin: 0.5rem 0 0 1rem; }
.cert-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.blog-grid { display: grid; gap: 1rem; }
.blog-item {
  background: rgba(5, 12, 28, 0.75);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 12px;
  padding: 1rem;
}
.blog-item h3 { margin-top: 0; }
.blog-item .tags { margin-bottom: 0.6rem; }

.contact-form { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: 0.65rem; }
input, textarea { width: 100%; padding: 0.75rem; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(0, 245, 212, 0.25); color: var(--text); border-radius: 10px; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); }
.input-invalid { border-color: rgba(255, 123, 123, 0.9); box-shadow: 0 0 0 2px rgba(255, 123, 123, 0.2); }
.field-error { min-height: 1rem; font-size: 0.82rem; color: #ff9ea0; margin-top: -0.25rem; }
.form-status { min-height: 1.2rem; color: var(--accent); }
.form-status.error { color: #ff9ea0; }
.form-status.success { color: #7dffdd; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(1, 5, 15, 0.78); backdrop-filter: blur(3px); z-index: 200; }
.modal[hidden] { display: none; }
.modal-content { width: min(92vw, 820px); max-height: 90vh; overflow-y: auto; background: #041620; border: 1px solid rgba(0, 245, 212, 0.3); border-radius: 14px; box-shadow: var(--shadow); padding: 1.2rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(0, 245, 212, 0.4); color: #fff; font-size: 1rem; border-radius: 999px; width: 2rem; height: 2rem; cursor: pointer; }

.site-footer { text-align: center; margin: 2rem 0 1rem; color: var(--muted); font-size: 0.86rem; }

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

/* About: soft fade and slight rise */
.animate-about { animation: fadeUpSweep 0.9s ease-out forwards; }

/* Skills: stagger tag chip animation */
.animate-skills .tag { opacity: 0; transform: translateX(-20px) scale(0.92); }
.animate-skills .tag:nth-child(1) { animation: tagSlide 0.45s ease-out 0.05s forwards; }
.animate-skills .tag:nth-child(2) { animation: tagSlide 0.45s ease-out 0.1s forwards; }
.animate-skills .tag:nth-child(3) { animation: tagSlide 0.45s ease-out 0.15s forwards; }
.animate-skills .tag:nth-child(4) { animation: tagSlide 0.45s ease-out 0.2s forwards; }
.animate-skills .tag:nth-child(5) { animation: tagSlide 0.45s ease-out 0.25s forwards; }
.animate-skills .tag:nth-child(6) { animation: tagSlide 0.45s ease-out 0.3s forwards; }
.animate-skills .tag:nth-child(7) { animation: tagSlide 0.45s ease-out 0.35s forwards; }

/* TryHackMe: badge glow pulse */
.animate-tryhackme .placeholder-badge { animation: badgePulse 1.5s ease-in-out 1 forwards; }

/* Projects: cards slide up with tilt and scale */
.animate-projects .project-card { opacity: 0; transform: translateY(25px) rotateX(10deg) scale(0.95); }
.animate-projects .project-card:nth-child(1) { animation: cardLift 0.7s ease-out 0.1s forwards; }
.animate-projects .project-card:nth-child(2) { animation: cardLift 0.7s ease-out 0.2s forwards; }
.animate-projects .project-card:nth-child(3) { animation: cardLift 0.7s ease-out 0.3s forwards; }

/* Certificates: flip reveal */
.animate-certificates .cert-card { transform: perspective(500px) rotateY(-85deg); opacity: 0; }
.animate-certificates .cert-card:nth-child(1) { animation: cardFlip 0.7s ease-out 0.08s forwards; }
.animate-certificates .cert-card:nth-child(2) { animation: cardFlip 0.7s ease-out 0.18s forwards; }
.animate-certificates .cert-card:nth-child(3) { animation: cardFlip 0.7s ease-out 0.28s forwards; }

/* Blog: alternate sides fading */
.animate-blog .blog-item { opacity: 0; transform: translateX(-30px); }
.animate-blog .blog-item:nth-child(odd) { animation: blogFlowLeft 0.65s ease-out forwards; }
.animate-blog .blog-item:nth-child(even) { transform: translateX(30px); animation: blogFlowRight 0.65s ease-out forwards; }

/* Experience timeline: slide from line */
.animate-experience .timeline-item { opacity: 0; transform: translateX(-40px); }
.animate-experience .timeline-item:nth-child(even) { transform: translateX(40px); }
.animate-experience .timeline-item { animation: timelineSlide 0.8s ease-out forwards; }

/* Contact: subtle zoom in */
.animate-contact .contact-form { opacity: 0; transform: scale(0.88); }
.animate-contact .contact-form { animation: contactZoom 0.75s ease-out forwards; }

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

@keyframes tagSlide {
  0% { opacity: 0; transform: translateX(-22px) scale(0.92); }
  60% { opacity: 1; transform: translateX(8px) scale(1.08); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 245, 212, 0.1); opacity: 0.95; }
  50% { box-shadow: 0 0 24px 10px rgba(0, 245, 212, 0.5); opacity: 1; }
}

@keyframes cardLift {
  0% { opacity: 0; transform: translateY(30px) rotateX(12deg) scale(0.95); filter: blur(1px); }
  100% { opacity: 1; transform: translateY(0) rotateX(0deg) scale(1); filter: blur(0); }
}

@keyframes cardFlip {
  0% { opacity: 0; transform: perspective(500px) rotateY(-85deg); }
  50% { opacity: 0.6; }
  100% { opacity: 1; transform: perspective(500px) rotateY(0deg); }
}

@keyframes blogFlowLeft {
  0% { opacity: 0; transform: translateX(-40px); }
  100% { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes contactZoom {
  0% { opacity: 0; transform: scale(0.88); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  0% { opacity: 0; transform: translateX(-50px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes scaleFadeIn {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  0% { opacity: 0; transform: translateX(50px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
  0% { opacity: 0; transform: rotate(-10deg) scale(0.9); }
  100% { opacity: 1; transform: rotate(0deg) scale(1); }
}

@keyframes zoomIn {
  0% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

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

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

@media (max-width: 900px) {
  body {
    background-attachment: scroll, scroll, scroll, scroll, scroll, scroll, scroll;
  }
  .topnav { flex-wrap: wrap; }
  .nav-list { flex-direction: column; width: 100%; display: none; }
  .nav-list.open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .section { padding: 1.75rem 0.8rem; }
  .hero { min-height: 72vh; padding: 2.4rem 0.8rem; }
  .hero-content { padding: 1.4rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn,
  .social-links .btn { width: 100%; }
  .social-links { width: 100%; }
}

@media (max-width: 540px) {
  .hero-content h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .section h2 { font-size: 1.55rem; }
  .content-card { border-radius: 12px; }
  .btn-primary, .btn-secondary { padding: 0.75rem 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .layer,
  .space,
  .nebula::before,
  .nebula::after,
  .star,
  .shooting-star,
  .brand {
    animation: none !important;
    transition: none !important;
  }
  .shooting-stars {
    display: none;
  }
}
