@font-face { font-family: Onest; src: url('assets/fonts/onest-regular.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Onest; src: url('assets/fonts/onest-semibold.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
:root {
  color-scheme: light;
  --glass-light: 250 248 242;
  --glass-dark: 24 35 28;
  --secondary: #e4e9e2;
  --sky: #8d9cb8;
  --tile-radius: 28px;
  --thumb-size: 88px;
  font-family: Onest, sans-serif;
  color: rgb(var(--glass-light));
  background: #202822;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { background: rgb(var(--glass-light)); color: rgb(var(--glass-dark)); }
.filter-definitions { position: absolute; pointer-events: none; }
.hero { position: relative; width: min(100%, 480px); height: 100svh; min-height: 480px; margin-inline: auto; background: var(--sky); }
.portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.identity { position: absolute; inset: max(42px, calc(env(safe-area-inset-top) + 18px)) 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; }
h1 { margin: 0; line-height: 0; }
.wordmark { display: block; width: 218px; height: auto; opacity: .98; filter: drop-shadow(0 2px 10px #26313b1f); }
.socials { display: flex; gap: 2px; }
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(15 22 18 / .55) 17px, transparent 18px);
  color: rgb(var(--glass-light));
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(var(--glass-light) / .12);
  transition: background-color 160ms ease, color 160ms ease;
}
.socials svg { width: 18px; height: 18px; }
.socials a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.socials a:active { background: rgb(var(--glass-light)); color: rgb(var(--glass-dark)); }
@media (hover: hover) { .socials a:hover { background: rgb(var(--glass-light)); color: rgb(var(--glass-dark)); } }
.projects {
  position: absolute;
  inset: auto 0 max(12px, env(safe-area-inset-bottom));
  padding-bottom: 44px;
}
.project-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  margin: 0 8% 0 auto;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgb(15 22 18 / .78);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.project-hint svg { width: 15px; height: 15px; }
.project-hint-back svg { rotate: 180deg; }
.project-track {
  display: flex;
  gap: 12px;
  padding: 8px 8% 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.project-link {
  position: relative;
  display: grid;
  flex: 0 0 100%;
  min-width: 0;
  border-radius: var(--tile-radius);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(var(--glass-light) / .12);
}
.glass {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: rgb(var(--glass-dark) / .91);
  box-shadow: inset 0 1px 0 rgb(var(--glass-light) / .42),
    inset 0 0 0 1px rgb(var(--glass-light) / .20),
    inset 0 -1px 0 rgb(var(--glass-light) / .13),
    0 14px 28px -17px #101712;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: linear-gradient(145deg, rgb(var(--glass-dark) / .57), rgb(15 22 18 / .74));
    -webkit-backdrop-filter: blur(18px) saturate(1.24);
    backdrop-filter: blur(18px) saturate(1.24);
  }
}
.project-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--thumb-size) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
}
.project-thumb {
  display: block;
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 17px;
  object-fit: contain;
  background: #111513;
}
.project-copy h2 {
  margin: 0;
  font-size: clamp(20px, 5.8vw, 24px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.project-description { margin: 7px 0 0; color: var(--secondary); font-size: 14px; line-height: 1.3; text-wrap: pretty; }
.project-action {
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 12px 7px 15px;
  border-radius: 99px;
  background: rgb(7 11 8 / .64);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}
.project-action svg { width: 16px; height: 16px; }
.project-link:is(:active, :focus-visible) .project-action { background: rgb(var(--glass-light)); color: rgb(var(--glass-dark)); }
.project-link:focus-visible { outline: 2px solid rgb(var(--glass-light)); outline-offset: 2px; }
.project-link:focus-visible .glass { box-shadow: 0 0 0 3px rgb(var(--glass-dark) / .8); }
.project-controls:not([hidden]) {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-step { display: none; }
.project-pagination {
  --dot-target: 44px;
  position: relative;
  display: flex;
  width: max-content;
  padding-inline: 2px;
  border-radius: 99px;
  background: rgb(15 22 18 / .76);
}
.project-pagination::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: calc(2px + var(--dot-target) / 2);
  width: 18px;
  height: 6px;
  border-radius: 99px;
  background: currentColor;
  transform: translate(calc(-50% + var(--project-position, 0) * var(--dot-target)), -50%) scaleX(var(--project-stretch, 1));
  pointer-events: none;
}
.project-pagination button {
  display: grid;
  place-items: center;
  width: var(--dot-target);
  height: var(--dot-target);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.project-pagination button::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: currentColor;
  opacity: .64;
}
.project-pagination button:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
@media (hover: hover) {
  .project-link:hover .project-action { background: rgb(var(--glass-light)); color: rgb(var(--glass-dark)); }
  .project-pagination button:hover::before { opacity: 1; }
  .project-step:not(:disabled):hover { background: rgb(var(--glass-light)); color: rgb(var(--glass-dark)); }
}
@media (max-width: 360px), (max-height: 660px) {
  :root { --tile-radius: 23px; --thumb-size: 68px; }
  .identity { top: max(28px, calc(env(safe-area-inset-top) + 12px)); }
  .wordmark { width: 196px; }
  .project-panel { padding: 14px; gap: 10px; }
  .project-thumb { border-radius: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .project-track { scroll-behavior: smooth; }
  .wordmark { animation: identity-in 700ms cubic-bezier(.16,1,.3,1) both; }
  .project-panel > * { animation: content-in 460ms cubic-bezier(.16,1,.3,1) 50ms both; }
  @keyframes identity-in { from { opacity: 0; transform: translateY(8px); } to { opacity: .98; transform: translateY(0); } }
  @keyframes content-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) {
  .project-action { transition: none; }
  .socials a { transition: none; }
  .project-pagination::after { --project-stretch: 1; }
}

@media (min-width: 960px) and (min-aspect-ratio: 4/3) {
  .hero {
    --desktop-inset: clamp(24px, 3vw, 64px);
    --tile-radius: 24px;
    --thumb-size: clamp(48px, 4.2vw, 72px);
    width: 100%;
    min-height: 540px;
  }
  .portrait { object-position: center top; }
  .identity {
    inset: clamp(32px, 6vh, 72px) var(--desktop-inset) auto auto;
    align-items: center;
    gap: 10px;
  }
  .socials { gap: 8px; }
  .socials a { background: rgb(15 22 18 / .55); }
  .socials svg { width: 21px; height: 21px; }
  .wordmark { width: clamp(224px, 16vw, 312px); filter: drop-shadow(0 2px 12px #18231c66); }
  .projects {
    inset: auto var(--desktop-inset) clamp(20px, 3vh, 40px);
    padding-bottom: 0;
  }
  .project-track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(10px, 1.1vw, 20px);
    padding: 4px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .project-hint, .project-controls:not([hidden]) { display: none; }
  .project-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    padding: clamp(14px, 1.3vw, 22px);
  }
  .project-thumb { border-radius: 12px; }
  .project-copy h2 { min-height: 2.16em; font-size: clamp(17px, 1.4vw, 24px); }
  .project-description { font-size: clamp(13px, 1vw, 15px); }
  .project-action { grid-column: 1; min-height: 40px; }
}
