:root {
  color-scheme: light;
  --cream: #fbf1df;
  --paper: #fffdf8;
  --ink: #171717;
  --yellow: #ffc93c;
  --teal: #28c9b2;
  --muted: #625b4d;
  --line: 3px solid var(--ink);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--cream);
  color: var(--ink);
  font-family:
    "Segoe UI Variable", "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--cream);
  background-image: radial-gradient(circle, rgba(23, 23, 23, 0.075) 1.35px, transparent 1.5px);
  background-size: 26px 26px;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.language-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  background-color: var(--cream);
  background-image: radial-gradient(circle, rgba(23, 23, 23, 0.075) 1.35px, transparent 1.5px);
  background-size: 26px 26px;
}

.language-dialog {
  width: min(100%, 500px);
  padding: clamp(28px, 5vw, 46px);
  border: var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--ink);
}

.language-brand {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.language-dialog h1 {
  max-width: 10ch;
  margin: 16px 0 30px;
  font-size: clamp(38px, 7vw, 62px);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 0.98;
  text-wrap: balance;
}

.language-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.language-choices button {
  min-height: 58px;
  cursor: pointer;
  border: var(--line);
  border-radius: 12px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.language-choices button:hover {
  box-shadow: 6px 6px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.language-choices button:active {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}

.portfolio-shell {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 90;
  padding: 9px 13px;
  border: var(--line);
  border-radius: 10px;
  background: var(--yellow);
  font-weight: 850;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  min-height: 122px;
  align-items: flex-start;
  padding: 26px 30px 0;
}

.identity {
  display: grid;
  justify-items: start;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: var(--line);
  border-radius: 11px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.portfolio-heading {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.owner-name {
  font-weight: 950;
}

.portfolio-label {
  color: var(--muted);
  font-weight: 750;
}

.portfolio-heading:focus {
  outline: none;
}

.portfolio-main {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 24px;
}

.work-section {
  display: grid;
  width: 100%;
  place-items: center;
}

.project-row {
  display: flex;
  width: 20vw;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
  text-decoration: none;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-row:hover {
  background: var(--yellow);
  box-shadow: 7px 7px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.project-row:active {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}

.project-title {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-arrow {
  flex: none;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.site-footer {
  border: 0;
  background: transparent;
}

.footer-inner {
  display: flex;
  width: calc(100% - 60px);
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-inline: auto;
  padding-block: 20px 26px;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-chip {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: var(--line);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.contact-chip:hover {
  box-shadow: 6px 6px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.contact-chip:active {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}

.contact-x {
  background: var(--yellow);
}

.contact-email {
  background: var(--teal);
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.language-switch button {
  cursor: pointer;
  border: 0;
  padding: 8px 3px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.language-switch button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:focus-visible,
button:focus-visible {
  outline: 4px solid #3d7bff;
  outline-offset: 4px;
}

.not-found {
  display: grid;
  min-height: 100svh;
  place-content: center;
  gap: 22px;
  padding: 32px;
  text-align: center;
}

.not-found h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.95;
}

.eyebrow {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.primary-action {
  justify-self: center;
  padding: 12px 18px;
  border: var(--line);
  border-radius: 12px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
}

@media (max-width: 720px) {
  .site-header {
    min-height: 116px;
    padding: 22px 18px 0;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 19px;
  }

  .portfolio-heading {
    font-size: 16px;
  }

  .portfolio-main {
    padding-inline: 18px;
  }

  .project-row {
    width: min(78vw, 300px);
  }

  .footer-inner,
  .contact-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    width: calc(100% - 36px);
    gap: 18px;
    padding-block: 18px 24px;
  }

  .contact-links {
    width: 100%;
    gap: 12px;
  }

  .contact-chip {
    width: min(100%, 300px);
    min-height: 40px;
    justify-content: space-between;
    font-size: 12.5px;
  }

  .language-dialog {
    padding: 28px 22px;
    border-radius: 16px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .language-choices {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
