:root {
  --bg: #050505;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.095);
  --text: #ffffff;
  --muted: #a7adba;
  --soft: #6f7888;
  --cyan: #00e5ff;
  --purple: #7c3aed;
  --yellow: #ffe74c;
  --accent: #00ffc8;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 74% 10%, rgba(124, 58, 237, 0.2), transparent 31vw),
    radial-gradient(circle at 12% 22%, rgba(0, 229, 255, 0.16), transparent 28vw),
    radial-gradient(circle at 60% 88%, rgba(255, 231, 76, 0.09), transparent 26vw),
    var(--bg);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

body.light-mode {
  --bg: #f6fbff;
  --panel: rgba(2, 12, 23, 0.06);
  --panel-strong: rgba(2, 12, 23, 0.1);
  --text: #06111f;
  --muted: #475569;
  --soft: #64748b;
  --border: rgba(2, 12, 23, 0.14);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--cyan), var(--purple));
  border-radius: 99px;
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 0;
  height: 3px;
  z-index: 3000;
  background: linear-gradient(90deg, var(--cyan), var(--accent), var(--yellow));
  box-shadow: 0 0 20px var(--cyan);
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.12), rgba(124, 58, 237, 0.07) 35%, transparent 68%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  mix-blend-mode: screen;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.stars {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(0, 229, 255, 0.75) 0 1px, transparent 1.5px);
  background-position: 0 0, 34px 52px;
  background-size: 130px 130px, 210px 210px;
  animation: driftStars 26s linear infinite;
}

.tech-logo {
  position: absolute;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--cyan);
  font-size: 2rem;
  opacity: 0.11;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.16);
  filter: saturate(1.2);
  animation: logoFloat var(--dur) ease-in-out infinite alternate, logoPulse 7s ease-in-out infinite;
}

.tech-logo:nth-child(3n) {
  color: var(--purple);
  box-shadow: 0 0 28px rgba(124, 58, 237, 0.18);
}

.tech-logo:nth-child(4n) {
  color: var(--yellow);
  box-shadow: 0 0 28px rgba(255, 231, 76, 0.14);
}

.site-header {
  position: fixed;
  top: 22px;
  left: 0;
  width: 100%;
  z-index: 2000;
  padding: 0 24px;
}

.nav-shell {
  width: min(1240px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 12px 14px 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.62);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
}

.brand {
  flex: 0 0 auto;
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand span {
  color: var(--cyan);
  text-shadow: 0 0 18px var(--cyan);
}

.nav-links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 25px);
}

.nav-links a {
  position: relative;
  padding: 9px 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  transition: color 0.25s var(--ease), text-shadow 0.25s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 15px var(--cyan);
  transform: translateX(-50%);
  transition: width 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-shadow: 0 0 18px rgba(0, 229, 255, 0.48);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-btn,
.menu-toggle {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.theme-btn:hover,
.menu-toggle:hover {
  color: var(--yellow);
  box-shadow: 0 0 20px rgba(255, 231, 76, 0.25);
}

.menu-toggle {
  display: none;
}

.resume-btn,
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.resume-btn {
  padding: 0 20px;
  color: #001216;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.42), 0 0 65px rgba(0, 229, 255, 0.16);
}

.btn {
  padding: 0 25px;
}

.btn.primary {
  color: #001216;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.42), 0 0 75px rgba(0, 229, 255, 0.16);
}

.btn.outline {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn.small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.82rem;
}

.resume-btn:hover,
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.55), 0 0 90px rgba(124, 58, 237, 0.18);
}

.section {
  width: min(1240px, calc(100% - 44px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 132px 0 78px;
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(36px, 6vw, 84px);
  padding-top: 165px;
}

.eyebrow,
.section-heading p {
  color: var(--cyan);
  font-family: "Sora", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
}

.hero h1 {
  margin-top: 4px;
  font-family: "Sora", sans-serif;
  font-size: clamp(5.1rem, 12vw, 10.5rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero h1 span {
  background: linear-gradient(90deg, #fff 8%, var(--cyan) 42%, var(--purple) 74%, var(--yellow) 108%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 32px rgba(0, 229, 255, 0.28));
}

.hero-role {
  margin-top: 26px;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
}

.hero-desc {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.04rem;
}

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

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.social-row a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.1);
  backdrop-filter: blur(18px);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.social-row a:hover {
  color: var(--cyan);
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.38);
}

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

.portrait-stage {
  position: relative;
  width: min(445px, 84vw);
  aspect-ratio: 0.82;
  display: grid;
  place-items: center;
  animation: floatPortrait 5.8s ease-in-out infinite;
}

.portrait-stage img {
  position: relative;
  z-index: 4;
  width: 79%;
  height: 88%;
  object-fit: cover;
  object-position: top center;
  border-radius: 24px;
  filter: grayscale(1) contrast(1.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow), 0 0 46px rgba(0, 229, 255, 0.23);
}

.portrait-stage img.spider-accent {
  position: absolute;
  z-index: 8;
  width: clamp(86px, 13vw, 150px);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  border-radius: 24px;
  opacity: 0.96;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 0 16px rgba(255, 45, 99, 0.42)) drop-shadow(0 0 34px rgba(124, 58, 237, 0.28));
}

.spider-crouch {
  left: -16%;
  top: -3%;
  transform: rotate(-12deg);
  animation: edgeFloatLeft 4.8s ease-in-out infinite;
}

.spider-hang {
  right: -17%;
  top: -18%;
  width: clamp(96px, 15vw, 168px) !important;
  transform: rotate(7deg);
  animation: edgeFloatRight 5.4s ease-in-out infinite;
}

.frame-cyan,
.frame-purple {
  position: absolute;
  inset: 8% 10% 5% 7%;
  border-radius: 28px;
  pointer-events: none;
}

.frame-cyan {
  z-index: 2;
  border: 3px solid var(--cyan);
  box-shadow: 0 0 22px var(--cyan), inset 0 0 34px rgba(0, 229, 255, 0.16);
  transform: translate(-22px, -18px);
}

.frame-purple {
  z-index: 1;
  border: 2px solid var(--purple);
  box-shadow: 0 0 26px rgba(124, 58, 237, 0.72);
  transform: translate(25px, 20px);
}

.orbit {
  position: absolute;
  z-index: 5;
  width: 108%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 231, 76, 0.8);
  border-left-color: transparent;
  border-bottom-color: rgba(255, 231, 76, 0.18);
  border-radius: 50%;
  transform: rotate(-18deg) scaleY(0.57);
  box-shadow: 0 0 22px rgba(255, 231, 76, 0.34);
  animation: orbitSpin 11s linear infinite;
}

.code-chip {
  position: absolute;
  top: 8%;
  right: 3%;
  z-index: 6;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 255, 200, 0.75);
  border-radius: 21px;
  background: rgba(5, 5, 5, 0.76);
  color: var(--accent);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  box-shadow: 0 0 28px rgba(0, 255, 200, 0.34);
  animation: miniFloat 3.8s ease-in-out infinite;
}

.spark {
  position: absolute;
  z-index: 7;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  animation: sparkPulse 2.3s ease-in-out infinite;
}

.s1 {
  left: 5%;
  top: 27%;
}

.s2 {
  right: 2%;
  bottom: 28%;
  background: var(--yellow);
  box-shadow: 0 0 18px var(--yellow);
  animation-delay: 0.5s;
}

.s3 {
  left: 18%;
  bottom: 8%;
  background: var(--purple);
  box-shadow: 0 0 18px var(--purple);
  animation-delay: 1s;
}

.glass {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--panel), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading.center {
  text-align: center;
}

.section-heading h2 {
  margin-top: 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.25rem, 5vw, 4.3rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.section-heading-row .section-heading {
  margin-bottom: 0;
}

.about-card {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  align-items: center;
  gap: clamp(30px, 5vw, 68px);
  padding: clamp(24px, 5vw, 58px);
}

.about-photo {
  position: relative;
  width: min(310px, 100%);
  justify-self: center;
  border-radius: 22px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.5), rgba(124, 58, 237, 0.24));
  box-shadow: 0 0 38px rgba(0, 229, 255, 0.28);
}

.about-photo img {
  width: 100%;
  aspect-ratio: 0.82;
  object-fit: cover;
  object-position: top center;
  border-radius: 16px;
  filter: grayscale(1);
  background: #090909;
}

.about-content h3 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-content p {
  max-width: 680px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.02rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.stat-card {
  min-height: 118px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.stat-card strong {
  display: block;
  color: var(--cyan);
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.38);
}

.stat-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.stat-card:hover {
  border-color: rgba(0, 229, 255, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 25px rgba(0, 229, 255, 0.18);
}

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

.skill-card {
  position: relative;
  min-height: 140px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle), transparent, rgba(0, 229, 255, 0.75), rgba(124, 58, 237, 0.7), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  animation: spinBorder 4s linear infinite;
}

.skill-card i {
  color: var(--text);
  font-size: 2.7rem;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.16));
  transition: transform 0.28s var(--ease), filter 0.28s var(--ease);
}

.skill-card span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.skill-card:hover {
  border-color: rgba(0, 229, 255, 0.38);
  transform: translateY(-10px) rotateX(5deg) rotateY(-4deg);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.42), 0 0 26px rgba(0, 229, 255, 0.2);
}

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

.skill-card:hover i {
  transform: scale(1.12);
  filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.46));
}

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

.project-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, rgba(0, 229, 255, 0.55), rgba(124, 58, 237, 0.45), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  animation: borderSweep 5s linear infinite;
}

.project-card>* {
  position: relative;
  z-index: 1;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  filter: saturate(0.86) brightness(0.86);
  transition: transform 0.55s var(--ease), filter 0.3s var(--ease);
}

.project-card div:not(.badges):not(.project-actions) {
  padding: 24px;
  background: rgba(5, 5, 5, 0.58);
}

.project-card h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.35rem;
}

.project-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badges span {
  padding: 6px 10px;
  border: 1px solid rgba(0, 229, 255, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.07);
  font-size: 0.72rem;
  font-weight: 700;
}

.project-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.project-actions a {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.045);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.project-actions a:first-child {
  color: #001216;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.32);
}

.project-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateY(-10px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 0 30px rgba(0, 229, 255, 0.19);
}

.project-card:hover::before {
  opacity: 0.58;
}

.project-card:hover img {
  transform: scale(1.06);
  filter: saturate(1.05) brightness(1);
}

.cert-shell {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 16px;
}

.cert-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 390px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 2px 24px;
}

.cert-track::-webkit-scrollbar {
  display: none;
}

.cert-card {
  scroll-snap-align: center;
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.cert-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(0.25) brightness(0.9);
}

.cert-card img.cert-contain {
  object-fit: contain;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  filter: brightness(0.98) saturate(1.02);
}

.cert-card h3,
.cert-card p,
.cert-card span {
  margin-left: 22px;
  margin-right: 22px;
}

.cert-card h3 {
  margin-top: 20px;
  font-family: "Sora", sans-serif;
  font-size: 1.08rem;
}

.cert-card p {
  margin-top: 5px;
  color: var(--muted);
}

.cert-card span {
  display: inline-flex;
  margin-top: 14px;
  margin-bottom: 22px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(255, 231, 76, 0.1);
  border: 1px solid rgba(255, 231, 76, 0.22);
  font-weight: 800;
  font-size: 0.75rem;
}

.cert-card:hover {
  border-color: rgba(124, 58, 237, 0.52);
  transform: translateY(-8px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45), 0 0 24px rgba(124, 58, 237, 0.25);
}

.cert-arrow {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}

.cert-arrow:hover {
  color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.26);
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.gallery-grid img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  filter: brightness(0.96) saturate(1.06);
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.gallery-item:nth-child(even) {
  margin-top: 34px;
}

.gallery-item figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(5, 5, 5, 0.68);
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.18);
  backdrop-filter: blur(16px);
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(255, 231, 76, 0.32);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.48), 0 0 28px rgba(255, 231, 76, 0.16);
}

.gallery-item:hover img {
  filter: brightness(1.03) saturate(1.12);
  transform: scale(1.04);
}

.contact-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(28px, 6vw, 66px);
  align-items: center;
}

.rocket {
  font-size: 4.2rem;
  line-height: 1;
  animation: miniFloat 3s ease-in-out infinite;
}

.contact-copy h2 {
  margin-top: 18px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 1.02;
}

.contact-copy p {
  max-width: 620px;
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 1.04rem;
}

.contact-links {
  display: grid;
  gap: 14px;
  padding-left: clamp(0px, 3vw, 44px);
  border-left: 1px solid rgba(255, 255, 255, 0.11);
}

.contact-links h3 {
  color: var(--cyan);
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.contact-links a {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.contact-links i {
  width: 34px;
  color: var(--cyan);
  font-size: 1.35rem;
}

.contact-links a:hover {
  color: var(--text);
  border-color: rgba(0, 229, 255, 0.42);
  transform: translateX(8px);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.15);
}

.passion-section {
  width: min(1240px, calc(100% - 44px));
  min-height: 46vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 64px 0 86px;
}

.passion-section::before {
  content: "";
  position: absolute;
  inset: 12% 6%;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 47, 179, 0.08), transparent 46%);
  filter: blur(22px);
  opacity: 0.55;
}

.passion-glow {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

.signature-text {
  width: min(100%, 1120px);
  height: auto;
  overflow: visible;
}

.signature-text text {
  font-family: "Brush Script MT", "Segoe Script", "Lucida Handwriting", cursive;
  font-size: 130px;
  font-weight: 400;
  fill: transparent;
  stroke: #ff4fbf;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  paint-order: stroke fill;
  animation: signatureWrite 4.4s var(--ease) forwards, signatureFill 0.9s ease forwards 3.25s;
}

.footer {
  width: min(1240px, calc(100% - 44px));
  margin: 0 auto;
  padding: 36px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--soft);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.footer span {
  color: #ff4d88;
  text-shadow: 0 0 16px rgba(255, 77, 136, 0.55);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(5, 5, 5, 0.7);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.22);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

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

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes spinBorder {
  to {
    --angle: 360deg;
  }
}

@keyframes logoFloat {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  to {
    transform: translate3d(var(--x), var(--y), 0) rotate(var(--r));
  }
}

@keyframes logoPulse {

  0%,
  100% {
    opacity: 0.08;
  }

  50% {
    opacity: 0.18;
  }
}

@keyframes driftStars {
  to {
    background-position: 130px 130px, 244px 262px;
  }
}

@keyframes floatPortrait {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-18px);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(342deg) scaleY(0.57);
  }
}

@keyframes miniFloat {

  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-12px) rotate(4deg);
  }
}

@keyframes sparkPulse {

  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.45;
  }

  50% {
    transform: scale(1.45);
    opacity: 1;
  }
}

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

@keyframes signatureWrite {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes signatureFill {
  to {
    fill: #ff4fbf;
  }
}

@keyframes edgeFloatLeft {

  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -12px;
  }
}

@keyframes edgeFloatRight {

  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 14px;
  }
}

@media (max-width: 1120px) {
  .menu-toggle {
    display: grid;
    order: 3;
  }

  .nav-shell {
    justify-content: space-between;
  }

  .nav-links {
    position: fixed;
    top: 104px;
    left: 24px;
    right: 24px;
    display: grid;
    justify-content: stretch;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(5, 5, 5, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    transform: translateY(-18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  body.menu-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 13px 14px;
    border-radius: 14px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(0, 229, 255, 0.08);
  }

  .nav-links a::after {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy,
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

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

  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .spider-crouch {
    left: -7%;
    top: -2%;
  }

  .spider-hang {
    right: -7%;
    top: -15%;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 12px;
    padding: 0 12px;
  }

  .nav-shell {
    min-height: 64px;
    padding: 9px 10px 9px 16px;
  }

  .brand {
    font-size: 1rem;
  }

  .nav-actions .resume-btn {
    display: none;
  }

  .section {
    width: min(100% - 28px, 1240px);
    min-height: auto;
    padding: 96px 0 54px;
  }

  .hero {
    padding-top: 128px;
    gap: 50px;
  }

  .hero h1 {
    font-size: clamp(4.2rem, 22vw, 6.7rem);
  }

  .portrait-stage img.spider-accent {
    width: clamp(70px, 21vw, 108px);
    opacity: 0.9;
  }

  .spider-crouch {
    left: -3%;
    top: 0;
  }

  .spider-hang {
    right: -2%;
    top: -13%;
    width: clamp(82px, 23vw, 120px) !important;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .about-card,
  .contact-card {
    grid-template-columns: 1fr;
  }

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

  .skill-card {
    min-height: 122px;
  }

  .section-heading-row {
    align-items: start;
    flex-direction: column;
  }

  .cert-shell {
    grid-template-columns: 1fr;
  }

  .cert-arrow {
    display: none;
  }

  .cert-track {
    grid-auto-columns: minmax(265px, 86vw);
  }

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

  .gallery-grid img {
    height: 310px;
  }

  .gallery-item,
  .gallery-item:nth-child(even) {
    margin-top: 0;
  }

  .contact-links {
    padding-left: 0;
    padding-top: 24px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 460px) {

  .stats-grid,
  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .social-row a {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}