* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: #050608;
  color: #e9f7ff;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

body::before {
  top: -120px;
  left: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle,
    rgba(0, 229, 255, 0.18) 0%,
    transparent 72%
  );
  animation: float 7s ease-in-out infinite;
}

body::after {
  bottom: -90px;
  right: -100px;
  width: 360px;
  height: 360px;
  background: radial-gradient(
    circle,
    rgba(0, 182, 212, 0.14) 0%,
    transparent 74%
  );
  animation: float-reverse 8s ease-in-out infinite;
}

.matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.06) 1px, transparent 1px);
  background-size:
    100% 48px,
    48px 100%;
  pointer-events: none;
  opacity: 0.22;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(28px, -24px);
  }
}

@keyframes float-reverse {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-34px, 30px);
  }
}

.navbar {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 12, 0.96);
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
  backdrop-filter: blur(10px);
}

.navbar .container {
  max-width: 1200px;
  margin: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: #66f0ff;
  font-weight: 700;
}

.navbar nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  align-items: center;
}

.navbar nav a {
  color: #d8f7ff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 999px;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.navbar nav a:hover,
.navbar nav a:focus,
.navbar nav a.active {
  color: #00d8ff;
  background: rgba(0, 229, 255, 0.1);
}

main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: auto;
  padding: 36px 22px 80px;
}

.hero {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  padding-top: 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 38px;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.14);
  color: #80f1ff;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.glitch {
  position: relative;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: #f4ffff;
  margin-bottom: 22px;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}

.glitch::before {
  color: #00e5ff;
  z-index: -1;
  transform: translate(2px, -2px);
  opacity: 0.8;
  animation: glitch-anim 2.5s infinite ease-in-out;
}

.glitch::after {
  color: #ff3c7e;
  z-index: -2;
  transform: translate(-2px, 2px);
  opacity: 0.75;
  animation: glitch-anim 2.8s infinite ease-in-out reverse;
}

@keyframes glitch-anim {
  0% {
    clip-path: inset(0 0 0 0);
  }
  20% {
    clip-path: inset(10% 0 78% 0);
  }
  40% {
    clip-path: inset(55% 0 6% 0);
  }
  60% {
    clip-path: inset(24% 0 50% 0);
  }
  80% {
    clip-path: inset(4% 0 82% 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

.hero-subtitle {
  max-width: 680px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #c9e7ff;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 42px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: #091013;
  background: linear-gradient(135deg, #00e5ff, #00b8d4);
  box-shadow: 0 18px 35px rgba(0, 229, 255, 0.14);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(0, 229, 255, 0.22);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.03);
  color: #d8f7ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-toggle {
  padding: 12px 18px;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  min-width: 120px;
}

.audio-toggle.active {
  background: linear-gradient(135deg, #00e5ff, #00b8d4);
  color: #091013;
}

.terminal-card {
  margin-top: 10px;
  background: rgba(1, 11, 17, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.25);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #8ee8ff;
  font-size: 0.96rem;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red {
  background: #ff5c7a;
}
.dot.yellow {
  background: #ffe771;
}
.dot.green {
  background: #5edc8c;
}

.terminal-title {
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

.terminal-body p {
  color: #d6f9ff;
  font-size: 0.98rem;
  margin-bottom: 10px;
  position: relative;
}

.terminal-body p::before {
  content: "▸";
  position: absolute;
  left: -22px;
  color: #00b8ff;
}

.hero-avatar {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-avatar img {
  width: min(320px, 100%);
  border-radius: 24px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  box-shadow: 0 0 80px rgba(0, 229, 255, 0.14);
  animation: float-img 8s ease-in-out infinite;
}

@keyframes float-img {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 24px;
}

.section-tag {
  color: #66f0ff;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.card {
  background: rgba(10, 14, 19, 0.95);
  padding: 38px;
  border-radius: 28px;
  margin-bottom: 32px;
  border: 1px solid rgba(0, 229, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.card h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.7rem);
}

.card-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.9;
  color: #dfeffe;
  margin-bottom: 18px;
}

.about-stats {
  display: grid;
  gap: 18px;
}

.stat {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.08);
  border-radius: 20px;
  padding: 22px;
}

.stat strong {
  display: block;
  font-size: 0.92rem;
  color: #8adfff;
  margin-bottom: 8px;
}

.stat span {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f7ffff;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}

.skills-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.1);
  color: #e5f7ff;
  border-radius: 18px;
  font-weight: 600;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.project-card {
  padding: 28px;
  background: rgba(1, 11, 17, 0.98);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 229, 255, 0.18);
}

.project-card h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.project-card p {
  color: #cbe9ff;
  line-height: 1.8;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
}

.contact-card,
.contact-details {
  background: rgba(1, 11, 17, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.08);
  border-radius: 22px;
  padding: 28px;
}

.contact-card h3 {
  margin-bottom: 14px;
  font-size: 1.5rem;
}

.contact-card p,
.contact-details p {
  color: #dbeeff;
  line-height: 1.9;
}

.contact-details a {
  color: #8ae7ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-details a:hover {
  color: #fff;
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #050608;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.6s ease-out,
    visibility 0.6s ease-out;
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader::before {
  content: "";
  width: 62px;
  height: 62px;
  border: 4px solid rgba(0, 229, 255, 0.18);
  border-top: 4px solid #00e5ff;
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .card-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .navbar nav ul {
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero-subtitle,
  .about-text p,
  .project-card p,
  .contact-details p {
    font-size: 0.95rem;
  }

  .hero-badge {
    margin-bottom: 18px;
  }

  .hero-actions {
    flex-direction: column;
  }
}
