:root {
  --bg: #e8eaec;
  --panel: rgba(255, 255, 255, 0.58);
  --panel-strong: rgba(255, 255, 255, 0.78);
  --ink: #121820;
  --muted: #5d6672;
  --line: rgba(18, 24, 32, 0.12);
  --steel: #506579;
  --aqua: #31b7bc;
  --signal: #f0c84b;
  --coral: #f26d5b;
  --violet: #695ce8;
  --shadow: 0 24px 70px rgba(26, 35, 48, 0.16);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(49, 183, 188, 0.14), transparent 31%),
    linear-gradient(240deg, rgba(240, 200, 75, 0.17), transparent 32%),
    var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 24, 32, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 24, 32, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

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

.site-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  background: rgba(238, 240, 242, 0.66);
  box-shadow: 0 10px 30px rgba(20, 27, 36, 0.09);
  backdrop-filter: blur(24px) saturate(1.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: #111820;
  color: #f7fafc;
}

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

.nav a,
.button,
.back-link {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 10px 13px;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav a:hover,
.button:hover,
.back-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 34px rgba(31, 42, 56, 0.13);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111820;
  color: white;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: 30px;
  min-height: calc(100vh - 84px);
  align-items: center;
  padding: 52px 0 28px;
}

.hero h1,
.project-hero h1,
.blog-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 8.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.quote {
  max-width: 830px;
  margin: 0 0 26px;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.55;
  color: #29323d;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--steel);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-card,
.glass-card,
.liquid-panel {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(1.45);
}

.portrait {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  isolation: isolate;
}

.portrait img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.portrait::after {
  content: "software engineer / builder";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  background: rgba(232, 234, 236, 0.58);
  color: #111820;
  font-weight: 900;
  backdrop-filter: blur(20px);
}

.section {
  padding: 70px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head h2,
.project-section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-head--compact {
  align-items: start;
}

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

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  animation: rise 600ms ease both;
  animation-delay: var(--delay);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 5px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--aqua), var(--signal), var(--coral));
  transform: scaleX(0.28);
  transform-origin: left;
  transition: transform 220ms ease;
}

.project-card:hover {
  transform: translateY(-6px) rotateX(1deg);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card__image {
  height: 218px;
  overflow: hidden;
  background: #f4f5f6;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 550ms ease;
}

.project-card:hover img {
  transform: scale(1.06);
}

.project-card__body {
  padding: 22px;
}

.project-card h3,
.blog-card h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.project-card p,
.blog-card p,
.project-hero p,
.detail-card p {
  color: var(--muted);
  line-height: 1.65;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip-row span {
  border: 1px solid rgba(18, 24, 32, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  padding: 7px 9px;
  color: #2d3742;
  font-size: 0.72rem;
  font-weight: 800;
}

.blog-strip {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 72px;
}

.blog-prompt {
  padding: 26px;
  background: #111820;
  color: white;
}

.blog-prompt p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.blog-card {
  display: block;
  padding: 24px;
}

.read-link {
  display: inline-flex;
  margin-top: 8px;
  color: #0c6f73;
  font-weight: 900;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 0.8rem;
}

.project-hero,
.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 26px;
  align-items: center;
  padding: 70px 0 42px;
}

.project-hero__copy,
.blog-hero__copy {
  min-width: 0;
}

.subtitle {
  margin: 14px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.project-hero__media {
  overflow: hidden;
  padding: 12px;
}

.project-hero__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.project-section {
  padding: 42px 0;
}

.flow-diagram {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.flow-node {
  position: relative;
  min-height: 128px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 18px 40px rgba(26, 35, 48, 0.1);
}

.flow-node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -18px;
  width: 22px;
  height: 2px;
  background: #111820;
}

.flow-node span {
  color: var(--coral);
  font-weight: 900;
}

.flow-node strong {
  display: block;
  margin-top: 18px;
  font-size: 1rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.detail-card {
  padding: 26px;
}

.detail-card ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.detail-card--dark {
  background: rgba(17, 24, 32, 0.9);
  color: white;
}

.detail-card--dark p,
.detail-card--dark .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.detail-card--dark .chip-row span {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.deep-dive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.deep-dive-card {
  position: relative;
  overflow: hidden;
  padding: 28px 32px;
}

.deep-dive-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--accent-a, var(--aqua)), var(--accent-b, var(--signal)));
}

.deep-dive-card__index {
  position: absolute;
  top: 18px;
  right: 24px;
  color: rgba(18, 24, 32, 0.08);
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  font-weight: 900;
  line-height: 1;
}

.deep-dive-card h3 {
  position: relative;
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  line-height: 1.08;
}

.deep-dive-card p {
  position: relative;
  max-width: 980px;
  margin: 0;
  color: #44505d;
  font-family: "IBM Plex Mono", "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.98rem;
  line-height: 1.82;
}

.article {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 0 90px;
}

.article h1 {
  margin: 0 0 14px;
  font-size: clamp(2.5rem, 6vw, 6rem);
  line-height: 0.95;
}

.article p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.article h2 {
  margin-top: 42px;
  font-size: 1.6rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .hero,
  .project-hero,
  .blog-hero,
  .blog-strip,
  .two-column {
    grid-template-columns: 1fr;
  }

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

  .flow-node:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -16px;
    width: 2px;
    height: 18px;
  }

  .section-head,
  .section-head--compact,
  .footer,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  .portrait,
  .portrait img {
    min-height: 390px;
  }

  .deep-dive-card {
    padding: 24px;
  }

  .deep-dive-card__index {
    opacity: 0.5;
  }
}
