:root {
  color-scheme: dark;
  --bg: #071016;
  --bg-2: #0b1720;
  --panel: rgba(15, 27, 36, 0.78);
  --panel-strong: rgba(21, 38, 50, 0.92);
  --surface: #0f1d27;
  --text: #f4f8fb;
  --muted: #9fb0bc;
  --line: rgba(170, 213, 230, 0.16);
  --line-strong: rgba(103, 232, 249, 0.34);
  --cyan: #67e8f9;
  --green: #7dd3a8;
  --blue: #8ba7ff;
  --amber: #f5c86a;
  --danger: #f38f7a;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(103, 232, 249, 0.16), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(125, 211, 168, 0.1), transparent 30%),
    linear-gradient(135deg, #071016 0%, #0b1520 48%, #071016 100%);
  color: var(--text);
  font-family: "Geist", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(103, 232, 249, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.25));
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 38%, rgba(103, 232, 249, 0.08) 38% 39%, transparent 39%),
    linear-gradient(60deg, transparent 0 66%, rgba(125, 211, 168, 0.06) 66% 67%, transparent 67%);
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header,
main,
.footer {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 32px));
  min-height: 64px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 16, 22, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 900;
}

.brand span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(103, 232, 249, 0.1);
  color: var(--cyan);
  font-family: "Geist Mono", monospace;
  font-size: 0.8rem;
}

.nav {
  display: flex;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 16, 22, 0.7);
  box-shadow: var(--shadow);
}

.nav a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.nav a:hover {
  background: rgba(103, 232, 249, 0.12);
  color: var(--text);
}

.language-toggle {
  display: inline-grid;
  min-width: 46px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.12);
  color: var(--cyan);
  cursor: pointer;
  font: 900 0.82rem "Geist Mono", monospace;
}

.language-toggle:hover {
  background: var(--cyan);
  color: #031015;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(430px, 0.82fr);
  gap: clamp(34px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 90px);
  padding: 132px 0 96px;
}

section[id] {
  scroll-margin-top: 96px;
}

.hero-copy,
.hero-console,
.section-copy,
.text-panel,
.cert-card,
.project-feature,
.project-tile,
.feature-content,
.tile-content,
.contact-section > * {
  min-width: 0;
}

.kicker {
  margin: 0 0 16px;
  color: var(--cyan);
  font-family: "Geist Mono", monospace;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

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

h1 {
  max-width: 640px;
  margin-bottom: 24px;
  font-size: clamp(3.45rem, 5.8vw, 5.75rem);
  line-height: 0.92;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.95;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.22rem;
  line-height: 1.16;
}

.hero-text {
  max-width: 700px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.65vw, 1.32rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.contact-actions a,
.project-link,
.tile-link {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 900;
}

.button.primary,
.project-link {
  border: 1px solid rgba(103, 232, 249, 0.4);
  background: var(--cyan);
  color: #031015;
  box-shadow: 0 18px 50px rgba(103, 232, 249, 0.14);
}

.button.secondary,
.button.light,
.contact-actions a {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero-console,
.text-panel,
.cert-card,
.capability-card,
.stack-category,
.timeline-card,
.ai-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 27, 36, 0.88), rgba(9, 19, 27, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-console {
  justify-self: end;
  width: min(100%, 530px);
  margin-top: -34px;
  overflow: hidden;
}

.console-top {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.console-top span:nth-child(1) {
  background: var(--danger);
}

.console-top span:nth-child(2) {
  background: var(--amber);
}

.console-top span:nth-child(3) {
  background: var(--green);
}

.console-top code {
  margin-left: auto;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 0.82rem;
}

.console-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 20px;
}

.avatar {
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  object-fit: cover;
}

.console-lines {
  display: grid;
  gap: 8px;
  align-content: center;
  min-width: 0;
}

.console-lines p {
  margin: 0;
  color: var(--text);
  font-family: "Geist Mono", monospace;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.console-lines span {
  color: var(--green);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.stat-card {
  padding: 16px;
  border-right: 1px solid var(--line);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card strong {
  display: block;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.tech-marquee {
  position: relative;
  width: min(1160px, 96%);
  height: 46px;
  margin: 0 auto 64px;
  overflow: hidden;
  contain: layout paint;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}

.tech-track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
  gap: 12px;
  padding: 0;
  animation: marquee 42s linear infinite;
}

.tech-pill {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-width: max-content;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 16, 22, 0.72);
  color: var(--text);
  font-weight: 850;
}

.tech-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.section-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(28px, 5vw, 70px);
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}

.text-panel {
  display: grid;
  gap: 16px;
  align-content: center;
  padding: clamp(24px, 4vw, 42px);
  font-size: 1.08rem;
}

.text-panel p,
.section-heading p,
.cert-card p,
.capability-card p,
.stack-category p,
.timeline-card p,
.project-text,
.ai-card p,
.contact-section p {
  color: var(--muted);
}

.text-panel p {
  margin: 0;
}

.section-block,
.projects-section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}

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

.section-heading p {
  max-width: 680px;
}

.capability-grid,
.ai-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.capability-card,
.ai-card {
  min-height: 250px;
  padding: 22px;
}

.capability-card strong,
.ai-card strong {
  display: block;
  margin-bottom: 46px;
  color: var(--cyan);
  font-family: "Geist Mono", monospace;
}

.stack-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.stack-tab {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: 800 0.86rem "Geist", sans-serif;
}

.stack-tab.is-active {
  border-color: var(--line-strong);
  background: rgba(103, 232, 249, 0.12);
  color: var(--text);
}

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

.stack-category {
  position: relative;
  grid-column: span 4;
  min-height: 270px;
  padding: 22px;
  overflow: hidden;
}

.stack-category::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.1), transparent 42%),
    radial-gradient(circle at 86% 14%, rgba(125, 211, 168, 0.1), transparent 30%);
}

.stack-card-top,
.stack-category h3,
.stack-category p,
.stack-category .tag-list {
  position: relative;
}

.stack-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 34px;
}

.stack-card-top span,
.stack-card-top small {
  font-family: "Geist Mono", monospace;
  font-weight: 900;
}

.stack-card-top span {
  color: var(--cyan);
}

.stack-card-top small {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.stack-category h3 {
  max-width: 360px;
}

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

.tag-list li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.credential-section {
  display: block;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.cert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  align-items: center;
  padding: 18px 22px;
}

.cert-card:first-child {
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(103, 232, 249, 0.12), rgba(15, 27, 36, 0.9));
}

.cert-card h2,
.cert-card p,
.cert-card .kicker,
.cert-details {
  grid-column: 1;
}

.cert-card h2 {
  max-width: 720px;
  margin-bottom: 4px;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.04;
}

.cert-card p {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 0.98rem;
}

.cert-card .kicker {
  margin-bottom: 4px;
}

.cert-card .button {
  grid-column: 2;
  grid-row: 2 / span 3;
  align-self: center;
  min-height: 42px;
  white-space: nowrap;
}

.cert-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.cert-details span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.timeline-card {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 20px;
  padding: 20px;
}

.timeline-date {
  color: var(--cyan);
  font-family: "Geist Mono", monospace;
  font-weight: 900;
}

.projects-list {
  display: grid;
  gap: 20px;
}

.project-feature,
.project-tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 27, 36, 0.86);
  box-shadow: var(--shadow);
}

.project-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.12), transparent 42%),
    rgba(15, 27, 36, 0.9);
}

.feature-media,
.tile-media {
  display: block;
  overflow: hidden;
  background: #050a0e;
}

.feature-media {
  height: 100%;
  min-height: 0;
  padding: 0;
  background:
    linear-gradient(145deg, rgba(103, 232, 249, 0.08), transparent 42%),
    #050a0e;
}

.feature-media img,
.tile-media img {
  width: 100%;
  height: 100%;
  transition: transform 420ms ease, filter 420ms ease;
}

.feature-media img {
  object-fit: cover;
  object-position: top center;
}

.tile-media img {
  object-fit: cover;
}

.project-feature:hover .feature-media img,
.project-tile:hover .tile-media img {
  filter: saturate(1.06);
}

.project-tile:hover .tile-media img {
  transform: scale(1.035);
}

.feature-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
}

.feature-content h3 {
  margin: 0 0 16px;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.86;
}

.feature-content p {
  max-width: 520px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.06rem;
}

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

.project-tile {
  display: grid;
  grid-template-rows: 230px minmax(330px, 1fr);
}

.tile-content {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: stretch;
  gap: 12px;
  padding: 20px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.project-meta span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  font-family: "Geist Mono", monospace;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-title {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
}

.project-text,
.tile-content p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.04rem;
}

.tile-content h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
}

.tile-content p {
  margin: 0;
}

.tile-link {
  align-self: end;
  justify-self: start;
  min-height: 38px;
  padding: 0;
  color: var(--cyan);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 620ms ease,
    transform 620ms ease,
    border-color 220ms ease,
    background 220ms ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

.stack-category.scroll-reveal {
  transform: none;
}

@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;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 92px 0;
}

.contact-section h2 {
  max-width: 740px;
}

.contact-section p {
  max-width: 680px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

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

  .hero,
  .section-layout,
  .credential-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-console {
    justify-self: stretch;
    width: 100%;
    margin-top: 0;
  }

  .cert-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .cert-card .button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .hero {
    min-height: auto;
  }

  .capability-grid,
  .ai-grid,
  .stack-matrix {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-category,
  .stack-category:first-child,
  .stack-category:nth-child(2) {
    grid-column: auto;
  }

  .project-feature,
  .project-tile:first-child {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 660px) {
  .site-header,
  main,
  .footer {
    width: min(100% - 24px, 1200px);
  }

  h1 {
    font-size: clamp(2.9rem, 12.5vw, 4rem);
    line-height: 0.92;
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero {
    padding-top: 44px;
  }

  .console-body,
  .stats-grid,
  .capability-grid,
  .ai-grid,
  .stack-matrix,
  .timeline-card {
    grid-template-columns: 1fr;
  }

  .tech-marquee {
    width: 100%;
    height: auto;
    margin: 0 0 72px;
    overflow: visible;
    contain: none;
    mask-image: none;
  }

  .tech-track {
    position: static;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    animation: none;
  }

  .avatar {
    width: 130px;
  }

  .stat-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-card:last-child {
    border-bottom: 0;
  }

  .feature-media {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
    padding: 0;
  }

  .project-showcase {
    grid-template-columns: 1fr;
  }

  .project-tile {
    grid-template-rows: 220px 1fr;
  }

  .footer {
    flex-direction: column;
  }
}
