:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --surface: #fff;
  --ink: #192124;
  --muted: #50595b;
  --line: #deded5;
  --accent: #5145d7;
  --header-height: 84px;
  font-family: Manrope, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.container {
  width: min(100% - 64px, 1224px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  color: white;
  background: var(--accent);
  transform: translateY(calc(-100% - 20px));
}

.skip-link:focus { transform: none; }
.header {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
}

.brand { display: inline-flex; width: max-content; }
.brand img { width: 180px; height: auto; }
.intro h1 span { color: var(--accent); }

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 27px);
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}

.header-nav a:hover { color: var(--ink); }
.header-nav a[aria-current] { color: var(--accent); }
.header-end { display: flex; align-items: center; justify-self: end; gap: 12px; }
.language-nav { display: flex; align-items: center; gap: 3px; }
.mobile-menu { display: none; }

.language-nav a {
  display: grid;
  min-height: 44px;
  min-width: 44px;
  place-items: center;
  border-radius: 7px;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
}

.language-nav a:hover { background: #ebe9e1; }
.language-nav a[aria-current] { color: var(--accent); background: #ebe8ff; }

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.header-cta:hover { background: #4136b5; }

.intro {
  padding-block: clamp(42px, 7vw, 100px) clamp(28px, 4vw, 55px);
}

.intro h1 {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(2.45rem, 6.3vw, 6.2rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
}

.intro p {
  max-width: 51ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  scroll-margin-block-start: calc(var(--header-height) + 12px);
}

.project { min-width: 0; }
.project-featured { grid-column: 1 / -1; }

.project-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: inherit;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.project-link:hover {
  border-color: #aca3f3;
  box-shadow: 0 11px 25px #24214612;
}

.project-featured .project-link {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  background: #eae7fa;
  border-color: #ded8f4;
}

.project-image {
  aspect-ratio: 16 / 9;
  background: #e8e6f1;
  overflow: hidden;
}

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

.project-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 23px;
}

.project-featured .project-details {
  align-self: center;
  padding: clamp(24px, 4vw, 60px);
}

.project-category {
  margin: 0 0 9px;
  color: #41369d;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.project-details h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.15vw, 1.65rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.045em;
}

.project-featured h2 { font-size: clamp(1.8rem, 3.5vw, 3.25rem); }

.project-description {
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: .99rem;
  line-height: 1.6;
}

.project-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: auto 0 0;
  color: #38309a;
  font-size: .91rem;
  font-weight: 800;
}

.card-arrow {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid #dcd6f5;
  border-radius: 50%;
  font-size: 1rem;
  transition: background-color .2s ease, color .2s ease;
}

.project-link:hover .card-arrow { color: white; background: var(--accent); }

.contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-block: clamp(35px, 5vw, 66px) 29px;
  padding: clamp(24px, 4vw, 45px);
  border-radius: 18px;
  background: #211d32;
  color: white;
}

.contact h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.55rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.04em;
}

.contact a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #eae7fa;
  color: #211d32;
  font-weight: 800;
  text-decoration: none;
}

.contact a:hover { background: white; }

.footer {
  padding-block: 8px 30px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

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

@media (max-width: 930px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  :root { --header-height: 68px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .header-inner > .header-nav, .header-end { display: none; }
  .mobile-menu { display: block; }

  .mobile-menu summary {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary span { display: block; width: 19px; height: 2px; background: currentColor; }
  .mobile-menu[open] summary span:first-child { transform: translateY(4px) rotate(45deg); }
  .mobile-menu[open] summary span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .mobile-menu-panel {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    gap: 14px;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    padding: 16px max(16px, calc((100% - 1224px) / 2), 4vw) 24px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 10px 24px #19212412;
  }

  .mobile-menu:not([open]) .mobile-menu-panel { display: none; }
  .mobile-menu .header-nav { display: grid; gap: 0; }
  .mobile-menu .header-nav a { font-size: 1rem; }
  .mobile-menu .header-cta { justify-self: start; }
}

@media (max-width: 620px) {
  .container { width: calc(100% - 32px); }
  .brand img { width: 128px; }
  .projects { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .project-featured .project-link { display: flex; }
  .project-featured .project-details { align-self: stretch; padding: 23px; }
  .contact { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .project-link, .card-arrow { transition: none; }
}
