/* sdk-dev portfolio. Design: Claude Design "Portfolio v2" (see design/). */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --bg: #17171f;
  --surface: #1e1e27;
  --line: #2a2a33;
  --text: #ececf1;
  --text-muted: #8e8e9a;
  --accent: #8b7cf6;
  --tag-accent-bg: #3a3360;
  --tag-bg: #2c2c34;
  --stripe: #22222b;

  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 790px;
  --gutter: 20px;
  --radius-button: 6px;
  --radius-tag: 4px;
  --radius-device: 28px;
  --section-space: clamp(64px, 10vw, 112px);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --surface: #f1f1f5;
    --line: #e4e4ea;
    --text: #16161d;
    --text-muted: #6b6b78;
    --accent: #6a58e0;
    --tag-accent-bg: #e9e5fd;
    --tag-bg: #ececf1;
    --stripe: #e8e8ee;

    color-scheme: light;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted {
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 10;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-button);
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow--muted {
  margin: 24px 0 10px;
  color: var(--text-muted);
}

/* ---------- Buttons, badges, tags ---------- */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  transition: border-color 0.15s, color 0.15s;
}

.button:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.button--primary {
  border-color: var(--accent);
  color: var(--accent);
}

.button--primary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.button--small {
  padding: 6px 10px;
  font-size: 12px;
}

.badge {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-tag);
  background: var(--tag-bg);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.badge--production {
  background: var(--tag-accent-bg);
}

.badge--beta,
.badge--in-development {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  padding: 3px 7px;
  border-radius: var(--radius-tag);
  background: var(--tag-bg);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.tag--accent {
  background: var(--tag-accent-bg);
}

.tags--outline .tag {
  border: 1px solid var(--line);
  background: transparent;
}

/* ---------- Header & footer ---------- */

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px;
}

.site-header__name {
  font-size: 14px;
  font-weight: 600;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12px;
  font-weight: 500;
}

.lang-switch {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-footer {
  margin-top: var(--section-space);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 24px 40px;
  color: var(--text-muted);
  font-size: 11px;
}

.site-footer__links {
  display: flex;
  gap: 16px;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(56px, 12vw, 120px) clamp(48px, 10vw, 96px);
}

.hero__title {
  font-size: clamp(40px, 8.5vw, 64px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.hero__name,
.hero__tagline {
  display: block;
}

.hero__tagline {
  max-width: 13ch;
  color: var(--text-muted);
}

.hero__intro {
  max-width: 470px;
  margin: 24px 0 28px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- Sections ---------- */

.section {
  padding-top: var(--section-space);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-size: clamp(24px, 4vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-head__count {
  font-size: 12px;
}

.subhead {
  margin: 32px 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.lead {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 15px;
  opacity: 0.88;
}

.two-col {
  display: grid;
  gap: 24px;
}

/* Hairline above a section. The sections are .container elements with side padding, where a
   border would run 20px past the content on each side, so the line is drawn inside the gutters. */
.two-col + .two-col,
#projects + .two-col,
#contact {
  margin-top: var(--section-space);
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}

/* ---------- Filter ---------- */

.filter {
  padding-block: 20px 4px;
}

.filter__label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 11px;
}

.filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--text-muted);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--tag-accent-bg);
}

.filter__empty {
  margin-top: 16px;
  font-size: 14px;
}

/* ---------- Project rows ---------- */

.project-row {
  display: grid;
  gap: 28px;
  align-items: center;
  padding-block: 40px;
  border-bottom: 1px solid var(--line);
}

.project-row[hidden] {
  display: none;
}

.project-row__media {
  justify-self: center;
}

.project-row__media:hover {
  color: inherit;
}

@media (min-width: 720px) {
  .project-row {
    grid-template-columns: auto 1fr;
    gap: 72px;
    padding-block: 40px;
  }

  .project-row--flip {
    grid-template-columns: 1fr auto;
  }

  .project-row--flip .project-row__media {
    order: 2;
  }
}

.project-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11px;
}

.project-row__number {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.project-row__name {
  margin-bottom: 12px;
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.project-row__summary {
  max-width: 400px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.project-row__body .tags {
  margin-bottom: 20px;
}

/* ---------- Device frames ---------- */

.device {
  flex: none;
  width: 200px;
}

.device__screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  border: 8px solid var(--surface);
  border-radius: var(--radius-device);
  outline: 1px solid var(--line);
  background: var(--bg);
}

.device--mac {
  width: 300px;
}

.device--mac .device__screen {
  aspect-ratio: 16 / 10;
  border-width: 6px;
  border-radius: 12px;
}

.device__screen img,
.device__screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: calc(var(--radius-device) - 10px);
  background: repeating-linear-gradient(135deg, var(--bg) 0 14px, var(--stripe) 14px 28px);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

.device--mac .device__placeholder {
  border-radius: 6px;
}

/* Screenshots that already include a device frame. */
.device--framed img {
  width: 100%;
}

/* ---------- Project detail ---------- */

.project__back {
  padding-top: 32px;
  font-size: 13px;
}

.project__header {
  padding-block: 40px 32px;
}

.project__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 14px;
}

.project__name {
  margin-bottom: 14px;
  font-size: clamp(40px, 8vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.project__summary {
  max-width: 520px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 16px;
}

.project__gallery {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-block: 8px 24px;
  scroll-snap-type: x mandatory;
  border-bottom: 1px solid var(--line);
}

.project__gallery .device {
  scroll-snap-align: start;
}

.project__content {
  display: grid;
  gap: 48px;
  padding-top: 48px;
}

@media (min-width: 720px) {
  .project__content {
    grid-template-columns: 1.4fr 1fr;
  }
}

.project__story .section-title,
.project__specs .section-title {
  margin-bottom: 16px;
}

.project__story p {
  margin-bottom: 14px;
  font-size: 15px;
}

.highlights {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.highlights li {
  position: relative;
  padding-left: 18px;
}

.highlights li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.specs__row {
  display: grid;
  gap: 6px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.specs__row:first-child {
  border-top: 1px solid var(--line);
}

.specs dt {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Experience ---------- */

.timeline__item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.timeline__item:first-child {
  padding-top: 0;
}

.timeline__period {
  padding-top: 2px;
  font-size: 11px;
}

.timeline__role {
  font-size: 14px;
  font-weight: 500;
}

.timeline__place {
  font-size: 12px;
}

/* ---------- Contact, legal, 404 ---------- */

.contact__title {
  margin-bottom: 24px;
  font-size: clamp(36px, 7vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.legal p {
  max-width: 640px;
  margin-bottom: 12px;
  font-size: 14px;
}

.legal .highlights {
  margin-bottom: 16px;
}

.legal a {
  color: var(--accent);
}

.notfound .section-title {
  margin-bottom: 12px;
}

.notfound p {
  margin-bottom: 24px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ---------- Videos & Mac screenshots ---------- */

.project__video {
  margin: 0 0 32px;
}

.project__video video {
  width: 100%;
  border-radius: 12px;
  outline: 1px solid var(--line);
  background: var(--surface);
}

/* Portrait phone recordings: limit the height instead of filling the column. */
.project__video--phone video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(80vh, 720px);
  margin: 0 auto;
  border-radius: 28px;
}

.project__video figcaption {
  margin-top: 8px;
  font-size: 12px;
}

/* Mac window screenshots already include the window chrome. */
.device--mac.device--framed img {
  border-radius: 10px;
}

.project__gallery--mac .device--framed {
  width: auto;
}

.project__gallery--mac .device--framed img {
  width: auto;
  max-width: none;
  height: clamp(220px, 40vw, 360px);
}

/* ---------- Lightbox ---------- */

.device__zoom {
  display: block;
  border-radius: inherit;
  cursor: zoom-in;
}

.device__screen .device__zoom {
  height: 100%;
}

html:has(.lightbox[open]) {
  overflow: hidden;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overscroll-behavior: contain;
}

.lightbox::backdrop {
  background: color-mix(in srgb, var(--bg) 97%, transparent);
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  margin: 0;
  padding: 64px 16px 24px;
  touch-action: pan-y pinch-zoom;
}

.lightbox__image {
  max-width: min(100%, 1600px);
  max-height: calc(100dvh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.2s, transform 0.2s;
}

.lightbox__image.is-dragging {
  transition: none;
}

.lightbox__caption {
  display: flex;
  gap: 12px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.lightbox__counter {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.lightbox__button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s;
}

.lightbox__button:hover {
  border-color: var(--text-muted);
}

.lightbox__button--close {
  top: 16px;
  right: 16px;
  font-size: 16px;
}

.lightbox__button--prev,
.lightbox__button--next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__button--prev {
  left: 16px;
}

.lightbox__button--next {
  right: 16px;
}

.lightbox__button[hidden] {
  display: none;
}

/* On small screens swiping replaces the side arrows. */
@media (max-width: 719px), (pointer: coarse) {
  .lightbox__button--prev,
  .lightbox__button--next {
    display: none;
  }
}
