:root {
  --bg: #05070c;
  --bg-soft: #09111f;
  --panel: rgba(13, 25, 43, 0.82);
  --panel-strong: rgba(17, 33, 56, 0.96);
  --text: #e8f1ff;
  --muted: #8da1bd;
  --faint: #53657e;
  --line: rgba(112, 177, 255, 0.18);
  --cyan: #4ee7ff;
  --blue: #6ea8ff;
  --green: #7cffb2;
  --orange: #ffbf69;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(78, 231, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 80% 20%, rgba(110, 168, 255, 0.14), transparent 28rem),
    linear-gradient(135deg, #05070c 0%, #09101d 48%, #05070c 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 64px);
  background: rgba(5, 7, 12, 0.74);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(78, 231, 255, 0.5);
  border-radius: 12px;
  background: rgba(78, 231, 255, 0.08);
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  box-shadow: 0 0 24px rgba(78, 231, 255, 0.12);
}

.brand-text {
  color: var(--muted);
  font-size: 0.94rem;
}

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

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 160ms ease;
}

.nav a:hover {
  color: var(--cyan);
}

.section-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0;
}

.hero {
  min-height: calc(100vh - 77px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.88fr);
  align-items: center;
  gap: clamp(36px, 6vw, 72px);
}

.eyebrow,
.section-kicker,
.project-label,
.timeline-date {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 780px;
  margin-top: 18px;
  font-size: clamp(2rem, 8vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
}

h3 {
  font-size: 1.25rem;
}

.hero-copy {
  max-width: 660px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.button.primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #06101d;
}

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

.button.secondary:hover {
  border-color: rgba(78, 231, 255, 0.55);
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.signal-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.03);
}

.hero-card {
  position: relative;
  display: grid;
  gap: 18px;
}

.portrait-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(78, 231, 255, 0.28);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 7, 12, 0.45), transparent 55%);
}

.portrait-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 24%;
  filter: grayscale(12%) contrast(1.05);
}

.terminal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 10, 18, 0.88);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
}

.terminal-top span:nth-child(1) { background: #ff6b6b; }
.terminal-top span:nth-child(2) { background: #ffd166; }
.terminal-top span:nth-child(3) { background: #7cffb2; }

pre {
  padding: 18px;
  overflow: auto;
}

code {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
}

.split-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(28px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.section-copy {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-copy p + p {
  margin-top: 18px;
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading h2,
.split-section h2,
.contact-section h2 {
  margin-top: 10px;
}

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

.stack-card,
.project-card,
.timeline-item,
.contact-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.stack-card {
  min-height: 230px;
  padding: 24px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.stack-card:hover,
.project-card:hover,
.timeline-item:hover {
  transform: translateY(-3px);
  border-color: rgba(78, 231, 255, 0.48);
  background: var(--panel-strong);
}

.card-number {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.stack-card p,
.project-card p,
.timeline-item p,
.contact-section p {
  margin-top: 12px;
  color: var(--muted);
}

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

.project-card {
  padding: 26px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.project-card.featured {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 28px;
  background:
    linear-gradient(135deg, rgba(78, 231, 255, 0.12), rgba(110, 168, 255, 0.06)),
    var(--panel);
}

.project-card ul {
  display: grid;
  gap: 10px;
  align-content: center;
  list-style: none;
}

.project-card li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.035);
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  padding: 26px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.timeline-item h3 {
  margin-top: 10px;
}

.contact-section {
  text-align: center;
  padding: 72px clamp(22px, 5vw, 72px);
}

.contact-section p {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.contact-actions {
  justify-content: center;
}

.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

@media (max-width: 920px) {
  .nav {
    display: none;
  }

  .hero,
  .split-section,
  .project-card.featured {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-card {
    max-width: 380px;
    width: 100%;
    justify-self: center;
    margin-inline: auto;
  }

  .portrait-wrap {
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

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

  .project-card.featured {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .section-shell {
    width: min(100% - 28px, 1120px);
    padding: 68px 0;
  }

  .site-header {
    padding: 14px;
  }

  .brand-text {
    display: none;
  }

  .hero {
    min-height: auto;
    text-align: center;
  }

  .hero-content {
    display: grid;
    justify-items: center;
  }

  .hero-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .signal-row {
    justify-content: center;
  }

  .hero-card {
    max-width: 290px;
    justify-self: center;
    margin-inline: auto;
  }

  .portrait-wrap {
    max-width: 240px;
    margin-inline: auto;
  }

  .portrait-wrap img {
    aspect-ratio: 1 / 1;
    object-position: center 24%;
  }

  h1 {
    font-size: clamp(2.6rem, 15vw, 4rem);
  }

  .stack-grid,
  .project-list,
  .project-card.featured {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: span 1;
  }

  .site-footer {
    flex-direction: column;
    width: min(100% - 28px, 1120px);
  }
}
