/* Base. Fonts, tokens, layout and components follow. */
:root { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
[hidden]:not([hidden=until-found i]) { display: none !important; }
/* Fonts are self-hosted (latin subset, variable, SIL OFL) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url(fonts/bricolage-grotesque-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/instrument-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/jetbrains-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Layout: two-column hero, projects, freelance services, Instagram pages, skills, about, FAQ, contact */
:root {
  --bg: #e8ebf1;
  --surface: #f6f7fa;
  --ink: #0e1220;
  --muted: #55607a;
  --line: #ccd2de;
  --accent: #2446f0;
  --accent-ink: #ffffff;
  --accent-soft: #d9e0fc;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f1a; --surface: #141929; --ink: #eceff8; --muted: #9aa5c2;
    --line: #262d44; --accent: #7b92ff; --accent-ink: #0a0f26; --accent-soft: #1c2548;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0f1a; --surface: #141929; --ink: #eceff8; --muted: #9aa5c2;
  --line: #262d44; --accent: #7b92ff; --accent-ink: #0a0f26; --accent-soft: #1c2548;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 12px 18px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: 1120px; margin: 0 auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; margin: 0; text-wrap: balance; letter-spacing: -0.03em; }
p { margin: 0; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }

header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; display: inline-flex; align-items: center; min-height: 44px; }
.brand .studio { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-left: auto; }
nav a { font-size: 15px; text-decoration: none; color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; }
nav a:hover { color: var(--ink); }

.hero { padding-block: 48px 64px; display: grid; gap: 26px; }
.hero h1 { font-size: clamp(54px, 12vw, 132px); letter-spacing: -0.045em; }
.hero-top { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-name { display: grid; gap: 10px; min-width: 0; }
.portrait { width: clamp(96px, 16vw, 168px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--accent); flex: none; }
.hero h1 span { color: var(--accent); }
.hero .sub { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 3.4vw, 36px); letter-spacing: -0.02em; line-height: 1.15; max-width: 26ch; }
.hero .lede { max-width: 60ch; color: var(--muted); font-size: 18px; }
.open { display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 99px; font-size: 14px; }
.open i { width: 9px; height: 9px; border-radius: 50%; background: #1fa971; flex: none; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 6px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { transform: translateY(-1px); }

/* avatar strip */
.strip { display: flex; gap: 14px; flex-wrap: wrap; padding-bottom: 8px; }
.strip img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); box-shadow: 0 0 0 1.5px var(--line); }

section { padding-block: 64px; border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 10px; margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(32px, 6vw, 60px); max-width: 18ch; }
.sec-head p.note { color: var(--muted); max-width: 56ch; }

/* wall of pages */
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pg { position: relative; display: grid; grid-template-columns: 48px 1fr; align-items: center; column-gap: 12px; row-gap: 0; padding: 12px 14px; min-height: 72px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; min-width: 0; transition: border-color .15s, transform .15s; }
.pg:hover { border-color: var(--accent); transform: translateY(-2px); }
.pg img { grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px var(--line); }
.pg h3 { font-size: 15px; letter-spacing: -0.03em; overflow-wrap: break-word; line-height: 1.15; }
.pg .cat { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.pg .go { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* products */
.work { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card h3 { font-size: 26px; }
.card p { color: var(--muted); font-size: 16px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }
.card.wide { grid-column: span 2; }
.card.feature { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); grid-column: span 2; }
.card.feature p { color: var(--accent-ink); opacity: .88; }
.card.feature .tag { border-color: rgba(255,255,255,.5); color: var(--accent-ink); }
.lnks { display: flex; flex-wrap: wrap; gap: 0 22px; }
.card a.lnk.lnk-a { color: var(--accent); font-weight: 600; font-size: 15px; }
.card a.lnk { color: inherit; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; min-height: 44px; width: fit-content; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.sk { padding: 24px; display: grid; gap: 8px; align-content: start; min-width: 0; background: var(--surface); }
.sk.ai { background: var(--accent-soft); }
.status { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent-soft); color: var(--ink); padding: 3px 9px; border-radius: 99px; width: fit-content; }
.sk h3 { font-size: 19px; letter-spacing: -0.02em; }
.sk p { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* freelance services */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.svc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.svc h3 { font-size: 22px; }
.svc p { color: var(--muted); font-size: 16px; line-height: 1.5; }
.svc .eg { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: none; color: var(--muted); margin-top: 4px; }
.svc .eg a { color: var(--accent); font-weight: 500; display: inline-block; padding-block: 14px; margin-block: -14px; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.about > div { min-width: 0; }
.bio { display: grid; gap: 16px; color: var(--muted); }
.bio p:first-child { color: var(--ink); font-size: 20px; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 22px 1fr; gap: 16px; padding-bottom: 28px; position: relative; }
.tl li::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); margin-top: 8px; justify-self: center; position: relative; z-index: 1; }
.tl li::after { content: ""; position: absolute; left: 10.5px; top: 20px; bottom: 0; width: 1px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl h3 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 3px; line-height: 1.2; }
.tl p { color: var(--muted); font-size: 16px; }

.contact { display: grid; gap: 22px; }
.contact h2 { font-size: clamp(36px, 7vw, 76px); max-width: 15ch; }
.mail { font-family: var(--mono); font-size: 18px; display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mail code { background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; border-radius: 6px; font-family: inherit; user-select: all; overflow-wrap: anywhere; }
.copy { font-family: var(--body); font-size: 14px; font-weight: 600; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 6px 8px; min-height: 44px; }
footer { padding-block: 32px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

.tl .when { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.tl h3 { text-wrap: pretty; }

.skills.two { grid-template-columns: repeat(2, 1fr); }
.skills.two .sk h3 { font-size: 18px; }
.skills.two .sk p { font-size: 16px; }

img.shot { width: 100%; aspect-ratio: 2.15 / 1; object-fit: cover; object-position: top center; border-radius: 8px; border: 1px solid var(--line); display: block; }
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
.phones img { width: 100%; height: auto; border-radius: 14px; border: 1px solid rgba(255,255,255,0.35); display: block; min-width: 0; }
.cap { font-size: 13px; opacity: .8; font-style: italic; }
.merch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.merch img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }

.flyers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.flyers img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); display: block; }
img.logo-shot { aspect-ratio: 16 / 10; object-fit: contain; background: #ffffff; }

/* motion and interaction */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.hero > :not(.hero-top), .hero-top > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }
.hero > *:nth-child(5) { animation-delay: 0.32s; }
.hero > *:nth-child(6) { animation-delay: 0.4s; }
.hero > *:nth-child(7) { animation-delay: 0.48s; }
.strip img { animation: bob 5s ease-in-out infinite; }
.strip img:nth-child(2) { animation-delay: 0.5s; }
.strip img:nth-child(3) { animation-delay: 1s; }
.strip img:nth-child(4) { animation-delay: 1.5s; }
.strip img:nth-child(5) { animation-delay: 2s; }
.strip img:nth-child(6) { animation-delay: 2.5s; }
.strip img:nth-child(7) { animation-delay: 3s; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.pg img { transition: box-shadow 0.2s; }
.pg:hover img { box-shadow: 0 0 0 3px var(--accent), 0 10px 26px -6px var(--accent); }
.card:not([hidden]) { animation: pop 0.35s ease both; }
.proof { display: flex; gap: clamp(24px, 6vw, 64px); flex-wrap: wrap; }
.proof div { display: grid; gap: 4px; }
.proof b { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 7vw, 64px); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.proof span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.filters button { font: 500 13px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 16px; min-height: 44px; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 99px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tgl { font: 500 13px var(--body); background: none; border: 1px solid var(--line); color: var(--ink); padding: 6px 16px; min-height: 44px; border-radius: 99px; cursor: pointer; }
.tgl:hover { border-color: var(--accent); }

@media (min-width: 900px) {
  /* hero: copy on the left, large portrait on the right */
  .hero { grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 400px); column-gap: clamp(40px, 6vw, 80px); align-items: start; }
  .hero-top { display: contents; }
  .hero > *, .hero-top > .hero-name { grid-column: 1; }
  .hero .portrait { grid-column: 2; grid-row: 1 / span 7; align-self: center; width: 100%; height: auto; box-shadow: 0 0 0 4px var(--accent), 0 30px 80px -24px var(--accent); }
  .hero .proof { display: grid; grid-template-columns: repeat(2, max-content); gap: 20px 56px; }
}
@media (max-width: 960px) {
  .work { grid-template-columns: 1fr; }
  .card.feature { grid-column: auto; }
    .card.wide { grid-column: auto; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .about { grid-template-columns: 1fr; gap: 22px; }
  .hero { padding-block: 28px 48px; }
  .skills, .skills.two, .svc-grid { grid-template-columns: 1fr; }
  section { padding-block: 48px; }
  .tgl { order: 2; }
  nav { gap: 2px; order: 3; flex-basis: 100%; margin-left: -8px; }
  nav a { font-size: 14px; padding-inline: 8px; }
  .tgl { font-size: 12px; padding: 5px 14px; }
  .proof { gap: 20px; display: grid; grid-template-columns: repeat(2, 1fr); }
  .proof span { font-size: 11px; }
  .phones { gap: 8px; }
  .hero .btns { display: grid; grid-template-columns: 1fr 1fr; }
  .hero .btns .primary { grid-column: 1 / -1; }
  .hero .btns .btn { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .pg:hover, .card:hover { transform: none; }
  .hero > *, .hero-top > *, .strip img, .card:not([hidden]) { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* extracted from former inline styles */
.card.feature p.tagline { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.05; letter-spacing: -0.025em; opacity: 1; color: inherit; }
.sec-head.tight { margin-bottom: 24px; }
.btns.spaced { margin-top: 28px; }
.contact .note { color: var(--muted); max-width: 52ch; }
