:root {
  color-scheme: light;
  --ag-bg: #070b10;
  --ag-panel: #0e141b;
  --ag-panel-2: #111a24;
  --ag-line: #2a3542;
  --ag-text: #f3f7fa;
  --ag-muted: #9ba7b3;
  --ag-root: #58d8c9;
  --ag-school: #6c8cff;
  --ag-materials: #35d07f;
  --ag-diag: #ff9a3d;
  --ag-finance: #b36cff;
  --ag-bazar: #ff5fa3;
  --ag-radius-card: 24px;
  --ag-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --paper: #f2f5f2;
  --paper-deep: #e2e8df;
  --ink: #17191f;
  --muted: #636b66;
  --line: rgba(23, 25, 31, 0.14);
  --cobalt: var(--ag-school);
  --copper: var(--ag-diag);
  --moss: var(--ag-materials);
  --amber: #d99a16;
  --violet: var(--ag-finance);
  --teal: var(--ag-bazar);
  --white: #fffdf8;
  --shadow: 0 24px 80px rgba(23, 25, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(23, 25, 31, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 25, 31, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(88, 216, 201, 0.72);
  outline-offset: 4px;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(23, 25, 31, 0.08);
  background: rgba(242, 245, 242, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-name {
  letter-spacing: -0.01em;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(12px, 2vw, 28px);
  color: rgba(23, 25, 31, 0.78);
  font-size: 14px;
  font-weight: 680;
}

.top-nav a {
  border-bottom: 1px solid transparent;
}

.top-nav a:hover {
  border-color: currentColor;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(760px, 88svh);
  padding: clamp(108px, 15vh, 156px) clamp(20px, 6vw, 72px) clamp(64px, 10vh, 96px);
  overflow: hidden;
}

.agent-field {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(242, 245, 242, 0.98) 0%, rgba(242, 245, 242, 0.86) 42%, rgba(242, 245, 242, 0.35) 100%),
    linear-gradient(180deg, rgba(242, 245, 242, 0.2) 0%, rgba(242, 245, 242, 0.88) 100%);
}

.hero-shell {
  width: min(760px, 100%);
  animation: rise-in 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
}

.hero-mark {
  display: block;
  width: clamp(52px, 8vw, 72px);
  height: clamp(52px, 8vw, 72px);
  flex-shrink: 0;
  filter: drop-shadow(0 10px 28px rgba(23, 25, 31, 0.16));
}

.section-kicker {
  margin: 0 0 16px;
  color: var(--ag-root);
  font-family:
    "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(64px, 12vw, 164px);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: -0.02em;
}

.hero-copy {
  width: min(660px, 100%);
  margin: 28px 0 0;
  color: rgba(23, 25, 31, 0.78);
  font-size: clamp(18px, 2.1vw, 26px);
  line-height: 1.34;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  font-weight: 780;
}

.button-primary {
  background: var(--ink);
  color: var(--white);
}

.button-primary:hover {
  background: var(--cobalt);
  border-color: var(--cobalt);
}

.button-secondary {
  background: rgba(255, 253, 248, 0.58);
}

.button-secondary:hover {
  background: var(--white);
}

.hero-terminal {
  position: absolute;
  right: clamp(20px, 5vw, 68px);
  bottom: clamp(24px, 5vh, 54px);
  width: min(300px, calc(100% - 40px));
  padding: 14px 16px;
  border: 1px solid rgba(23, 25, 31, 0.2);
  background: rgba(255, 253, 248, 0.74);
  box-shadow: var(--shadow);
  color: rgba(23, 25, 31, 0.74);
  font-family:
    "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  animation: rise-in 920ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}

.hero-terminal p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid rgba(23, 25, 31, 0.11);
}

.hero-terminal p:last-child {
  border-bottom: 0;
}

.hero-terminal span {
  color: var(--ag-root);
  font-weight: 800;
}

.thesis-band,
.projects-section,
.principles-section {
  padding: clamp(62px, 9vw, 112px) clamp(20px, 6vw, 72px);
}

.thesis-band {
  background: var(--ag-bg);
  color: var(--ag-text);
}

.band-inner,
.section-heading,
.project-grid,
.principle-list,
.site-footer {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  grid-template-areas:
    "kicker kicker"
    "title copy";
  gap: clamp(28px, 6vw, 88px);
  align-items: end;
}

.band-inner .section-kicker {
  grid-area: kicker;
}

.band-inner h2 {
  grid-area: title;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 70px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}

.band-inner p:last-child {
  grid-area: copy;
  margin: 0;
  color: var(--ag-muted);
  font-size: clamp(17px, 1.4vw, 20px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 5vw, 54px);
}

.section-heading h2 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 86px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
}

.projects-section {
  background:
    radial-gradient(circle at 20% 0%, rgba(88, 216, 201, 0.14), transparent 32%),
    var(--ag-bg);
  color: var(--ag-text);
}

.projects-heading {
  align-items: start;
}

.projects-lead {
  max-width: 420px;
  margin: 0;
  color: var(--ag-muted);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.55;
}

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

.project-card {
  position: relative;
  display: flex;
  min-height: 320px;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--ag-radius-card);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--ag-line));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--ag-panel);
  box-shadow: var(--ag-shadow);
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.project-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(
    circle at 26px 16px,
    color-mix(in srgb, var(--accent) 20%, transparent),
    transparent 38%
  );
  pointer-events: none;
}

.project-card:hover {
  z-index: 2;
  border-color: color-mix(in srgb, var(--accent) 52%, var(--ag-line));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  transform: translateY(-4px);
}

.project-school {
  --accent: var(--ag-school);
}

.project-materials {
  --accent: var(--ag-materials);
}

.project-diag {
  --accent: var(--ag-diag);
}

.project-finance {
  --accent: var(--ag-finance);
}

.project-bazar {
  --accent: var(--ag-bazar);
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.project-icon {
  display: block;
  width: 72px;
  height: 72px;
}

.project-code {
  width: max-content;
  margin: 0 0 8px;
  color: var(--accent);
  font-family:
    "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.project-status {
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--ag-muted) 28%, var(--ag-line));
  background: rgba(255, 255, 255, 0.04);
  color: var(--ag-muted);
  font-family:
    "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-status-live {
  border-color: color-mix(in srgb, var(--ag-materials) 40%, var(--ag-line));
  background: color-mix(in srgb, var(--ag-materials) 14%, transparent);
  color: var(--ag-materials);
}

.project-card h3 {
  margin: 0 0 10px;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.project-card p {
  margin: 0;
  color: var(--ag-muted);
  font-size: 14px;
  line-height: 1.45;
}

.project-domain {
  margin-top: auto;
  padding-top: 18px;
  color: color-mix(in srgb, var(--accent) 72%, var(--ag-text));
  font-family:
    "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.principles-section {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.82), rgba(226, 232, 223, 0.92)),
    var(--paper-deep);
}

.principle-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.principle {
  display: grid;
  grid-template-columns: 86px minmax(180px, 0.72fr) minmax(220px, 1fr);
  gap: clamp(18px, 4vw, 48px);
  align-items: baseline;
  padding: clamp(22px, 4vw, 38px);
  background: rgba(242, 245, 242, 0.94);
}

.principle-index {
  color: var(--amber);
  font-family:
    "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 840;
}

.principle h3,
.principle p {
  margin: 0;
}

.principle h3 {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.08;
}

.principle p {
  color: var(--muted);
  font-size: 16px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 32px clamp(20px, 6vw, 72px) 42px;
  color: rgba(23, 25, 31, 0.72);
  font-family:
    "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

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

.footer-brand img {
  display: block;
  width: 24px;
  height: 24px;
}

.site-footer a[href^="mailto:"] {
  border-bottom: 1px solid currentColor;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .projects-heading {
    display: block;
  }

  .projects-lead {
    max-width: none;
    margin-top: 18px;
  }
}

@media (max-width: 1020px) {

  .band-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kicker"
      "title"
      "copy";
    align-items: start;
  }
}

@media (max-width: 720px) {
  body {
    background-size: 32px 32px;
  }

  .site-header {
    align-items: flex-start;
    padding: 14px 16px;
  }

  .top-nav {
    max-width: 190px;
    font-size: 12px;
  }

  .hero {
    min-height: 86svh;
    padding: 108px 18px 188px;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(242, 245, 242, 0.96) 0%, rgba(242, 245, 242, 0.72) 52%, rgba(242, 245, 242, 0.9) 100%);
  }

  .agent-field {
    opacity: 0.42;
  }

  .hero-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-mark {
    width: 48px;
    height: 48px;
  }

  .hero h1 {
    font-size: clamp(44px, 15vw, 64px);
    line-height: 0.92;
  }

  .hero-copy {
    font-size: 18px;
  }

  .button {
    width: 100%;
  }

  .hero-terminal {
    right: 18px;
    bottom: 28px;
    left: 18px;
    width: auto;
  }

  .section-heading {
    display: block;
  }

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

  .project-card {
    min-height: 280px;
  }

  .principle {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

@media (max-width: 420px) {
  .brand-name {
    display: none;
  }

  .top-nav {
    max-width: none;
    gap: 12px;
  }
}

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

  .hero-shell,
  .hero-terminal {
    animation: none;
  }
}
