:root,
[data-theme="light"],
[data-theme="dark"] {
  --bg: #0a0a14;
  --ink: #f1eefb;
  --muted: #a9a6c2;
  --line: #2c2c4d;
  --accent: #1a6fff;
  --surface: #14142a;
  --card: #1c1c38;
  --pad: clamp(18px, 3vw, 36px);
  --max: 1180px;
  --sans: "Figtree", "Segoe UI", sans-serif;
  --display: "Syne", "Figtree", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(800px 420px at 88% -8%, #1a6fff33, transparent);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 680; letter-spacing: -0.045em; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 30;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  max-height: 80px;
  padding: 10px 0;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.05em;
  line-height: 1;
  text-decoration: none;
}
.mark img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #161616;
  object-fit: contain;
  padding: 5px;
  box-sizing: border-box;
}
.nav-right, .nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links { list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--accent); }
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.icon-btn {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}
.icon-btn:active { transform: translateY(1px); }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: end;
  padding: 28px 0 36px;
}
h1 {
  margin: 0;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.88;
}
.lede {
  margin: 16px 0 0;
  max-width: 36ch;
  font-size: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 22px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #f7f8fc;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
[data-theme="dark"] .btn { color: #121211; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.vitrin { display: block; text-decoration: none; }
.vitrin img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: #2a2a2a;
}
.peek {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 12px;
  align-items: end;
}
.peek a { text-decoration: none; }
.peek figure { margin: 0; }
.peek img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--card);
}
.peek figcaption {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.section { padding: 64px 0; }
h2 {
  margin: 0 0 22px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 0.95;
}

.filters { display: flex; gap: 8px; margin-bottom: 18px; }
.filters button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}
.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.bento {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 14px;
  align-items: stretch;
}
.work {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  min-height: 100%;
}
.work[hidden] { display: none; }
.shot {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  aspect-ratio: 16 / 10;
}
.work.app .shot { aspect-ratio: 4 / 5; }
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease;
}
.shot .alt {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.work:hover .shot .base,
.work:focus-visible .shot .base { opacity: 0; }
.work:hover .shot .alt,
.work:focus-visible .shot .alt { opacity: 1; }
.work-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-top: 10px;
}
.work h3 { margin: 0; font-size: 28px; }
.tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.empty { color: var(--muted); }

.about {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 36px;
  align-items: start;
}
.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--card);
}
.about p { max-width: 58ch; color: var(--muted); }
.about p strong { color: var(--ink); font-weight: 600; }
.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps span { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 4px; }
.steps h3 { margin: 0 0 4px; font-family: var(--sans); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.steps p { margin: 0; }

.tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.tools li {
  list-style: none;
  margin: 0;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
}

.contact {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
}
.mail {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
  text-underline-offset: 5px;
}
.socials { display: flex; gap: 16px; margin-top: 14px; }
.socials a { color: var(--accent); }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; }
input, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  outline: none;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); }
.hint, .error, #form-status { margin: 0; font-size: 14px; color: var(--muted); }
.error { color: #9b2c2c; }
[data-theme="dark"] .error { color: #ffb4b4; }
.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 32px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.case-hero { padding: 18px 0 10px; }
.case-hero p { max-width: 58ch; color: var(--muted); }
.back { font-family: var(--mono); font-size: 12px; text-decoration: none; color: var(--accent); }
.story {
  display: grid;
  gap: 28px;
  padding-bottom: 20px;
}
.story article h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 8px; }
.story p { max-width: 62ch; margin: 0; }
.gallery {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--card);
}
.gallery img:first-child { grid-row: span 2; min-height: 320px; }
.used { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.open-tag {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  pointer-events: none;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
}
.open-tag[hidden] { display: none !important; }
@media (hover: none), (pointer: coarse) {
  .open-tag { display: none !important; }
}

.js .rise {
  opacity: 0;
  transform: translateY(10px);
}
.js .rise.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .hero, .bento, .about, .contact, .gallery, .peek { grid-template-columns: 1fr; }
  .vitrin { margin-top: 8px; }
  .status { display: none; }
  .nav { max-height: none; flex-wrap: wrap; row-gap: 8px; }
  .nav-right { flex: 1 1 100%; justify-content: space-between; }
  .nav-links a { white-space: nowrap; }
  .shot { aspect-ratio: 16 / 11; }
  .work.app .shot { aspect-ratio: 4 / 5; }
  .tools { grid-template-columns: 1fr 1fr; }
  .gallery img:first-child { grid-row: auto; min-height: 0; }
  h1 { font-size: clamp(48px, 14vw, 72px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; transform: none; }
  .shot img { transition: none; }
  .open-tag { display: none !important; }
}
