:root {
  --bg: #09111a;
  --bg-soft: #0f1c28;
  --panel: rgba(12, 25, 37, 0.82);
  --line: rgba(126, 231, 135, 0.18);
  --text: #ecf7f2;
  --muted: #9bb6aa;
  --accent: #7ee787;
  --accent-strong: #2ec27e;
  --warm: #f5c76b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 15%, rgba(141, 103, 255, 0.14), transparent 24%),
    radial-gradient(circle at 78% 22%, rgba(82, 182, 255, 0.16), transparent 28%),
    radial-gradient(circle at 50% 78%, rgba(126, 231, 135, 0.08), transparent 30%),
    linear-gradient(180deg, #030711 0%, #08101d 42%, #040811 100%);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.07) 0 1px, transparent 1.5px),
    radial-gradient(circle at 60% 80%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1.5px);
  background-size: 240px 240px, 320px 320px, 280px 280px;
  opacity: 0.65;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 46%, rgba(3, 7, 17, 0.32) 100%);
  z-index: 0;
}

.star-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 1200px;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.45;
  animation: drift 16s ease-in-out infinite;
}

.orb-one {
  width: 340px;
  height: 340px;
  top: 10%;
  left: -4%;
  background: radial-gradient(circle, rgba(127, 90, 240, 0.22), transparent 72%);
}

.orb-two {
  width: 420px;
  height: 420px;
  top: 45%;
  right: -8%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 74%);
  animation-duration: 22s;
}

.orb-three {
  width: 300px;
  height: 300px;
  bottom: 8%;
  left: 38%;
  background: radial-gradient(circle, rgba(126, 231, 135, 0.12), transparent 72%);
  animation-duration: 19s;
}

.dot-field {
  position: absolute;
  inset: 0;
}

.motion-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 18px rgba(153, 220, 255, 0.5);
  animation: floatDot 18s linear infinite;
}

.motion-dot:nth-child(1) {
  top: 8%;
  left: 12%;
  animation-duration: 16s;
}

.motion-dot:nth-child(2) {
  top: 18%;
  left: 78%;
  width: 4px;
  height: 4px;
  animation-duration: 20s;
  animation-delay: -3s;
}

.motion-dot:nth-child(3) {
  top: 30%;
  left: 6%;
  animation-duration: 22s;
  animation-delay: -7s;
}

.motion-dot:nth-child(4) {
  top: 38%;
  left: 88%;
  width: 5px;
  height: 5px;
  animation-duration: 17s;
  animation-delay: -2s;
}

.motion-dot:nth-child(5) {
  top: 50%;
  left: 24%;
  animation-duration: 24s;
  animation-delay: -6s;
}

.motion-dot:nth-child(6) {
  top: 58%;
  left: 72%;
  width: 4px;
  height: 4px;
  animation-duration: 19s;
  animation-delay: -4s;
}

.motion-dot:nth-child(7) {
  top: 66%;
  left: 10%;
  animation-duration: 21s;
  animation-delay: -8s;
}

.motion-dot:nth-child(8) {
  top: 74%;
  left: 84%;
  width: 5px;
  height: 5px;
  animation-duration: 23s;
  animation-delay: -1s;
}

.motion-dot:nth-child(9) {
  top: 82%;
  left: 36%;
  animation-duration: 18s;
  animation-delay: -5s;
}

.motion-dot:nth-child(10) {
  top: 12%;
  left: 48%;
  width: 4px;
  height: 4px;
  animation-duration: 25s;
  animation-delay: -9s;
}

.motion-dot:nth-child(11) {
  top: 44%;
  left: 56%;
  animation-duration: 20s;
  animation-delay: -10s;
}

.motion-dot:nth-child(12) {
  top: 88%;
  left: 68%;
  width: 4px;
  height: 4px;
  animation-duration: 26s;
  animation-delay: -11s;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(9, 17, 26, 0.72);
  border-bottom: 1px solid rgba(126, 231, 135, 0.08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.brand {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2rem;
  align-items: stretch;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

.hero-copy {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  right: -40px;
  top: -40px;
  background: radial-gradient(circle, rgba(126, 231, 135, 0.2), transparent 70%);
}

.hero-copy > *,
.hero-card > *,
.card > *,
.contact-card > * {
  transform: translateZ(24px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.98;
  margin-bottom: 1rem;
  max-width: 10ch;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #071018;
}

.button-secondary {
  color: var(--text);
  border: 1px solid rgba(236, 247, 242, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.button:hover,
.button-secondary:hover,
.button:focus-visible,
.button-secondary:focus-visible {
  transform: translateY(-2px);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat strong {
  display: block;
  font-size: 1.3rem;
  color: var(--warm);
  margin-bottom: 0.3rem;
}

.hero-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.terminal {
  border-radius: 20px;
  background: #061019;
  border: 1px solid rgba(126, 231, 135, 0.15);
  overflow: hidden;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(126, 231, 135, 0.1);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.dot:first-child {
  background: #ff6b6b;
}

.dot:nth-child(2) {
  background: #f5c76b;
}

.dot:nth-child(3) {
  background: #7ee787;
}

.terminal-body {
  padding: 1rem;
  font-family: Consolas, "Courier New", monospace;
  color: #b9f6c0;
  font-size: 0.95rem;
}

.terminal-body p {
  margin-bottom: 0.75rem;
}

.terminal-body span {
  color: #7ee787;
}

.focus-box {
  padding: 1.2rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(126, 231, 135, 0.08), rgba(126, 231, 135, 0.02));
  border: 1px solid rgba(126, 231, 135, 0.14);
}

section {
  padding: 1.5rem 0 3rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head p {
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 0;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1.25rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 1.5rem;
  border-radius: 22px;
  background: rgba(13, 25, 36, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--muted);
  margin-bottom: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.tag {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text);
  background: rgba(126, 231, 135, 0.08);
  border: 1px solid rgba(126, 231, 135, 0.14);
}

.timeline-item + .timeline-item {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-item small {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(245, 199, 107, 0.14), transparent 70%);
  transform: rotate(20deg);
}

.tilt-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  will-change: transform;
}

.tilt-card:hover {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  border-color: rgba(126, 231, 135, 0.26);
}

.type-click {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.typing-active {
  position: relative;
}

.contact {
  padding-bottom: 5rem;
}

.contact-card {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: center;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1rem;
}

.contact-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.contact-note {
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(126, 231, 135, 0.14);
  background: rgba(126, 231, 135, 0.05);
}

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

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

.terminal,
.focus-box,
.contact-note {
  transform: translateZ(28px);
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(18px, -28px, 0) scale(1.08);
  }
}

@keyframes floatDot {
  0% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0.25;
  }

  25% {
    transform: translate3d(18px, -22px, 0) scale(1.2);
    opacity: 0.9;
  }

  50% {
    transform: translate3d(-14px, -44px, 0) scale(0.95);
    opacity: 0.5;
  }

  75% {
    transform: translate3d(24px, -12px, 0) scale(1.1);
    opacity: 0.85;
  }

  100% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0.25;
  }
}

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

  .grid-2,
  .quick-stats {
    grid-template-columns: 1fr;
  }

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

  .tilt-card {
    transform: none !important;
  }
}

@media (max-width: 600px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero-copy,
  .hero-card,
  .card,
  .contact-card {
    padding: 1.2rem;
  }

  h1 {
    max-width: none;
  }
}
