@font-face {
  font-family: "Onest";
  src: url("assets/onest-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #fafbfc;
  --ink: #242930;
  --secondary: #626b77;
  --rule: #dfe3e8;
  --accent: #285dc1;
  --selection: #dbe6fb;
  --font: "Onest", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font);
  background: var(--page);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: #adb7c5 var(--page);
  scrollbar-width: thin;
}

* { box-sizing: border-box; }

body { margin: 0; }

::selection { background: var(--selection); color: var(--ink); }

a { color: inherit; }

a:focus-visible, button:focus-visible, .photo-track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 2px;
}

h1, h2, h3, p, figure { margin: 0; }

svg { flex-shrink: 0; }

.page {
  width: min(100% - 64px, 800px);
  margin-inline: auto;
  padding-block: clamp(48px, 8vw, 96px) 40px;
}

.intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}

.intro-copy { min-width: 0; }

h1 {
  font-size: clamp(36px, 4.2vw, 54px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.profession {
  margin-top: 16px;
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.intro-note {
  margin-top: 5px;
  color: var(--secondary);
  font-size: 17px;
  line-height: 1.6;
}

.portrait {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  margin-top: 4px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8ecef;
}

h2 {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}

.projects { scroll-margin-top: 32px; }

.project {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 24px;
  align-items: center;
  column-gap: 22px;
  margin-top: 16px;
  padding-block: 27px;
  border-block: 1px solid var(--rule);
  text-decoration: none;
  -webkit-tap-highlight-color: var(--selection);
}

.project-icon {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

h3 {
  width: fit-content;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 220ms var(--ease), text-decoration-color 220ms var(--ease);
}

.project-description {
  margin-top: 5px;
  font-size: 16px;
  line-height: 1.6;
}

.project-detail {
  margin-top: 5px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.6;
}

.project-arrow {
  color: var(--secondary);
  transition: transform 300ms var(--ease), color 220ms var(--ease);
}

.project:is(:hover, :focus-visible) h3 {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.project:is(:hover, :focus-visible) .project-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.personal { margin-top: 44px; }

.photo-track {
  position: relative;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  aspect-ratio: 3 / 1;
  border-radius: 3px;
  background: var(--rule);
}

.photo-track::-webkit-scrollbar { display: none; }

.photo-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.photo-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.photo-caption {
  min-width: 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.65;
}

.personal-title {
  color: var(--ink);
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
}

.photo-controls { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.photo-controls[hidden] { display: none; }

.photo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: var(--selection);
  transition: color 180ms var(--ease), background-color 180ms var(--ease);
}

.photo-button:is(:hover, :focus-visible) { color: var(--accent); background: var(--selection); }
.photo-button:active { background: var(--rule); }

.photo-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 52px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.photo-count-divider { color: var(--secondary); }

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

.contact {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.contact-primary, .contact-secondary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.contact-primary { font-size: 15px; line-height: 1.6; }

.email { color: var(--accent); }

.professional-links, .social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 180ms var(--ease), text-decoration-color 180ms var(--ease);
}

.text-link:is(:hover, :focus-visible) {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.link-arrow { color: var(--secondary); }

.contact-secondary {
  margin-top: 6px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.6;
}

.social-links { column-gap: 20px; }

.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 1;
  padding: 12px 16px;
  background: var(--page);
  color: var(--accent);
  transform: translateY(-160%);
}

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

@media (max-width: 600px) {
  .page { width: calc(100% - 48px); padding-block: 48px 28px; }
  .intro { gap: 16px; margin-bottom: 40px; }
  h1 { font-size: 36px; }
  .portrait { width: 56px; height: 56px; margin-top: 0; }
  .profession { margin-top: 14px; font-size: 17px; }
  .intro-note { margin-top: 8px; font-size: 15px; }
  .project { grid-template-columns: 48px minmax(0, 1fr) 20px; column-gap: 16px; padding-block: 24px; }
  .project-icon { width: 48px; height: 48px; border-radius: 12px; }
  h3 { font-size: 21px; }
  .project-description { font-size: 15px; line-height: 1.5; }
  .project-detail { font-size: 12px; }
  .project-arrow { width: 20px; height: 20px; }
  .personal { margin-top: 32px; }
  .photo-caption { font-size: 12px; }
  .contact { margin-top: 30px; padding-top: 18px; }
  .contact-primary { align-items: flex-start; flex-direction: column; gap: 2px; }
  .text-link { min-height: 44px; }
  .contact-secondary { align-items: flex-end; gap: 2px 16px; margin-top: 8px; }
  .site-address { padding-block: 12px; }
}

@media (max-width: 360px) {
  .page { width: calc(100% - 40px); }
  .intro { flex-direction: column-reverse; gap: 20px; }
  .project { column-gap: 12px; grid-template-columns: 44px minmax(0, 1fr) 18px; }
  .project-icon { width: 44px; height: 44px; }
  .project-detail { max-width: 18ch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .project:is(:hover, :focus-visible) .project-arrow { transform: none; }
}
