:root {
  --bg: #02070d;
  --bg-soft: rgba(6, 16, 28, 0.9);
  --panel: rgba(6, 16, 28, 0.72);
  --panel-strong: rgba(7, 18, 32, 0.92);
  --line: rgba(56, 146, 255, 0.3);
  --line-strong: rgba(86, 177, 255, 0.82);
  --text: #dbeeff;
  --muted: #7b93ad;
  --blue: #2f81ff;
  --blue-2: #58c2ff;
  --blue-3: #8fe0ff;
  --shadow: 0 0 30px rgba(47, 129, 255, 0.16);
  --shadow-lg: 0 18px 70px rgba(0, 0, 0, 0.55);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Mono", monospace;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bg-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

#matrixCanvas,
.noise-layer,
.scanline-layer,
.grid-layer {
  position: absolute;
  inset: 0;
}

#matrixCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.18;
}

.noise-layer {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(88, 194, 255, 0.3), transparent 14%),
    radial-gradient(circle at 80% 10%, rgba(47, 129, 255, 0.22), transparent 18%),
    radial-gradient(circle at 50% 80%, rgba(143, 224, 255, 0.2), transparent 22%);
  filter: blur(48px);
}

.grid-layer {
  background-image:
    linear-gradient(rgba(72, 139, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 139, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent);
  opacity: 0.2;
}

.scanline-layer {
  background: linear-gradient(
    180deg,
    transparent 0,
    rgba(88, 194, 255, 0.06) 50%,
    transparent 100%
  );
  background-size: 100% 4px;
  animation: scanline 7s linear infinite;
  opacity: 0.18;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 60px;
}

.top-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 92px;
  font-size: 0.95rem;
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  position: relative;
  display: inline-block;
  overflow: hidden;
  color: var(--muted);
  min-width: 170px;
}

.nav-link--active {
  color: var(--blue-2);
}

.nav-default,
.nav-hover {
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease;
}

.nav-hover {
  position: absolute;
  inset: 0;
  transform: translateY(120%);
  color: var(--blue-3);
}

.nav-link:hover .nav-default {
  transform: translateY(-120%);
}

.nav-link:hover .nav-hover {
  transform: translateY(0);
}

.brand {
  color: var(--blue);
  font-size: 2rem;
  text-shadow: 0 0 20px rgba(47, 129, 255, 0.5);
  animation: brandPulse 2.2s ease-in-out infinite;
}

.hero-section,
.main-section {
  position: relative;
  z-index: 1;
  margin-bottom: 132px;
}

.terminal-shell {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto 78px;
}

.site-terminal {
  border: 1px solid rgba(86, 177, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(5, 13, 24, 0.96), rgba(3, 9, 16, 0.98));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.site-terminal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(86, 177, 255, 0.18);
  background: rgba(8, 20, 34, 0.92);
}

.site-terminal__lights {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-terminal__lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(143, 224, 255, 0.5);
}

.site-terminal__lights span:nth-child(2) {
  background: rgba(88, 194, 255, 0.72);
}

.site-terminal__lights span:nth-child(3) {
  background: rgba(47, 129, 255, 0.78);
}

.site-terminal__title {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.site-terminal__body {
  padding: 18px;
}

.site-terminal__output {
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 8px;
}

.site-terminal__output p {
  margin: 0 0 10px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.site-terminal__output p:last-child {
  margin-bottom: 0;
}

.site-terminal__form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(86, 177, 255, 0.14);
}

.site-terminal__prompt,
.terminal-accent,
.terminal-muted {
  font-weight: 700;
}

.site-terminal__prompt {
  color: var(--blue-2);
  flex: 0 0 auto;
}

.site-terminal__input {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
}

.site-terminal__input::placeholder {
  color: rgba(123, 147, 173, 0.66);
}

.terminal-muted {
  color: var(--muted);
}

.terminal-accent {
  color: var(--blue-2);
}

.hero-copy {
  max-width: 1020px;
  margin: 0 auto;
}

.glitch-container {
  position: relative;
  animation: textShadow 1.6s infinite;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  opacity: 0.84;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(3rem, 10vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-title-line {
  display: inline-block;
}

.hero-subtitle {
  margin: 0 0 44px;
  color: var(--blue-2);
  font-size: clamp(1rem, 2.2vw, 1.32rem);
  min-height: 1.8em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 12px;
}

.stat-card,
.info-card,
.list-card,
.timeline-card,
.cert-card,
.project-list-card,
.featured-project,
.highlight-section {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 16, 28, 0.76), rgba(3, 10, 18, 0.92));
  box-shadow: var(--shadow-lg);
}

.stat-card {
  padding: 20px;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover,
.info-card:hover,
.list-card:hover,
.timeline-card:hover,
.cert-card:hover,
.project-list-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(47, 129, 255, 0.16);
}

.icon-wrap {
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  color: var(--blue);
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue-2);
  font-size: 2rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.stats-disclaimer {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cta-row,
.social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.cta-row {
  margin-bottom: 24px;
}

.terminal-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 50px;
  padding: 0 22px;
  color: var(--blue-2);
  transition: color 0.3s ease;
}

.terminal-button span:nth-child(1),
.terminal-button span:nth-child(2) {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.terminal-button span:nth-child(2) {
  transform: translate(6px, 6px);
  opacity: 0.48;
}

.terminal-button:hover {
  color: #041019;
}

.terminal-button:hover span:nth-child(1),
.terminal-button:hover span:nth-child(2) {
  background: var(--blue-2);
}

.terminal-button:hover span:nth-child(2) {
  transform: translate(0, 0);
}

.button-text {
  position: relative;
  z-index: 1;
}

.terminal-button--small {
  min-width: 170px;
  min-height: 46px;
  margin-top: 14px;
}

.social-link {
  position: relative;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  border: 1px solid var(--line-strong);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.social-link:hover {
  background: rgba(47, 129, 255, 0.12);
  color: var(--blue-3);
  box-shadow: var(--shadow);
}

.section-title {
  margin: 0 0 52px;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text);
  word-break: break-word;
}

.featured-project {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px;
}

.featured-visual {
  position: relative;
  min-height: 0;
  max-width: 300px;
}

.project-shot {
  position: relative;
  width: 100%;
  aspect-ratio: 472 / 644;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(8, 22, 40, 0.95), rgba(3, 8, 15, 1));
  box-shadow: 0 0 26px rgba(47, 129, 255, 0.12);
}

.project-shot__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  background: #081321;
}

.screen-overlay,
.screen-grid,
.screen-content {
  position: absolute;
  inset: 0;
}

.screen-overlay {
  background: linear-gradient(180deg, transparent, rgba(88, 194, 255, 0.06), transparent);
  animation: visualScan 4.4s linear infinite;
}

.screen-grid {
  background-image:
    linear-gradient(rgba(88, 194, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 194, 255, 0.08) 1px, transparent 1px);
  background-size: 38px 38px;
}

.screen-content {
  padding: 20px;
}

.screen-window {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.screen-window span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(143, 224, 255, 0.6);
}

.screen-window span:nth-child(2) {
  background: rgba(88, 194, 255, 0.7);
}

.screen-window span:nth-child(3) {
  background: rgba(47, 129, 255, 0.74);
}

.screen-lines {
  display: grid;
  gap: 18px;
}

.screen-lines span {
  display: block;
  height: 12px;
  background: linear-gradient(90deg, rgba(143, 224, 255, 0.6), transparent);
}

.screen-lines span:nth-child(1) {
  width: 62%;
}

.screen-lines span:nth-child(2) {
  width: 84%;
}

.screen-lines span:nth-child(3) {
  width: 44%;
}

.screen-lines span:nth-child(4) {
  width: 72%;
}

.featured-copy h3 {
  margin: 0 0 18px;
  color: var(--blue-2);
  font-size: clamp(2rem, 4vw, 3rem);
}

.featured-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.project-description {
  display: grid;
  gap: 12px;
}

.project-description__line {
  margin: 0;
}

.project-description__line--sys {
  color: var(--text);
}

.tech-stack {
  margin-top: 28px;
}

.tech-stack h4,
.project-role,
.section-index,
.about-column h3,
.secondary-column h3 {
  margin: 0 0 16px;
  color: var(--blue);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row span {
  padding: 8px 12px;
  border: 1px solid rgba(88, 194, 255, 0.38);
  color: var(--blue-2);
  font-size: 0.88rem;
}

.project-role {
  margin-top: 24px;
  font-weight: 700;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}

.carousel-button {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--line-strong);
  transition: background 0.3s ease, color 0.3s ease;
}

.carousel-button:hover {
  background: var(--blue);
  color: #03111e;
}

.progress-track {
  width: min(220px, 48vw);
  height: 6px;
  background: rgba(120, 144, 170, 0.22);
  overflow: hidden;
}

.progress-fill {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-3));
  transition: width 0.3s ease;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}

.carousel-button {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--line-strong);
  transition: background 0.3s ease, color 0.3s ease;
}

.carousel-button:hover {
  background: var(--blue);
  color: #03111e;
}

.progress-track {
  width: min(220px, 48vw);
  height: 6px;
  background: rgba(120, 144, 170, 0.22);
  overflow: hidden;
}

.progress-fill {
  width: 33.33%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-3));
  transition: width 0.3s ease;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.info-card,
.list-card,
.timeline-card,
.cert-card,
.project-list-card {
  padding: 22px;
}

.info-card h3,
.highlight-points h3,
.list-card h4,
.project-list-card h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1rem;
}

.info-card p,
.highlight-copy p,
.highlight-points p,
.list-card p,
.timeline-card p,
.cert-card span,
.project-list-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.highlight-section {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px;
}

.highlight-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.accent {
  color: var(--blue-2);
}

.highlight-points {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.highlight-points > div {
  padding: 18px;
  border: 1px solid rgba(88, 194, 255, 0.24);
  background: rgba(5, 14, 24, 0.68);
}

.highlight-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.radar-frame {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border: 1px solid rgba(88, 194, 255, 0.25);
  background:
    linear-gradient(180deg, rgba(6, 16, 28, 0.86), rgba(3, 10, 18, 0.96));
  overflow: hidden;
}

.radar-ring {
  position: absolute;
  border: 1px solid rgba(88, 194, 255, 0.18);
  border-radius: 50%;
  inset: 50%;
  transform: translate(-50%, -50%);
}

.radar-ring--1 {
  width: 88%;
  height: 88%;
}

.radar-ring--2 {
  width: 60%;
  height: 60%;
}

.radar-ring--3 {
  width: 32%;
  height: 32%;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, rgba(88, 194, 255, 0.2), transparent 20%);
  transform-origin: center;
  animation: rotateSweep 4s linear infinite;
}

.radar-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-3);
  box-shadow: 0 0 16px rgba(143, 224, 255, 0.75);
  animation: nodePulse 1.6s ease-in-out infinite;
}

.radar-node--1 {
  top: 26%;
  left: 62%;
}

.radar-node--2 {
  top: 58%;
  left: 28%;
}

.radar-node--3 {
  top: 42%;
  left: 74%;
}

.radar-node--4 {
  top: 72%;
  left: 58%;
}

.about-layout,
.secondary-layout {
  display: grid;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

.about-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 26px;
}

.secondary-layout {
  grid-template-columns: 1.1fr 0.9fr;
}

.about-column,
.secondary-column {
  display: grid;
  gap: 16px;
}

.timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.timeline-head strong,
.cert-card strong {
  color: var(--text);
}

.timeline-head span {
  color: var(--muted);
  font-size: 0.85rem;
}

.cert-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
}

.channel-card {
  position: relative;
  width: 132px;
  height: 132px;
}

.channel-orbit,
.channel-core {
  position: absolute;
  border-radius: 50%;
}

.channel-orbit {
  inset: 0;
  border: 1px solid rgba(88, 194, 255, 0.44);
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: spinOrbit 10s linear infinite;
}

.channel-core {
  inset: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(88, 194, 255, 0.64);
  color: var(--blue-2);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.channel-core svg {
  width: 34px;
  height: 34px;
}

.channel-card:hover .channel-orbit {
  opacity: 1;
}

.channel-card:hover .channel-core {
  background: var(--blue);
  color: #041019;
  box-shadow: 0 0 20px rgba(47, 129, 255, 0.2);
}

.site-footer {
  padding-bottom: 18px;
  color: rgba(91, 140, 196, 0.7);
  text-align: center;
}

.footer-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-line svg {
  width: 18px;
  height: 18px;
}

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

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

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes brandPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes visualScan {
  0% {
    transform: translateY(-120%);
  }
  100% {
    transform: translateY(120%);
  }
}

@keyframes rotateSweep {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

@keyframes spinOrbit {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes textShadow {
  0% {
    text-shadow:
      0.44px 0 1px rgba(47, 129, 255, 0.55),
      -0.44px 0 1px rgba(143, 224, 255, 0.35),
      0 0 3px rgba(47, 129, 255, 0.22);
  }
  20% {
    text-shadow:
      2.4px 0 1px rgba(47, 129, 255, 0.55),
      -2.4px 0 1px rgba(143, 224, 255, 0.35),
      0 0 3px rgba(47, 129, 255, 0.22);
  }
  40% {
    text-shadow:
      0.1px 0 1px rgba(47, 129, 255, 0.55),
      -0.1px 0 1px rgba(143, 224, 255, 0.35),
      0 0 3px rgba(47, 129, 255, 0.22);
  }
  60% {
    text-shadow:
      3px 0 1px rgba(47, 129, 255, 0.55),
      -3px 0 1px rgba(143, 224, 255, 0.35),
      0 0 3px rgba(47, 129, 255, 0.22);
  }
  80% {
    text-shadow:
      1px 0 1px rgba(47, 129, 255, 0.55),
      -1px 0 1px rgba(143, 224, 255, 0.35),
      0 0 3px rgba(47, 129, 255, 0.22);
  }
  100% {
    text-shadow:
      0.44px 0 1px rgba(47, 129, 255, 0.55),
      -0.44px 0 1px rgba(143, 224, 255, 0.35),
      0 0 3px rgba(47, 129, 255, 0.22);
  }
}

@media (max-width: 1100px) {
  .stats-grid,
  .capabilities-grid,
  .about-layout,
  .secondary-layout,
  .featured-project,
  .highlight-section {
    grid-template-columns: 1fr 1fr;
  }

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

  .featured-project,
  .highlight-section {
    gap: 28px;
  }
}

@media (max-width: 820px) {
  .site-shell {
    width: calc(100% - 24px);
    padding-top: 22px;
  }

  .top-nav {
    flex-direction: column;
    gap: 18px;
    margin-bottom: 60px;
  }

  .nav-cluster {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
  }

  .nav-link {
    min-width: auto;
    text-align: center;
  }

  .hero-section,
  .main-section {
    margin-bottom: 92px;
  }

  .terminal-shell {
    margin-bottom: 56px;
  }

  .stats-grid,
  .featured-project,
  .capabilities-grid,
  .highlight-section,
  .about-layout,
  .secondary-layout {
    grid-template-columns: 1fr;
  }

  .featured-project,
  .highlight-section {
    padding: 22px;
  }

  .featured-visual {
    max-width: 100%;
  }

  .channel-grid {
    gap: 18px;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 1.45rem;
  }

  .hero-title {
    font-size: 2.55rem;
  }

  .site-terminal__head,
  .site-terminal__form {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-terminal__output {
    min-height: 200px;
  }

  .stats-grid {
    gap: 12px;
  }

  .stat-card,
  .info-card,
  .list-card,
  .timeline-card,
  .cert-card,
  .project-list-card {
    padding: 18px;
  }

  .cert-grid {
    grid-template-columns: 1fr;
  }

  .channel-card {
    width: 108px;
    height: 108px;
  }
}
