:root {
  --bg-main: #030711;
  --bg-alt: #071526;
  --panel: rgba(7, 16, 31, 0.74);
  --panel-strong: rgba(4, 11, 22, 0.9);
  --text: #eef7ff;
  --muted: #a7bfd6;
  --accent: #69f4ff;
  --accent-strong: #9effd1;
  --accent-warm: #ffc278;
  --line: rgba(168, 213, 255, 0.18);
  --shadow: 0 30px 80px rgba(2, 7, 17, 0.6);
  --radius-lg: 30px;
  --radius-md: 20px;
  --header-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(105, 244, 255, 0.17), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255, 194, 120, 0.12), transparent 24%),
    radial-gradient(circle at 78% 72%, rgba(86, 127, 255, 0.14), transparent 24%),
    linear-gradient(160deg, #02050c 0%, var(--bg-main) 42%, var(--bg-alt) 100%);
}

a {
  color: inherit;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-stars {
  z-index: -4;
  background-image:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.85) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.6px),
    radial-gradient(circle at 32% 64%, rgba(255, 255, 255, 0.65) 0 1px, transparent 1.7px),
    radial-gradient(circle at 84% 58%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.8px),
    radial-gradient(circle at 12% 82%, rgba(255, 255, 255, 0.65) 0 1px, transparent 1.8px),
    radial-gradient(circle at 52% 44%, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.8px);
  background-size: 340px 340px, 410px 410px, 290px 290px, 460px 460px, 380px 380px, 320px 320px;
  opacity: 0.58;
}

.bg-grid {
  z-index: -3;
  background-image:
    linear-gradient(rgba(133, 180, 230, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 180, 230, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 36%, transparent 100%);
}

.bg-glow {
  z-index: -2;
  background:
    radial-gradient(circle at 24% 22%, rgba(105, 244, 255, 0.2), transparent 34%),
    radial-gradient(circle at 82% 74%, rgba(126, 157, 255, 0.16), transparent 30%);
  filter: blur(18px);
}

.bg-twinkle {
  z-index: -1;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(138, 219, 255, 0.75) 0 1px, transparent 1.7px);
  background-position: 0 0, 120px 160px;
  background-size: 180px 180px, 220px 220px;
  opacity: 0.24;
  animation: twinkle 12s linear infinite;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  width: min(1200px, 94vw);
  min-height: var(--header-h);
  margin: 10px auto 0;
  padding: 10px 12px 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 13, 26, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(1, 6, 16, 0.34);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 10%, #7db9ff 100%);
  color: #032232;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-text {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 20, 37, 0.95);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #dcf4ff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

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

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  text-decoration: none;
  color: #d5e8fb;
  font-size: 0.92rem;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #04212e;
  background: linear-gradient(135deg, var(--accent), #9cf8ff);
  transform: translateY(-1px);
}

.socials {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.socials a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  text-decoration: none;
  color: #d9efff;
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.socials a:hover {
  color: var(--accent);
  border-color: rgba(105, 244, 255, 0.55);
  transform: translateY(-2px);
}

main {
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding-bottom: 64px;
}

.section {
  padding-top: 104px;
  scroll-margin-top: calc(var(--header-h) + 22px);
}

.hero {
  min-height: calc(100vh - 46px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 52px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1.04;
}

.hero-description {
  margin: 20px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn-solid {
  color: #042231;
  background: linear-gradient(135deg, var(--accent) 10%, #98fbff 100%);
}

.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(105, 244, 255, 0.28);
}

.btn-outline {
  color: #dbf1ff;
  background: rgba(9, 19, 35, 0.84);
  border: 1px solid rgba(162, 211, 255, 0.38);
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: rgba(105, 244, 255, 0.55);
  box-shadow: 0 16px 34px rgba(33, 70, 122, 0.28);
}

.resume-note {
  margin: 14px 0 0;
  color: #b8d0e6;
  font-size: 0.94rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(8, 17, 32, 0.62);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.hero-link:hover {
  color: var(--accent);
  border-color: rgba(105, 244, 255, 0.5);
  transform: translateY(-3px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.glass-mini {
  border: 1px solid var(--line);
  background: rgba(8, 18, 34, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px 16px;
  border-radius: 18px;
}

.metric strong {
  display: block;
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.06rem;
  color: var(--accent-strong);
}

.metric span {
  display: block;
  margin-top: 4px;
  color: #bfd7ec;
  font-size: 0.9rem;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.cosmos-frame {
  --mx: 50%;
  --my: 50%;
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 1 / 1.02;
  border-radius: 38px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(8, 20, 38, 0.92), rgba(6, 15, 29, 0.72));
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow);
}

.cosmos-frame::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(166, 209, 251, 0.12);
  border-radius: 28px;
  pointer-events: none;
}

.planet,
.frame-ring,
.spark,
.floating-tag,
.scene-wrap,
.profile-shell {
  position: absolute;
}

.frame-ring {
  border: 1px solid rgba(156, 201, 243, 0.18);
  border-radius: 50%;
}

.ring-one {
  width: 72%;
  height: 72%;
  top: 12%;
  left: 14%;
  animation: drift 18s linear infinite;
}

.ring-two {
  width: 86%;
  height: 58%;
  top: 21%;
  left: 7%;
  transform: rotate(-18deg);
  animation: drift 24s linear infinite reverse;
}

.planet {
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.08);
}

.planet-a {
  top: 58px;
  right: 62px;
  width: 122px;
  height: 122px;
  background: radial-gradient(circle at 32% 30%, #ffe9bd 0%, #f6bb64 28%, #cd6f2e 62%, #61260f 100%);
  animation: planetFloat 11s ease-in-out infinite;
}

.planet-a::after {
  content: "";
  position: absolute;
  inset: 44% -18%;
  border: 4px solid rgba(255, 232, 182, 0.46);
  border-radius: 50%;
  transform: rotate(-20deg);
}

.planet-b {
  bottom: 78px;
  left: 44px;
  width: 92px;
  height: 92px;
  background: radial-gradient(circle at 30% 30%, #c4f4ff 0%, #79beff 40%, #2b5fd2 72%, #13236f 100%);
  animation: planetFloat 14s ease-in-out infinite reverse;
}

.planet-c {
  top: 108px;
  left: 72px;
  width: 46px;
  height: 46px;
  background: radial-gradient(circle at 30% 30%, #f2ffcb 0%, #baff94 45%, #4aa85d 75%, #1e5634 100%);
  animation: planetFloat 9s ease-in-out infinite;
}

.spark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(231, 247, 255, 0.9);
  box-shadow: 0 0 18px rgba(194, 239, 255, 0.45);
  animation: twinkleDot 4s ease-in-out infinite;
}

.spark-a {
  top: 82px;
  left: 206px;
}

.spark-b {
  top: 134px;
  right: 170px;
  animation-delay: 0.8s;
}

.spark-c {
  top: 208px;
  left: 84px;
  animation-delay: 1.5s;
}

.spark-d {
  right: 92px;
  bottom: 200px;
  animation-delay: 2.1s;
}

.spark-e {
  left: 180px;
  bottom: 96px;
  animation-delay: 2.8s;
}

.spark-f {
  right: 170px;
  bottom: 82px;
  animation-delay: 3.4s;
}

.scene-wrap {
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(173, 214, 250, 0.18);
}

.orbit-a {
  width: 70%;
  height: 70%;
  transform: rotateX(72deg) rotateY(8deg);
  animation: orbitSpinA 11s linear infinite;
}

.orbit-b {
  width: 56%;
  height: 56%;
  transform: rotateX(20deg) rotateY(68deg);
  animation: orbitSpinB 8s linear infinite reverse;
}

.cube-scene {
  width: 230px;
  height: 230px;
  perspective: 1000px;
}

.cube {
  width: 170px;
  height: 170px;
  position: relative;
  margin: 28px auto 0;
  transform-style: preserve-3d;
  animation: cubeSpin 16s linear infinite;
}

.face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1px solid rgba(185, 232, 255, 0.34);
  background: linear-gradient(145deg, rgba(105, 244, 255, 0.22), rgba(8, 22, 40, 0.76));
  backdrop-filter: blur(8px);
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.front {
  transform: translateZ(85px);
}

.back {
  transform: rotateY(180deg) translateZ(85px);
}

.right {
  transform: rotateY(90deg) translateZ(85px);
}

.left {
  transform: rotateY(-90deg) translateZ(85px);
}

.top {
  transform: rotateX(90deg) translateZ(85px);
}

.bottom {
  transform: rotateX(-90deg) translateZ(85px);
}

.profile-shell {
  left: 50%;
  bottom: 56px;
  z-index: 3;
  width: min(265px, 55%);
  padding: 12px;
  border-radius: 30px;
  border: 1px solid rgba(172, 214, 252, 0.24);
  background: rgba(7, 18, 34, 0.84);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
}

.profile-shell img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  border-radius: 22px;
}

.floating-tag {
  z-index: 4;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(171, 214, 252, 0.24);
  background: rgba(6, 17, 31, 0.8);
  color: #d8efff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.tag-one {
  top: 46px;
  left: 34px;
}

.tag-two {
  right: 26px;
  bottom: 28px;
}

.section-head {
  margin-bottom: 18px;
}

.section-tag {
  margin: 0;
  color: var(--accent);
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2 {
  margin: 8px 0 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: 0.03em;
}

.section-subtext {
  margin: 0 0 28px;
  max-width: 70ch;
  color: var(--muted);
}

.section-head .section-subtext {
  margin-top: 12px;
  margin-bottom: 0;
  max-width: 74ch;
}

.glass-panel,
.skill-card,
.project-card,
.info-card,
.contact-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.glass-panel {
  padding: 30px;
  border-radius: var(--radius-lg);
}

.glass-panel p {
  margin: 0;
  color: #d9edff;
}

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

.skill-card,
.project-card,
.info-card,
.contact-card {
  position: relative;
  overflow: hidden;
}

.skill-card {
  padding: 20px 14px;
  border-radius: var(--radius-md);
  text-align: center;
}

.skill-card i {
  font-size: 2rem;
  color: #d5edff;
  transition: transform 0.25s ease, color 0.25s ease;
}

.skill-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.skill-card:hover i {
  color: var(--accent);
  transform: translateY(-2px) scale(1.08);
}

.projects-grid {
  display: grid;
  gap: 22px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  border-radius: var(--radius-lg);
}

.project-image {
  position: relative;
  min-height: 100%;
}

.project-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(5, 12, 24, 0.78));
}

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

.project-card:hover .project-image img {
  transform: scale(1.04);
}

.project-content {
  padding: 24px;
}

.project-content h3 {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.22rem;
}

.project-label {
  margin: 0 0 10px;
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(141, 203, 252, 0.28);
  background: rgba(9, 19, 35, 0.8);
  color: #bde8ff;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
}

.project-content p {
  margin: 12px 0 0;
  color: #cfe3f4;
}

.stack {
  color: #9ec2e8;
  font-size: 0.94rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.project-actions a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(145, 197, 242, 0.28);
  background: rgba(8, 17, 31, 0.86);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.project-actions a:hover {
  color: var(--accent);
  transform: translateY(-2px);
  border-color: rgba(105, 244, 255, 0.52);
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.strip-section {
  padding-top: 84px;
}

.kinetic-ribbon,
.awards-ribbon {
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(7, 16, 30, 0.75);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.ribbon-track,
.awards-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: tickerMove 28s linear infinite;
}

.ribbon-track span,
.awards-track span {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 16px 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #d6ecff;
  font-weight: 700;
}

.ribbon-track span::after,
.awards-track span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(105, 244, 255, 0.6);
  margin-left: 28px;
  box-shadow: 0 0 18px rgba(105, 244, 255, 0.42);
}

.awards-ribbon {
  margin-bottom: 18px;
}

.awards-track {
  animation-duration: 34s;
}

.collab-cta {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  background:
    radial-gradient(circle at 15% 20%, rgba(105, 244, 255, 0.2), transparent 36%),
    radial-gradient(circle at 80% 74%, rgba(255, 194, 120, 0.12), transparent 35%),
    rgba(7, 17, 33, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.collab-cta h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  max-width: 20ch;
}

.collab-cta p {
  margin: 0;
  max-width: 66ch;
  color: #c5dcf1;
}

.collab-cta .btn {
  margin-top: 24px;
}

.info-card {
  padding: 24px;
  border-radius: var(--radius-md);
}

.info-card h3 {
  margin: 0 0 14px;
  font-family: "Chakra Petch", sans-serif;
}

.info-card ul {
  margin: 0;
  padding-left: 18px;
  color: #d0e4f5;
  display: grid;
  gap: 10px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.contact-card {
  display: block;
  padding: 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
}

.contact-card i {
  font-size: 1.45rem;
  color: var(--accent);
}

.contact-card h3 {
  margin: 12px 0 6px;
  font-family: "Chakra Petch", sans-serif;
}

.contact-card p {
  margin: 0;
  color: #c3dbee;
  word-break: break-word;
}

.contact-open {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.tilt-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.18s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tilt-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(105, 244, 255, 0.18), transparent 34%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.tilt-card:hover {
  border-color: rgba(105, 244, 255, 0.42);
  box-shadow: 0 28px 56px rgba(1, 7, 16, 0.72);
}

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

footer {
  width: min(1180px, 92vw);
  margin: 0 auto 28px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  color: #9db6ce;
  font-size: 0.87rem;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s
      cubic-bezier(0.22, 1, 0.36, 1);
}

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

@keyframes cubeSpin {
  0% {
    transform: rotateX(-20deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(-20deg) rotateY(360deg);
  }
}

@keyframes orbitSpinA {
  from {
    transform: rotateX(72deg) rotateY(8deg) rotateZ(0deg);
  }
  to {
    transform: rotateX(72deg) rotateY(8deg) rotateZ(360deg);
  }
}

@keyframes orbitSpinB {
  from {
    transform: rotateX(20deg) rotateY(68deg) rotateZ(0deg);
  }
  to {
    transform: rotateX(20deg) rotateY(68deg) rotateZ(360deg);
  }
}

@keyframes twinkle {
  0% {
    transform: translateY(0);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-10px);
    opacity: 0.34;
  }
  100% {
    transform: translateY(0);
    opacity: 0.2;
  }
}

@keyframes twinkleDot {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes drift {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes tickerMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 1100px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 54px;
  }

  .hero-copy {
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 960px) {
  .menu-toggle {
    display: inline-flex;
  }

  .navbar {
    border-radius: 22px;
    padding: 12px;
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    order: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
  }

  .nav-links.open {
    max-height: 260px;
    opacity: 1;
  }

  .nav-link {
    text-align: center;
    background: rgba(11, 24, 43, 0.82);
    border: 1px solid rgba(145, 198, 241, 0.14);
  }

  .socials {
    margin-left: auto;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

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

  .collab-cta {
    padding: 34px 24px;
  }
}

@media (max-width: 700px) {
  .hero-copy,
  .section-head,
  .section-subtext {
    text-align: center;
  }

  .hero-actions,
  .hero-links {
    justify-content: center;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .cosmos-frame {
    width: min(500px, 100%);
  }

  .tag-one {
    top: 22px;
    left: 22px;
  }

  .tag-two {
    right: 18px;
    bottom: 18px;
  }

  .collab-cta {
    text-align: center;
  }

  .collab-cta h2,
  .collab-cta p {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 560px) {
  .navbar {
    width: 95vw;
    margin-top: 8px;
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

  .socials {
    width: 100%;
    justify-content: flex-end;
  }

  main,
  footer {
    width: 94vw;
  }

  .section {
    padding-top: 86px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cosmos-frame {
    aspect-ratio: 1 / 1.18;
  }

  .cube-scene {
    width: 190px;
    height: 190px;
  }

  .cube {
    width: 138px;
    height: 138px;
  }

  .front {
    transform: translateZ(69px);
  }

  .back {
    transform: rotateY(180deg) translateZ(69px);
  }

  .right {
    transform: rotateY(90deg) translateZ(69px);
  }

  .left {
    transform: rotateY(-90deg) translateZ(69px);
  }

  .top {
    transform: rotateX(90deg) translateZ(69px);
  }

  .bottom {
    transform: rotateX(-90deg) translateZ(69px);
  }

  .planet-a {
    width: 92px;
    height: 92px;
    top: 46px;
    right: 28px;
  }

  .planet-b {
    width: 68px;
    height: 68px;
    left: 24px;
    bottom: 104px;
  }

  .planet-c {
    width: 36px;
    height: 36px;
    top: 102px;
    left: 34px;
  }

  .profile-shell {
    width: min(230px, 64%);
    bottom: 66px;
  }

  .floating-tag {
    font-size: 0.74rem;
    padding: 8px 12px;
  }

  .glass-panel,
  .project-content,
  .info-card,
  .contact-card {
    padding: 20px;
  }

  .ribbon-track span,
  .awards-track span {
    padding: 14px 20px;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
