:root {
  color-scheme: dark;
  --bg: #050912;
  --bg-soft: #0a1220;
  --panel: rgba(9, 18, 31, 0.82);
  --panel-strong: rgba(10, 19, 35, 0.94);
  --line: rgba(144, 211, 255, 0.24);
  --line-bright: rgba(116, 207, 255, 0.48);
  --text: #eef7ff;
  --muted: #a9bdd0;
  --green: #76d8ff;
  --cyan: #8adfff;
  --amber: #ff365f;
  --ember: #ff5ba8;
  --ice: #d7f3ff;
  --crimson: #ff254f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100vw;
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(118, 216, 255, 0.15), transparent 28rem),
    radial-gradient(circle at 85% 12%, rgba(255, 37, 79, 0.1), transparent 24rem),
    linear-gradient(135deg, #050912 0%, #07101d 52%, #120714 100%);
  color: var(--text);
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
}

#stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  background: var(--bg);
}

.page-shell {
  position: relative;
  max-width: 100vw;
  overflow: hidden;
}

.page-shell::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(118, 216, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 54, 95, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 72%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(14px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(118, 216, 255, 0.22), rgba(255, 37, 79, 0.14));
  color: var(--green);
  font-size: 0.78rem;
  box-shadow: 0 0 26px rgba(118, 216, 255, 0.18);
}

.nav-links {
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(237, 247, 232, 0.09);
  border-radius: 8px;
  background: rgba(6, 7, 6, 0.48);
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a:hover {
  background: rgba(118, 216, 255, 0.12);
  color: var(--text);
}

.section-band {
  border-top: 1px solid rgba(237, 247, 232, 0.07);
  border-bottom: 1px solid rgba(237, 247, 232, 0.07);
  background: linear-gradient(180deg, rgba(13, 18, 12, 0.2), rgba(6, 7, 6, 0.48));
}

.section-wrap,
.hero-grid {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  align-items: center;
  padding: 72px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.58fr);
  gap: 48px;
  align-items: center;
}

.hero-copy,
.signal-panel,
.project-card,
.intro-stat,
.stack-list article {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  color: #ffffff;
  font-size: clamp(4.2rem, 9vw, 7.8rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 22px rgba(118, 216, 255, 0.32),
    0 0 34px rgba(255, 37, 79, 0.16),
    0 12px 60px rgba(0, 0, 0, 0.72);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.hero-lede {
  max-width: 760px;
  color: #dce8d6;
  font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  line-height: 1.6;
}

.hero-actions,
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
}

.button {
  padding: 0 18px;
  border: 1px solid transparent;
}

.button-primary {
  background: linear-gradient(135deg, var(--ice), var(--green) 55%, var(--crimson));
  color: #06101b;
  box-shadow: 0 12px 36px rgba(118, 216, 255, 0.18);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(5, 9, 18, 0.48);
  color: var(--text);
}

.button:hover,
.project-links a:hover {
  transform: translateY(-2px);
}

.signal-panel,
.profile-card,
.project-card,
.intro-stat,
.stack-list article,
.contact-section,
.repo-row {
  border: 1px solid rgba(237, 247, 232, 0.12);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.signal-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.signal-panel::after {
  position: absolute;
  inset: auto -16% -42% 10%;
  height: 190px;
  content: "";
  background: radial-gradient(circle, rgba(255, 37, 79, 0.18), transparent 68%);
}

.hero-side {
  display: grid;
  gap: 16px;
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  background:
    radial-gradient(circle at 28% 12%, rgba(215, 243, 255, 0.16), transparent 32%),
    radial-gradient(circle at 76% 64%, rgba(255, 37, 79, 0.2), transparent 34%),
    rgba(9, 18, 31, 0.84);
}

.profile-card::before {
  position: absolute;
  inset: -30% auto auto -14%;
  width: 190px;
  height: 190px;
  content: "";
  background: radial-gradient(circle, rgba(118, 216, 255, 0.24), transparent 68%);
}

.profile-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(144, 211, 255, 0.26);
  border-radius: 8px;
  aspect-ratio: 1;
  background: #09121f;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 42px rgba(255, 37, 79, 0.14),
    0 0 72px rgba(118, 216, 255, 0.12);
}

.profile-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(215, 243, 255, 0.18), transparent 28%),
    radial-gradient(circle at 68% 36%, rgba(255, 37, 79, 0.24), transparent 20%);
  mix-blend-mode: screen;
}

.profile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-caption {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--ice);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 0 0 rgba(255, 37, 79, 0.58);
  animation: pulse 1.8s infinite;
}

.signal-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  margin: 0;
}

.signal-list div {
  padding-left: 16px;
  border-left: 2px solid var(--line-bright);
}

.signal-list dt {
  margin-bottom: 4px;
  font-weight: 800;
}

.signal-list dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.intro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 28px 0 76px;
}

.intro-stat {
  padding: 20px;
  background: rgba(9, 18, 31, 0.68);
}

.intro-stat strong {
  display: block;
  margin-bottom: 8px;
  color: var(--amber);
}

.intro-stat span,
.project-card p,
.stack-list p,
.contact-section p {
  color: var(--muted);
  line-height: 1.65;
}

.projects-section {
  padding: 24px 0 88px;
}

.repo-section {
  padding: 0 0 88px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

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

.project-card {
  min-height: 360px;
  padding: 26px;
  background:
    linear-gradient(150deg, rgba(118, 216, 255, 0.08), transparent 44%),
    var(--panel-strong);
}

.project-card:hover {
  border-color: var(--line-bright);
}

.project-featured {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  background:
    radial-gradient(circle at 28% 18%, rgba(118, 216, 255, 0.2), transparent 18rem),
    radial-gradient(circle at 80% 76%, rgba(255, 37, 79, 0.17), transparent 17rem),
    var(--panel-strong);
}

.project-kicker {
  margin-bottom: 14px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.tag-list li {
  padding: 7px 9px;
  border: 1px solid rgba(237, 247, 232, 0.1);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.44);
  color: #d9efff;
  font-size: 0.82rem;
}

.project-links a {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(118, 216, 255, 0.08);
  color: var(--text);
}

.repo-tracker {
  display: grid;
  gap: 12px;
}

.repo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(118, 216, 255, 0.09), transparent 40%),
    rgba(9, 18, 31, 0.76);
}

.repo-row:hover {
  border-color: var(--line-bright);
}

.repo-rank {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.repo-row h3 {
  margin-bottom: 8px;
}

.repo-row h3 a:hover {
  color: var(--ice);
}

.repo-row p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 320px;
}

.repo-meta span {
  padding: 7px 9px;
  border: 1px solid rgba(237, 247, 232, 0.1);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.44);
  color: #d9efff;
  font-size: 0.8rem;
  white-space: nowrap;
}

.stack-section {
  padding: 82px 0;
}

.stack-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 34px;
}

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

.stack-list article {
  padding: 22px;
  background: rgba(9, 18, 31, 0.72);
}

.stack-list span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--ember);
  font-weight: 900;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 88px;
  margin-bottom: 80px;
  padding: 30px;
}

.contact-section > div {
  max-width: 720px;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(255, 37, 79, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 37, 79, 0);
  }
}

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

  .nav-links {
    gap: 0;
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    flex: 1;
    min-width: 0;
    padding-right: 4px;
    padding-left: 4px;
    text-align: center;
  }

  .hero {
    min-height: auto;
    padding: 56px 0;
  }

  .hero-grid,
  .hero-side,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .intro,
  .project-grid,
  .stack-list,
  .repo-row {
    grid-template-columns: 1fr;
  }

  .repo-meta {
    justify-content: flex-start;
    max-width: none;
  }

  .project-featured {
    grid-row: auto;
    min-height: 390px;
  }

  .contact-section {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .section-wrap,
  .hero-grid,
  .site-header {
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
  }

  .nav-links a {
    padding: 8px 9px;
    font-size: 0.84rem;
  }

  h1 {
    font-size: clamp(2.6rem, 13.8vw, 3.35rem);
  }

  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .hero-lede {
    font-size: 0.98rem;
  }

  .signal-list dd {
    font-size: 0.95rem;
  }

  .signal-panel,
  .profile-card,
  .project-card,
  .intro-stat,
  .stack-list article,
  .contact-section {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
