:root {
  color-scheme: dark;
  --background: #0a0a0a;
  --surface: #121212;
  --line: #2c2c2c;
  --text: #f4f4f4;
  --muted: #ababab;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --header-height: 4.5rem;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.55;
}

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

h2 {
  font-size: clamp(2.35rem, 5vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.065em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

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

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.shell {
  width: min(100% - var(--gutter) * 2, 75rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 3;
  top: 0.75rem;
  left: var(--gutter);
  padding: 0.6rem 1rem;
  transform: translateY(-180%);
  border-radius: 0.25rem;
  background: var(--text);
  color: var(--background);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--background);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-inner {
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-lab {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  place-items: center;
  border: 1px solid #555;
  border-radius: 0.3rem;
}

.brand-mark::before {
  width: 54%;
  aspect-ratio: 1;
  background: var(--text);
  clip-path: polygon(0 10%, 21% 10%, 47% 65%, 74% 10%, 100% 10%, 56% 90%, 39% 90%);
  content: "";
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.65rem, 2.4vw, 2.25rem);
}

.site-nav a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.site-nav a {
  position: relative;
}

.site-nav a[aria-current],
.site-nav a:hover,
.site-footer a:hover {
  color: var(--text);
}

.site-nav a[aria-current]::after {
  position: absolute;
  right: 0;
  bottom: 0.3rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
}

.menu-toggle {
  display: none;
  min-height: 44px;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.menu-icon {
  width: 0.9rem;
  height: 0.55rem;
  border-block: 1px solid currentColor;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(32rem, 47vw, 41rem);
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-image,
.hero::after {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: 77%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center right;
}

.hero::after {
  background:
    linear-gradient(90deg, var(--background), rgb(10 10 10 / 65%) 28%, transparent 68%),
    linear-gradient(0deg, var(--background), transparent 25%);
  content: "";
}

.hero-inner {
  padding-block: 4rem;
}

.hero h1 {
  font-size: clamp(4.5rem, 8.3vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.085em;
  line-height: 0.93;
}

.hero h1 span {
  display: block;
  color: #bcbcbc;
}

.hero p {
  max-width: 24rem;
  margin-top: 1.6rem;
  color: #d0d0d0;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 650;
}

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

.button-primary:hover {
  background: #d6d6d6;
}

.button-secondary {
  border-color: #555;
  background: rgb(10 10 10 / 85%);
}

.button-secondary:hover {
  border-color: var(--muted);
  background: #202020;
}

.arrow {
  position: relative;
  width: 0.75rem;
  height: 0.75rem;
  flex: none;
  transform: rotate(-45deg);
  background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
}

.arrow::after {
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 0.35rem;
  height: 0.35rem;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid;
  border-bottom: 1px solid;
  content: "";
}

.arrow-up {
  transform: rotate(180deg);
}

.section {
  padding-block: clamp(3.75rem, 7vw, 6.75rem);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.section-heading p,
.tool-card p,
.project p,
.about-inner p {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.tool-card {
  min-height: 13.75rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: linear-gradient(145deg, #171717, #101010 75%);
}

.tool-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.7rem;
  place-items: center;
  border: 1px solid #3b3b3b;
  border-radius: 0.45rem;
  color: #dadada;
}

.icon-prompt::before,
.icon-prompt::after {
  grid-area: 1 / 1;
  width: 1.1rem;
  aspect-ratio: 1;
  background:
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
  content: "";
}

.icon-prompt::after {
  transform: rotate(45deg);
}

.icon-workflow::before {
  width: 1rem;
  aspect-ratio: 1;
  border: 1px solid;
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
  content: "";
}

.icon-research::before {
  width: 0.95rem;
  aspect-ratio: 1;
  transform: rotate(45deg);
  border: 1px solid;
  border-radius: 2px;
  background: radial-gradient(circle, currentColor 2px, transparent 2.5px);
  content: "";
}

.tool-card p,
.project p {
  margin-top: 0.6rem;
}

.projects-section {
  background: #0e0e0e;
}

.project {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--surface);
}

.project-mark {
  width: clamp(3rem, 8vw, 5rem);
  height: auto;
  aspect-ratio: 1;
}

.about-inner {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) 2fr;
  gap: 1.25rem;
  align-items: baseline;
}

.about-inner p {
  max-width: 38rem;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.footer-inner {
  min-height: 5.5rem;
}

.site-footer a {
  gap: 0.5rem;
}

@media (max-width: 47.5rem) {
  :root {
    --header-height: 4rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0;
    padding-block: 0.55rem;
  }

  .site-header:not([data-enhanced]) {
    position: static;
  }

  .site-nav {
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
  }

  .site-header[data-enhanced] .menu-toggle {
    display: inline-flex;
  }

  .site-header[data-enhanced] .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 0.4rem var(--gutter) 0.75rem;
    border-bottom: 1px solid var(--line);
    background: var(--background);
  }

  .site-header[data-enhanced] .menu-toggle[aria-expanded="false"] + .site-nav {
    display: none;
  }

  .site-nav a[aria-current]::after {
    right: auto;
    width: 1.1rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-image,
  .hero::after {
    inset: 0 0 auto;
    width: 100%;
    height: clamp(20rem, 70vw, 28rem);
  }

  .hero::after {
    background: linear-gradient(0deg, var(--background) 5%, rgb(10 10 10 / 75%) 27%, transparent 70%);
  }

  .hero-inner {
    padding-top: clamp(11.5rem, 42vw, 19rem);
    padding-bottom: 3rem;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 10.7vw, 5.5rem);
  }

  .hero p {
    margin-top: 1.1rem;
  }

  .hero-actions {
    margin-top: 1.35rem;
  }

  .card-grid,
  .about-inner {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: auto;
  }

  .tool-icon {
    margin-bottom: 1.2rem;
  }
}

@media (max-width: 22rem) {
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}
