:root {
  --ink: #23211e;
  --muted: #68635e;
  --paper: #f6f3ed;
  --card: #fffdfa;
  --line: rgb(35 33 30 / 12%);
  --coral: #d8654f;
  --coral-dark: #a53f30;
  --sage: #dce7dc;
  --lavender: #e7e0ef;
  --blue: #dce8f3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  color: white;
  background: var(--ink);
  border-radius: 6px;
}
.skip-link:focus { transform: none; }
.site-header, main, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 88px;
}
.language {
  min-width: 48px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 700 .75rem/1 inherit;
  cursor: pointer;
}
.language:hover { background: var(--card); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, .72fr);
  align-items: center;
  gap: clamp(48px, 8vw, 104px);
  min-height: calc(100vh - 88px);
  padding: 68px 0 100px;
}
.eyebrow, .status, figcaption {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow { margin: 0 0 20px; color: var(--coral-dark); }
h1 {
  max-width: 780px;
  margin: 0;
  font: 700 clamp(3.5rem, 7.5vw, 7.3rem)/.91 Georgia, "Times New Roman", serif;
  letter-spacing: -.065em;
}
.intro {
  max-width: 650px;
  margin: 34px 0 28px;
  color: var(--muted);
  font-size: clamp(1.06rem, 1.55vw, 1.3rem);
  line-height: 1.62;
}
.primary-link, .project-card > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--coral-dark);
  font-weight: 700;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.portrait-wrap { position: relative; width: min(100%, 400px); margin: 0 auto; }
.portrait-backdrop {
  position: absolute;
  inset: 8% -7% -5% 10%;
  transform: rotate(4deg);
  background: var(--lavender);
  border-radius: 48% 52% 42% 58% / 52% 42% 58% 48%;
}
.portrait {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 48% 52% 45% 55% / 55% 42% 58% 45%;
  filter: saturate(.92);
}
figcaption { position: relative; margin: 22px 0 0; color: var(--muted); text-align: center; }
.about {
  padding: 110px max(24px, 6vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
}
h2 { margin: 0; font: 700 clamp(2.3rem, 5vw, 4.5rem)/1 Georgia, serif; letter-spacing: -.045em; }
.about div > p { margin: 30px 0 0; color: var(--muted); font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.7; }
.projects-section { padding: 138px 0 120px; }
.section-heading { margin-bottom: 42px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
  padding: 26px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgb(35 33 30 / 8%); }
.featured { background: var(--sage); }
.invitation-card { background: var(--lavender); }
.code-card { background: var(--blue); }
.project-topline { display: flex; align-items: center; justify-content: flex-end; }
.status { padding: 7px 10px; border: 1px solid rgb(35 33 30 / 13%); border-radius: 999px; letter-spacing: .04em; }
.project-card h3 { margin: 0 0 16px; font: 700 clamp(1.9rem, 3vw, 2.7rem)/1 Georgia, serif; letter-spacing: -.035em; }
.project-card div > p { margin: 0; color: #4f4a45; line-height: 1.55; }
.quiet-link { min-height: 44px; margin: 0; color: var(--muted); font-size: .9rem; font-weight: 600; line-height: 44px; }
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
footer a { min-height: 44px; line-height: 44px; font-weight: 700; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 64px 0 100px; }
  .hero-copy { order: 1; }
  .portrait-wrap { width: min(72vw, 360px); }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 310px; }
}

@media (max-width: 520px) {
  .site-header, main, footer { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 72px; }
  .hero { gap: 50px; padding: 46px 0 76px; }
  h1 { font-size: clamp(3.15rem, 15vw, 4.5rem); }
  .intro { margin-top: 26px; }
  .portrait-wrap { width: min(78vw, 320px); }
  .about { padding: 58px 24px; border-radius: 20px; }
  .projects-section { padding: 92px 0 84px; }

  .project-card { min-height: 300px; padding: 22px; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; padding: 24px 0; }
  footer p { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-card { transition: none; }
}
