:root {
  --bg: #05070d;
  --surface: #0b1220;
  --surface-2: #0f1a2b;
  --ink: #eaf2ff;
  --muted: #98a6bd;
  --accent: #38f2ff;
  --accent-2: #7cff6b;
  --line: rgba(234, 242, 255, 0.08);
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  --hover-glow: 0 18px 40px rgba(56, 242, 255, 0.18), 0 0 24px rgba(124, 255, 107, 0.12);
  --radius: 20px;
  font-family: "Space Mono", "Courier New", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 15%, rgba(56, 242, 255, 0.05), transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(124, 255, 107, 0.04), transparent 45%),
    var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

h1,
h2,
h3 {
  font-family: "Orbitron", "Arial Black", sans-serif;
  letter-spacing: 0.04em;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.2;
  pointer-events: none;
  z-index: -3;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(56, 242, 255, 0.2), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(124, 255, 107, 0.15), transparent 50%),
    radial-gradient(circle at 60% 70%, rgba(255, 138, 76, 0.12), transparent 60%);
  pointer-events: none;
  z-index: -2;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 7vw 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 1.1rem;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(56, 242, 255, 0.6);
}

.brand-text {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--muted);
}

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

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-links a:hover::after {
  opacity: 1;
}

.intro {
  padding-bottom: 80px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 0.8fr);
  gap: 32px;
  padding: 30px 7vw 0;
  align-items: stretch;
}

.profile-card {
  background: linear-gradient(135deg, rgba(15, 26, 43, 0.9), rgba(11, 18, 32, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 38px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: -40% 0 0 -40%;
  background: radial-gradient(circle, rgba(56, 242, 255, 0.12), transparent 55%);
  opacity: 0.6;
  animation: drift 12s linear infinite;
  pointer-events: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.65rem;
  color: var(--muted);
}

.profile-card h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 1;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(56, 242, 255, 0.5);
}

.lead {
  color: var(--muted);
  max-width: 520px;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #05070d;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  box-shadow: 0 0 24px rgba(56, 242, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(56, 242, 255, 0.45), 0 0 18px rgba(124, 255, 107, 0.25);
}

.btn.ghost:hover {
  border-color: rgba(56, 242, 255, 0.5);
  color: var(--accent);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-2);
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.stack {
  display: grid;
  gap: 20px;
}

.stack-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stack-card h2 {
  font-size: 1.7rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  width: fit-content;
}

.terminal-card {
  background: #060911;
  border: 1px solid rgba(56, 242, 255, 0.25);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(56, 242, 255, 0.12);
  animation: pulse 6s ease-in-out infinite;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0c1220;
  border-bottom: 1px solid rgba(56, 242, 255, 0.12);
}

.terminal-title {
  margin-left: auto;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f56;
}

.dot.yellow {
  background: #ffbd2e;
}

.dot.green {
  background: #27c93f;
}

.terminal-body {
  padding: 18px;
  display: grid;
  gap: 8px;
  color: #b7f7ff;
  font-size: 0.9rem;
}

.prompt {
  color: var(--accent-2);
  margin-right: 6px;
  animation: blink 1.2s steps(2, start) infinite;
}

.terminal-line {
  color: rgba(234, 242, 255, 0.85);
}

main {
  padding: 0 7vw 80px;
}

.panel {
  margin-bottom: 70px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
}

.panel-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.panel-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.panel-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: start;
}

.about-text {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.about-notes {
  display: grid;
  gap: 14px;
}

.note {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  gap: 8px;
}

.note span {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6rem;
  color: var(--muted);
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.repo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.repo-card h3 {
  font-size: 1.4rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.repo-card:hover,
.skills-grid article:hover,
.contact-card:hover,
.stack-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(56, 242, 255, 0.45);
  box-shadow: var(--hover-glow);
}

.repo-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--accent-2);
  text-shadow: 0 0 12px rgba(56, 242, 255, 0.4);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skills-grid article {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 12px;
  background-image: linear-gradient(135deg, rgba(16, 25, 40, 0.9), rgba(9, 14, 24, 0.95));
}

.contact-value {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.footer {
  padding: 30px 7vw 60px;
  color: var(--muted);
  font-size: 0.85rem;
}

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

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

@keyframes drift {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20%, 10%);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(56, 242, 255, 0.12);
  }
  50% {
    box-shadow: 0 0 30px rgba(56, 242, 255, 0.25);
  }
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 960px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .panel-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .panel-head {
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .nav {
    padding: 24px 6vw 10px;
  }

  .intro-grid {
    padding: 24px 6vw 0;
  }

  main {
    padding: 0 6vw 60px;
  }

  .profile-card {
    padding: 28px 24px;
  }

  .profile-card h1 {
    font-size: clamp(2.1rem, 9vw, 3.2rem);
  }

  .panel-head h2 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .terminal-title {
    display: none;
  }

  .repo-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
