:root {
  --paper: #f2efe8;
  --paper-bright: #fbfaf7;
  --ink: #15191c;
  --muted: #676b6d;
  --line: rgba(21, 25, 28, 0.18);
  --line-strong: rgba(21, 25, 28, 0.42);
  --accent: #9f3f2b;
  --accent-soft: rgba(159, 63, 43, 0.09);
  --header-height: 78px;
  --page-padding: clamp(20px, 4vw, 64px);
  --max-width: 1540px;
  color-scheme: light;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 83% 4%, rgba(159, 63, 43, 0.07), transparent 25rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  font-kerning: normal;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 14px var(--page-padding);
  border-bottom: 1px solid var(--line);
  background: rgba(242, 239, 232, 0.92);
  backdrop-filter: blur(18px);
}

.identity {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
}

.identity-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.identity-role {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
}

.email-link {
  font-size: 0.84rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
}

.language-button {
  min-width: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.language-button.is-active {
  background: var(--ink);
  color: var(--paper-bright);
}

main,
.site-footer {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  column-gap: clamp(48px, 10vw, 170px);
  align-items: end;
  min-height: clamp(480px, 69vh, 760px);
  padding-block: clamp(80px, 13vh, 170px) clamp(70px, 10vh, 120px);
  border-bottom: 1px solid var(--line-strong);
}

.eyebrow {
  grid-column: 1 / -1;
  align-self: start;
  margin: 0 0 48px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 950px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6.2vw, 6.6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-copy {
  margin: 0 0 18px;
  max-width: 52ch;
  color: #34383a;
  font-size: clamp(1.06rem, 1.25vw, 1.18rem);
  line-height: 1.58;
  text-wrap: pretty;
}

.hero-email {
  grid-column: 2;
  width: fit-content;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-section {
  padding-block: clamp(78px, 10vw, 150px);
  border-bottom: 1px solid var(--line-strong);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(64px, 0.25fr) minmax(0, 1.75fr);
  gap: 24px;
  align-items: start;
  margin-bottom: clamp(48px, 7vw, 90px);
}

.section-index {
  margin: 7px 0 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  margin: 0;
  max-width: 940px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 4.6vw, 4.9rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.03;
  text-wrap: balance;
}

.section-heading div > p {
  margin: 20px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.project-card {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.project-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.project-open {
  width: 100%;
  min-height: 450px;
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 3.4vw, 55px);
  align-items: stretch;
  padding: clamp(28px, 4.2vw, 62px);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.project-open:hover {
  background: var(--accent-soft);
}

.project-preview {
  position: relative;
  min-height: 305px;
  overflow: hidden;
  border: 1px solid rgba(21, 25, 28, 0.28);
  background: #e5e1d9;
  box-shadow: 0 18px 35px rgba(21, 25, 28, 0.08);
}

.project-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 65%, rgba(21, 25, 28, 0.15));
  pointer-events: none;
}

.project-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.72) contrast(0.98);
  transition: transform 260ms ease, filter 260ms ease;
}

.project-open:hover .project-preview img {
  transform: scale(1.025);
  filter: saturate(0.95) contrast(1);
}

.preview-number {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  background: var(--paper-bright);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.project-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(34px, 5vw, 78px);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-languages {
  color: var(--accent);
  white-space: nowrap;
}

.project-title {
  display: block;
  max-width: 620px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 2.6vw, 2.8rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.project-description {
  display: block;
  max-width: 570px;
  margin-top: 24px;
  color: #4b5052;
  font-size: 1rem;
  line-height: 1.58;
  text-wrap: pretty;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-top: auto;
  padding-top: 38px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 32px 48px;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-underline-offset: 4px;
}

.reader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #d8d6d0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.reader.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.reader-open {
  overflow: hidden;
}

.reader-header {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(100px, 0.6fr) minmax(0, 1.8fr) minmax(100px, 0.6fr);
  align-items: center;
  gap: 24px;
  padding: 12px var(--page-padding);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}

.reader-back {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.reader-language-switch {
  justify-self: end;
}

.reader-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
}

.pdf-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #c9c7c2;
}

.noscript-message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  max-width: 420px;
  padding: 18px;
  background: var(--ink);
  color: white;
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-copy {
    margin-top: 46px;
  }

  .hero-email {
    grid-column: 1;
  }

  .project-open {
    min-height: 410px;
    grid-template-columns: minmax(130px, 0.62fr) minmax(0, 1.38fr);
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 70px;
  }

  .site-header {
    gap: 12px;
  }

  .identity-role,
  .email-link {
    display: none;
  }

  .hero {
    min-height: auto;
  }

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

  .project-card:nth-child(odd) {
    border-right: 0;
  }

  .project-open {
    min-height: 430px;
  }
}

@media (max-width: 600px) {
  :root {
    --page-padding: 18px;
  }

  .identity-name {
    max-width: 170px;
    font-size: 0.98rem;
  }

  .language-button {
    min-width: 38px;
    padding: 6px 8px;
  }

  .hero {
    padding-block: 70px 72px;
  }

  .eyebrow {
    margin-bottom: 30px;
  }

  .hero h1 {
    font-size: clamp(2.85rem, 14.5vw, 4.65rem);
    line-height: 1.03;
  }

  .section-heading {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .project-open {
    min-height: auto;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
    padding: 28px 0;
  }

  .project-preview {
    min-height: 166px;
    align-self: start;
  }

  .project-meta {
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    margin-bottom: 22px;
  }

  .project-title {
    font-size: 1.65rem;
  }

  .project-description {
    margin-top: 16px;
    font-size: 0.95rem;
  }

  .project-cta {
    padding-top: 24px;
  }

  .site-footer {
    flex-direction: column;
  }

  .reader-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .reader-title {
    text-align: center;
  }

  .reader-language-switch {
    justify-self: end;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
