:root {
  --bg: #050816;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fbff;
  --muted: #aeb9d4;
  --line: rgba(255, 255, 255, 0.16);
  --primary: #7c3cff;
  --secondary: #00d4ff;
  --accent: #2fffb3;
  --danger: #ff6b93;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(124, 60, 255, 0.28), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(0, 212, 255, 0.2), transparent 26%),
    linear-gradient(135deg, #03040d 0%, #07142c 50%, #060915 100%);
  overflow-x: hidden;
}

body.light {
  --bg: #f6f9ff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --text: #0d1324;
  --muted: #53627f;
  --line: rgba(17, 24, 39, 0.12);
  --shadow: 0 24px 70px rgba(33, 54, 98, 0.16);
  background:
    radial-gradient(circle at 12% 12%, rgba(124, 60, 255, 0.14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(0, 212, 255, 0.16), transparent 26%),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 52%, #ffffff 100%);
}

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

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

button,
input,
textarea {
  font: inherit;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  gap: 18px;
  background: #03040d;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 58px;
  height: 58px;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background: rgba(5, 8, 22, 0.78);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

body.light .site-header.scrolled {
  background: rgba(246, 249, 255, 0.78);
}

.navbar {
  max-width: var(--max-width);
  min-height: 76px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
}

.logo span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 28px rgba(0, 212, 255, 0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface);
}

.theme-toggle,
.nav-toggle,
.scroll-top {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.nav-toggle:hover,
.scroll-top:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
}

.nav-toggle {
  display: none;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 22px;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: 48px;
  padding-top: 120px;
}

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

.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--secondary);
  opacity: 0.55;
  animation: floatParticle 7s ease-in-out infinite;
}

.floating-shape {
  position: absolute;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(124, 60, 255, 0.18), rgba(0, 212, 255, 0.08));
  backdrop-filter: blur(12px);
  animation: drift 8s ease-in-out infinite alternate;
}

.shape-one {
  top: 17%;
  left: 4%;
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.shape-two {
  right: 7%;
  top: 18%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  animation-delay: 1s;
}

.shape-three {
  bottom: 12%;
  left: 46%;
  width: 54px;
  height: 54px;
  transform: rotate(45deg);
  animation-delay: 2s;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.08;
}

h1 {
  max-width: 780px;
  font-size: clamp(3rem, 7vw, 6.7rem);
  letter-spacing: 0;
}

h1 span,
.section-heading h2 span {
  background: linear-gradient(135deg, #fff, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.light h1 span {
  background: linear-gradient(135deg, #111827, #0a79d6, #6d28d9);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-intro {
  max-width: 700px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.8;
}

.typing-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 26px 0;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
}

.typing-line strong {
  color: var(--secondary);
}

.typing-line strong::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 4px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 0.8s steps(2, start) infinite;
}

.hero-actions,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #165dff);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(22, 93, 255, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(0, 212, 255, 0.24);
}

.btn.secondary {
  background: linear-gradient(135deg, #00a6ff, #22d3ee);
}

.btn.ghost {
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
}

.btn.small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.profile-shell {
  position: relative;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.profile-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 20px;
  filter: saturate(1.08) contrast(1.04);
}

.status-chip,
.mini-card {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(5, 8, 22, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

body.light .status-chip,
body.light .mini-card {
  background: rgba(255, 255, 255, 0.78);
}

.status-chip {
  top: 34px;
  left: 32px;
  font-weight: 800;
}

.status-chip i {
  color: var(--accent);
  font-size: 0.62rem;
}

.mini-card i {
  color: var(--secondary);
}

.ai-card {
  right: -18px;
  bottom: 90px;
}

.data-card {
  left: -18px;
  bottom: 32px;
}

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

.stat-card,
.glass-panel,
.info-card,
.skill-card,
.timeline-content,
.project-card,
.achievement-card,
.contact-info,
.contact-form,
.goal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat-card {
  padding: 26px;
  text-align: center;
}

.stat-card span {
  display: block;
  color: var(--secondary);
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
}

.stat-card p,
.section-heading p,
.about-copy p,
.info-card p,
.timeline-content p,
.project-card p,
.goal-panel p,
.achievement-card p {
  color: var(--muted);
  line-height: 1.75;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 38px;
}

.section-heading h2,
.goal-panel h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
}

.about-copy {
  padding: 30px;
}

.about-copy h3,
.timeline-content h3,
.project-body h3,
.achievement-card h3,
.info-card h3,
.skill-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.about-copy p + p {
  margin-top: 16px;
}

.about-cards {
  display: grid;
  gap: 16px;
}

.info-card,
.achievement-card,
.skill-card {
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.info-card:hover,
.achievement-card:hover,
.skill-card:hover,
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 212, 255, 0.45);
  background: var(--surface-strong);
}

.info-card i,
.achievement-card i {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
}

.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

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

.timeline-item {
  position: relative;
  padding-left: 72px;
  margin-bottom: 28px;
}

.timeline-dot {
  position: absolute;
  left: 13px;
  top: 24px;
  width: 24px;
  height: 24px;
  border: 5px solid var(--bg);
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 7px rgba(0, 212, 255, 0.12);
}

.timeline-content {
  padding: 26px;
}

.timeline-content time {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 800;
}

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

.skill-card {
  position: relative;
  min-height: 190px;
}

.skill-card::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--bg) 54%, transparent 56%),
    conic-gradient(var(--secondary) calc(var(--progress, 0) * 1%), rgba(255, 255, 255, 0.13) 0);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-card i {
  color: var(--secondary);
  font-size: 2rem;
  margin-bottom: 18px;
}

.progress {
  width: 100%;
  height: 9px;
  margin: 18px 0 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  border-radius: inherit;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.project-card {
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-body {
  padding: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tags span {
  padding: 7px 10px;
  color: var(--text);
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 800;
}

.goal-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 28px;
  padding: 36px;
  overflow: hidden;
}

.goal-panel p {
  margin-top: 18px;
  font-size: 1.04rem;
}

.goal-visual {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
}

.goal-visual i {
  position: absolute;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  box-shadow: 0 20px 50px rgba(0, 212, 255, 0.22);
  font-size: 2rem;
  animation: pulse 3s ease-in-out infinite;
}

.goal-visual i:nth-child(1) {
  left: 12%;
  top: 18%;
}

.goal-visual i:nth-child(2) {
  right: 12%;
  top: 4%;
  animation-delay: 0.7s;
}

.goal-visual i:nth-child(3) {
  bottom: 10%;
  left: 38%;
  animation-delay: 1.2s;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 22px;
}

.contact-info {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 26px;
}

.contact-info a,
.contact-info span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
  transition: color 0.2s ease, transform 0.2s ease;
}

.contact-info a:hover {
  color: var(--text);
  transform: translateX(4px);
}

.contact-info i {
  color: var(--secondary);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

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

.contact-form span {
  color: var(--text);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  padding: 14px;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.light .contact-form input,
body.light .contact-form textarea {
  background: rgba(255, 255, 255, 0.8);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.14);
}

.error {
  min-height: 16px;
  color: var(--danger);
  font-weight: 700;
}

.form-status {
  color: var(--accent);
  font-weight: 800;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 34px 22px;
  background: rgba(0, 0, 0, 0.18);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-links,
.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.footer-links a,
.socials a {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.footer-links a:hover,
.socials a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.footer p {
  color: var(--muted);
  text-align: center;
}

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

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

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

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

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes drift {
  to {
    transform: translate3d(18px, -18px, 0) rotate(16deg);
  }
}

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

@keyframes pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-12px) scale(1.04);
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    display: grid;
    padding: 16px;
    background: rgba(5, 8, 22, 0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(-18px);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(18px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  body.light .nav-links {
    background: rgba(255, 255, 255, 0.94);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .hero,
  .about-grid,
  .goal-panel,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 132px;
  }

  .hero-visual {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }

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

@media (max-width: 720px) {
  .section {
    padding: 72px 18px;
  }

  .navbar {
    padding: 0 18px;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(2.75rem, 15vw, 4.6rem);
  }

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

  .btn {
    width: 100%;
  }

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

  .status-chip,
  .mini-card {
    position: static;
    margin-top: 10px;
  }

  .profile-shell {
    display: grid;
  }

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

  .timeline-item {
    padding-left: 58px;
  }
}