:root {
  --bg: #050816;
  --bg-2: #0b1024;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fbff;
  --muted: #aeb9d4;
  --primary: #7c3aed;
  --secondary: #06b6d4;
  --accent: #f97316;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.28), transparent 35%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  overflow-x: hidden;
}

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

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

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 1;
  background-image:
    linear-gradient(45deg, #fff 25%, transparent 25%),
    linear-gradient(-45deg, #fff 25%, transparent 25%);
  background-size: 5px 5px;
}

.cursor-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.16), transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 7%;
  background: rgba(5, 8, 22, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--muted);
  transition: 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.menu-btn {
  display: none;
  border: 0;
  color: var(--text);
  background: var(--card);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.section {
  position: relative;
  z-index: 2;
  padding: 110px 7%;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
  padding-top: 135px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.65;
  animation: floatOrb 8s ease-in-out infinite;
}

.orb-1 {
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.38), transparent 70%);
  top: 14%;
  left: 8%;
}

.orb-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3), transparent 70%);
  right: 7%;
  bottom: 10%;
  animation-delay: 1.5s;
}

.orb-3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.22), transparent 70%);
  left: 42%;
  bottom: 12%;
  animation-delay: 2.5s;
}

.eyebrow {
  color: var(--secondary);
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 22px;
}

.hero h1 span {
  background: linear-gradient(135deg, #fff, #8be9ff, #c4b5fd);
  -webkit-background-clip: text;
  color: transparent;
}

.hero h2 {
  font-size: clamp(1.3rem, 3vw, 2.05rem);
  color: #dde7ff;
  margin-bottom: 18px;
  max-width: 740px;
}

.hero-desc {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 650px;
  margin-bottom: 32px;
}

.hero-actions,
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

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

.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.25);
  border: 0;
}

.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.stats {
  margin-top: 32px;
}

.stat-card {
  min-width: 120px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

.stat-card strong {
  display: block;
  font-size: 1.65rem;
}

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

.hero-visual {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.profile-stage {
  position: relative;
  width: min(380px, 85vw);
  height: min(480px, 90vw);
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.rings {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  border: 1px solid rgba(255,255,255,0.15);
  transform: rotateX(62deg) rotateZ(-20deg) translateZ(-60px);
  box-shadow:
    0 0 0 18px rgba(124,58,237,0.05),
    0 0 0 40px rgba(6,182,212,0.035);
  animation: ringSpin 9s linear infinite;
}

.profile-card {
  width: 100%;
  min-height: 440px;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 32px;
  background: linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  transform: translateZ(80px);
  text-align: center;
}

.avatar-wrap {
  position: relative;
  margin: 0 auto 24px;
  width: 205px;
  height: 205px;
  border-radius: 50%;
  padding: 7px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  animation: pulseGlow 3s ease-in-out infinite;
}

.avatar-wrap img,
.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #111827;
}

.avatar-fallback {
  display: none;
  place-items: center;
  font-size: 4.5rem;
  font-weight: 900;
  color: white;
}

.profile-card h3 {
  font-size: 1.65rem;
  margin-bottom: 8px;
}

.profile-card p {
  color: var(--muted);
}

.tech-orbit {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tech-orbit span,
.tags span {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 8px 12px;
  color: #dbeafe;
  font-size: 0.9rem;
}

.cube-wrap {
  position: absolute;
  right: 2%;
  top: 8%;
  width: 120px;
  height: 120px;
  perspective: 800px;
}

.cube {
  width: 84px;
  height: 84px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 8s linear infinite;
}

.face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(124, 58, 237, 0.18);
  backdrop-filter: blur(8px);
  color: white;
  font-weight: 900;
}

.front { transform: translateZ(42px); }
.back { transform: rotateY(180deg) translateZ(42px); }
.right { transform: rotateY(90deg) translateZ(42px); }
.left { transform: rotateY(-90deg) translateZ(42px); }
.top { transform: rotateX(90deg) translateZ(42px); }
.bottom { transform: rotateX(-90deg) translateZ(42px); }

.section-title {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 48px;
}

.section-title p {
  color: var(--secondary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.glass-card,
.skill-panel,
.project-card,
.timeline-card,
.cert-card,
.contact-card,
.contact-form {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(20px);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

.glass-card,
.skill-panel,
.project-card,
.timeline-card,
.cert-card,
.contact-card,
.contact-form {
  padding: 28px;
}

.glass-card h3,
.skill-panel h3,
.project-card h3,
.cert-card h3,
.contact-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.glass-card p,
.project-card p,
.cert-card p,
.contact-card p,
.timeline-card p {
  color: var(--muted);
  line-height: 1.8;
}

.info-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.info-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list span {
  color: var(--secondary);
  font-size: 0.88rem;
}

.skills-grid,
.project-grid,
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

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

.skill-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.skill {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
  padding-bottom: 16px;
  border-bottom: 4px solid rgba(255,255,255,0.09);
}

.skill span {
  color: #eef4ff;
}

.skill b {
  color: var(--secondary);
}

.skill em {
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.project-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.status {
  font-size: 0.75rem;
  color: #c4b5fd;
  border: 1px solid rgba(196,181,253,0.25);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(124,58,237,0.12);
}

.live {
  color: #67e8f9;
  border-color: rgba(103,232,249,0.25);
}

.project-number {
  font-size: 2.1rem;
  color: rgba(255,255,255,0.18);
  font-weight: 900;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  padding-top: 24px;
}

.timeline {
  position: relative;
  max-width: 950px;
  margin: auto;
  display: grid;
  gap: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--primary), var(--secondary));
}

.timeline-item {
  position: relative;
  padding-left: 64px;
}

.dot {
  position: absolute;
  left: 10px;
  top: 30px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 0 8px rgba(124,58,237,0.18);
}

.timeline-card small {
  display: inline-block;
  color: var(--secondary);
  margin-top: 12px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.contact-links a {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  transition: 0.25s;
}

.contact-links a:hover {
  transform: translateY(-3px);
  background: var(--card-strong);
}

.contact-form {
  display: grid;
  gap: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  outline: none;
  font-family: inherit;
}

input:focus,
textarea:focus {
  border-color: rgba(6,182,212,0.65);
  box-shadow: 0 0 0 4px rgba(6,182,212,0.08);
}

.form-note {
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  position: relative;
  z-index: 2;
  padding: 34px 7%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 22, 0.72);
}

footer a {
  color: var(--secondary);
}

.reveal {
  opacity: 0;
  transform: translateY(45px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.tilt {
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.tilt:hover {
  border-color: rgba(6, 182, 212, 0.45);
}

@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(30px, -35px, 0) scale(1.08); }
}

@keyframes rotateCube {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

@keyframes ringSpin {
  from { transform: rotateX(62deg) rotateZ(0deg) translateZ(-60px); }
  to { transform: rotateX(62deg) rotateZ(360deg) translateZ(-60px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 32px rgba(124,58,237,0.35); }
  50% { box-shadow: 0 0 55px rgba(6,182,212,0.45); }
}

@media (max-width: 1120px) {
  .hero,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 500px;
  }

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

@media (max-width: 820px) {
  .menu-btn {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    top: 78px;
    left: 7%;
    right: 7%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(5, 8, 22, 0.94);
  }

  .nav-links.open {
    display: flex;
  }

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

  .nav-links a:hover {
    background: rgba(255,255,255,0.07);
  }

  .hero {
    padding-top: 120px;
  }

  .skills-grid,
  .project-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 520px) {
  .section {
    padding: 90px 5%;
  }

  .navbar {
    padding: 15px 5%;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .hero-actions,
  .stats {
    align-items: stretch;
  }

  .btn,
  .stat-card {
    width: 100%;
  }

  .profile-card {
    padding: 22px;
  }

  .avatar-wrap {
    width: 170px;
    height: 170px;
  }
}
