:root {
  color-scheme: light;
  --bg: #0b0d12;
  --card: #151922;
  --text: #f4f7ff;
  --muted: #a4adbf;
  --accent: #6fe3ff;
  --accent-strong: #7c7cff;
  --tag: #262c3a;
  --outline: rgba(255, 255, 255, 0.08);
  --glow: rgba(111, 227, 255, 0.18);
}

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

body {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #131826 0%, #0b0d12 55%);
  color: var(--text);
  line-height: 1.6;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 8vw;
  border-bottom: 1px solid var(--outline);
  position: sticky;
  top: 0;
  background: rgba(11, 13, 18, 0.95);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 600;
  position: relative;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--accent);
}

.site-nav a.active::after,
.site-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
}

main {
  padding: 2rem 8vw 4rem;
  position: relative;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: 0.35;
  mask-image: radial-gradient(circle at 20% 10%, #000 0%, transparent 60%);
  pointer-events: none;
  animation: grid-shift 18s linear infinite;
}

.floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floater {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 227, 255, 0.25), transparent 70%);
  filter: blur(4px);
  animation: float 12s ease-in-out infinite;
}

.floater:nth-child(1) {
  top: -40px;
  right: 10%;
}

.floater:nth-child(2) {
  bottom: 20%;
  left: -60px;
  width: 260px;
  height: 260px;
  animation-delay: -4s;
}

.floater:nth-child(3) {
  top: 55%;
  right: -80px;
  width: 180px;
  height: 180px;
  animation-delay: -7s;
}

.hero {
  max-width: 780px;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(111, 227, 255, 0.08);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 1rem;
  border: 1px solid rgba(111, 227, 255, 0.2);
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-stats {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.hero-stats div {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgba(21, 25, 34, 0.65);
  border: 1px solid var(--outline);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.hero-stats h3 {
  font-size: 1.6rem;
  margin-bottom: 0.2rem;
  color: var(--accent);
}

.hero-stats p {
  color: var(--muted);
  font-size: 0.95rem;
}

.signal-strip {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.signal-strip span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: signal 2.4s ease-in-out infinite;
}

.signal-strip span:nth-child(2) {
  animation-delay: 0.4s;
}

.signal-strip span:nth-child(3) {
  animation-delay: 0.8s;
}

.signal-strip span:nth-child(4) {
  animation-delay: 1.2s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #06070b;
  box-shadow: 0 10px 24px var(--glow);
}

.btn.ghost {
  color: var(--accent);
  border-color: rgba(111, 227, 255, 0.35);
  background: rgba(111, 227, 255, 0.08);
}

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

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

.project-card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--outline);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(111, 227, 255, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-card:hover::after {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.project-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.2rem;
  position: relative;
  z-index: 1;
}

.project-card p {
  color: var(--muted);
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.project-index {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.project-status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.tags li {
  background: var(--tag);
  color: var(--accent);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.card-glow {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(124, 124, 255, 0.2), transparent 70%);
  filter: blur(2px);
  z-index: 0;
  animation: pulse 5s ease-in-out infinite;
}

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

.about-grid > div {
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(21, 25, 34, 0.7);
  border: 1px solid var(--outline);
}

.about-grid h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.about-grid p {
  color: var(--muted);
}

.timeline {
  margin-top: 3rem;
  padding: 1.8rem;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(111, 227, 255, 0.08), rgba(124, 124, 255, 0.1));
  border: 1px solid rgba(111, 227, 255, 0.2);
}

.timeline h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.timeline ol {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  counter-reset: step;
}

.timeline li {
  counter-increment: step;
  padding-left: 2.4rem;
  position: relative;
  color: var(--muted);
}

.timeline li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(11, 13, 18, 0.7);
  border: 1px solid rgba(111, 227, 255, 0.4);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.wave-panel {
  margin-top: 3.5rem;
  padding: 2rem;
  border-radius: 20px;
  background: rgba(21, 25, 34, 0.75);
  border: 1px solid var(--outline);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.wave-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(111, 227, 255, 0.15), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

.wave-panel h2 {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.wave-panel p {
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.wave-graph {
  position: relative;
  height: 160px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(111, 227, 255, 0.12), rgba(124, 124, 255, 0.08));
  border: 1px solid rgba(111, 227, 255, 0.2);
  overflow: hidden;
  z-index: 1;
}

.wave-graph span {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.15) 2px,
    transparent 2px,
    transparent 16px
  );
  animation: scan 4s linear infinite;
}

.wave-graph span:nth-child(2) {
  background: linear-gradient(180deg, transparent 30%, rgba(111, 227, 255, 0.4) 60%, transparent 70%);
  animation: wave 3.2s ease-in-out infinite;
}

.wave-graph span:nth-child(3) {
  background: linear-gradient(180deg, transparent 10%, rgba(124, 124, 255, 0.5) 40%, transparent 80%);
  animation: wave 4s ease-in-out infinite reverse;
}

@keyframes grid-shift {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-70px);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(18px) scale(1.05);
  }
}

@keyframes signal {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes scan {
  0% {
    transform: translateX(-30%);
  }
  100% {
    transform: translateX(30%);
  }
}

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

.site-footer {
  border-top: 1px solid var(--outline);
  padding: 1.5rem 8vw 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .site-nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
}
