:root {
  --bg: #05080b;
  --panel: rgba(6, 10, 14, 0.72);
  --line: rgba(160, 188, 210, 0.18);
  --line-strong: rgba(160, 188, 210, 0.28);
  --text: #f1f6fb;
  --muted: #a4afba;
  --muted-2: #72808a;
  --accent: #49a8ff;
  --font-main: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--mono);
  line-height: 1.58;
  background:
    radial-gradient(circle at 11% 5%, rgba(73, 168, 255, 0.075), transparent 30rem),
    linear-gradient(180deg, rgba(9, 13, 18, 0.9), var(--bg) 28rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(221, 236, 246, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

::selection {
  color: #00121f;
  background: var(--accent);
}

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

a:hover { color: var(--accent); }

.skip-link {
  position: absolute;
  top: -48px;
  left: 24px;
  z-index: 10;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  background: #071019;
  color: var(--text);
}

.skip-link:focus { top: 16px; }

.page-shell {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 0 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.055em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  color: #c4ccd4;
  font-size: 0.88rem;
}

.hero {
  padding: clamp(54px, 7vw, 78px) 0 clamp(40px, 6vw, 66px);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, 0.78fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: start;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(4.15rem, 8.4vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.085em;
  font-weight: 700;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: 710px;
  margin-bottom: 22px;
  color: var(--accent);
  font-size: clamp(1rem, 1.7vw, 1.14rem);
  line-height: 1.65;
}

.hero-body {
  max-width: 690px;
  margin-bottom: 0;
  color: #c9d3dc;
  font-family: var(--sans);
  font-size: 1.05rem;
}

.terminal-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(3, 7, 11, 0.58);
  color: #d2dbe3;
  font-size: 0.92rem;
}

.terminal-badge span,
.footer-title span { color: var(--accent); }

.systems-card {
  position: relative;
  padding: 30px 34px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 9, 13, 0.62);
  overflow: hidden;
}

.systems-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(221, 236, 246, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.6;
}

.systems-card > * {
  position: relative;
  z-index: 1;
}

.window-dot {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  opacity: 0.78;
}

.code-comment {
  margin-bottom: 16px;
  color: var(--accent);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  color: #c8d1d9;
  font-size: 0.94rem;
  line-height: 1.9;
}

.content-section {
  padding: 24px 0 48px;
}

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

.section-heading h2 {
  display: inline-flex;
  flex-direction: column;
  margin-bottom: 0;
  font-size: clamp(1.32rem, 2.2vw, 1.72rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.section-heading h2::after {
  content: "";
  width: 18px;
  height: 2px;
  margin-top: 10px;
  background: var(--accent);
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-action {
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 0.86rem;
  white-space: nowrap;
}

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

.info-card,
.project-card {
  position: relative;
  border: 1px solid var(--line-strong);
  background: rgba(5, 9, 13, 0.54);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.info-card:hover,
.project-card:hover {
  border-color: rgba(73, 168, 255, 0.55);
  background: rgba(8, 14, 20, 0.72);
  transform: translateY(-2px);
}

.info-card {
  min-height: 250px;
  padding: 24px 22px;
}

.card-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-card h3,
.project-card h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.94rem;
  line-height: 1.65;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 23px 18px 20px;
}

.project-card h3 {
  margin-top: 34px;
  margin-bottom: auto;
  overflow-wrap: anywhere;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.project-meta span:not(.project-language) { display: none; }

.project-language::before {
  content: "// ";
  color: var(--accent);
}

.project-arrow {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: var(--accent);
  font-size: 1.05rem;
}

.memory-list {
  border: 1px solid var(--line-strong);
  background: rgba(5, 9, 13, 0.5);
}

.memory-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 120px 24px;
  gap: 18px;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: #d6dee7;
  font-size: 0.9rem;
}

.memory-list a:last-child { border-bottom: 0; }

.memory-list span,
.memory-list b {
  color: var(--accent);
  font-weight: 400;
}

.memory-list strong {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-list em {
  color: var(--muted-2);
  font-style: normal;
  text-align: right;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  margin-top: 22px;
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer p { margin-bottom: 0; }

.footer-title {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .info-card,
  .project-card { transition: none; }
}

@media (max-width: 1100px) {
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .section-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .page-shell { width: min(100% - 28px, 1160px); }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 24px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  h1 { font-size: clamp(3.25rem, 17vw, 5.1rem); }

  .hero { padding-top: 52px; }

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

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-card,
  .project-card { min-height: auto; }

  .project-card h3 { margin-top: 20px; }

  .memory-list a {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 12px;
    padding: 12px 14px;
  }

  .memory-list em { display: none; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
