:root {
  --paper: #f7f7f4;
  --surface: #ffffff;
  --ink: #19191d;
  --muted: #686870;
  --line: #deded8;
  --accent: #5946a8;
  --accent-soft: #e8e4f6;
  --content: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header,
main,
footer {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.site-name {
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--ink);
}

.intro {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.project-platform {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 720;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.intro-copy {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.projects {
  padding: 104px 0;
  border-bottom: 1px solid var(--line);
}

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

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.project-image {
  min-height: 470px;
  overflow: hidden;
  background: #08080b;
}

.project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-image a {
  height: 100%;
  display: block;
}

.project-details {
  padding: clamp(32px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-details h3 {
  margin-bottom: 22px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.project-details h3 a {
  text-decoration: none;
}

.project-details h3 a:hover,
.project-details h3 a:focus-visible {
  color: var(--accent);
}

.project-details > p:not(.project-platform) {
  margin-bottom: 24px;
  color: var(--muted);
}

.translation-note {
  margin-bottom: 32px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent-soft);
  background: #fafafa;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.translation-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.translation-note p {
  margin: 0;
}

.progress-group {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-label strong {
  color: var(--ink);
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--accent-soft);
}

.progress-value {
  width: 20%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--accent);
}

.project-link,
.back-link {
  width: fit-content;
  margin-top: 28px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.project-link:hover,
.project-link:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
}

.project-page {
  padding: 72px 0 104px;
}

.project-page .back-link {
  display: inline-block;
  margin: 0 0 46px;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(40px, 7vw, 88px);
  align-items: start;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--line);
}

.project-hero h1 {
  margin-bottom: 26px;
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.project-summary {
  max-width: 620px;
  color: var(--muted);
}

.project-sidebar {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.project-sidebar .translation-note {
  margin: 26px 0 0;
}

.gallery {
  padding-top: 80px;
}

.gallery-heading {
  max-width: 600px;
  margin-bottom: 34px;
}

.gallery-heading h2 {
  margin-bottom: 14px;
}

.gallery-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.screenshot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #08080b;
}

.screenshot img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}

.screenshot figcaption {
  padding: 10px 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
}

.contact {
  max-width: 640px;
  padding: 54px 0 54px;
}

.contact h2 {
  margin-bottom: 20px;
}

.contact > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

footer p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-header {
    align-items: flex-start;
    gap: 18px;
    padding: 20px 0;
  }

  nav {
    gap: 16px;
  }

  .intro {
    min-height: 430px;
  }

  .projects,
  .contact {
    padding: 72px 0;
  }

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

  .project-hero {
    grid-template-columns: 1fr;
    padding-bottom: 64px;
  }

  .gallery {
    padding-top: 64px;
  }

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

  .project-image {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .project-details {
    padding: 28px;
  }
}

@media (max-width: 440px) {
  .site-header {
    display: block;
  }

  nav {
    margin-top: 14px;
  }

  h1 {
    font-size: 2.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
