:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --panel: #ffffff;
  --text: #171717;
  --muted: #66615a;
  --accent: #304ffe;
  --line: #ded9d0;
  --line-strong: #c9c2b7;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 32px;
}

.brand,
.nav-links,
.project-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  font-size: 0.85rem;
}

.nav-links {
  gap: 10px;
}

.nav-links a,
.project-links a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.icon-link,
.cv-link {
  display: inline-grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.icon-link svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.cv-link {
  padding: 0 14px;
  color: #ffffff !important;
  background: #171717;
  border-color: #171717;
  font-size: 0.88rem;
}

.nav-links a:hover,
.project-links a:hover {
  color: var(--accent);
}

.cv-link:hover {
  color: #ffffff !important;
  background: var(--accent);
  border-color: var(--accent);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

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

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.intro {
  max-width: 880px;
  padding: 48px 0 36px;
}

.intro p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.55;
}

.project-links {
  flex-wrap: wrap;
  gap: 12px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf7;
  font-size: 0.92rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
}

.section-heading,
.project-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.section-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: auto;
  padding: 20px;
}

.project-card {
  display: grid;
  gap: 18px;
  justify-content: space-between;
  overflow: hidden;
}

.project-image {
  display: block;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #ece8df;
}

.project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.project-image:hover img {
  transform: scale(1.025);
}

.project-card p:not(.project-kind) {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.project-card > div {
  padding: 0 20px;
}

.project-card .project-links {
  padding-bottom: 20px;
}

.project-kind {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 960px);
    padding: 18px 0 36px;
  }

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

  .intro {
    padding: 36px 0 28px;
  }

  .project-image {
    height: 150px;
  }

  .section-heading {
    align-items: flex-start;
    padding: 20px;
  }

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