/* ballioz.com: portfolio, imprint and 404. Tibblo's own pages use tibblo.css. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  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: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F7F7F4;
  --surface: #FFFFFF;
  --sunk: #EFEEEA;
  --ink: #121214;
  --ink-2: #5C5D64;
  --ink-3: #8A8B92;
  --line: #E3E2DD;
  --accent: #1F5BFF;
  --live: #17A34A;
  --soon: #D97706;
  --focus: #1F5BFF;
  --pad: 20px;
  --max: 1200px;
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E10;
    --surface: #16161A;
    --sunk: #1C1C21;
    --ink: #F1F1EF;
    --ink-2: #A0A1A8;
    --ink-3: #74757C;
    --line: #2A2A30;
    --accent: #7FA2FF;
    --live: #4ADE80;
    --soon: #FBBF24;
    --focus: #7FA2FF;
    color-scheme: dark;
  }
}
@media (min-width: 760px) { :root { --pad: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--bg); }
.ico { width: 18px; height: 18px; flex: none; }
.ico.fill { fill: currentColor; }
.ico.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

html[data-lang="en"] .l-tr,
html[data-lang="tr"] .l-en { display: none !important; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--pad); top: 12px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 50; border-radius: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.id { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-weight: 800; font-size: 15px; letter-spacing: -0.04em;
}
.who b { display: block; font-weight: 650; font-size: 16px; line-height: 1.15; letter-spacing: -0.01em; }
.who > span { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.2; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a.link { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav a.link:hover { color: var(--ink); background: var(--sunk); }
.lang { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sunk); margin-left: 6px; }
.lang button { font: inherit; font-size: 13px; font-weight: 650; border: 0; background: none; color: var(--ink-2); padding: 4px 9px; border-radius: 7px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
@media (max-width: 820px) { .nav a.link { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); line-height: 1.2; cursor: pointer;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .9; }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 10px; }

/* Hero */
.hero { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 72px; align-items: center; }
@media (min-width: 980px) { .hero { grid-template-columns: 7fr 5fr; gap: 64px; padding-top: 88px; padding-bottom: 104px; } }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-2); font-size: 15px; margin: 0 0 22px; }
.meta-line span { display: inline-flex; align-items: center; gap: 7px; }
.meta-line .ico { width: 16px; height: 16px; }
.hero h1 { margin: 0; font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 650; max-width: 15ch; }
.hero .lead { margin: 22px 0 0; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 54ch; }
.hero .lead a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line); text-decoration-thickness: 1.5px; }
.hero .lead a:hover { text-decoration-color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.shelf { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.shelf h2 { margin: 0; padding: 12px 14px 10px; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.shelf a { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; text-decoration: none; }
.shelf a:hover { background: var(--sunk); }
.shelf img { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.shelf b { display: block; font-weight: 650; letter-spacing: -0.01em; }
.shelf small { display: block; color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.shelf .arrow { color: var(--ink-3); }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.dot.soon::before { background: var(--soon); }

.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 10px 32px; align-items: center; padding-top: 18px; padding-bottom: 18px; color: var(--ink-2); font-size: 15px; }
.strip b { color: var(--ink-3); font-weight: 500; font-size: 13px; letter-spacing: 0.02em; margin-right: 4px; }
.strip span { color: var(--ink); font-weight: 600; }

/* Sections */
.section { padding-top: 88px; padding-bottom: 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 32px; }
.section-head h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; line-height: 1.08; font-weight: 650; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 46ch; }

/* Project cards */
.project { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; margin-bottom: 28px; }
.stage {
  position: relative; background: var(--stage); overflow: hidden;
  display: flex; justify-content: center; align-items: flex-end; gap: 3.5%;
  padding: 44px 6% 0; min-height: 300px;
}
.stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, rgba(0,0,0,.18)); pointer-events: none; }
.device-wrap { container-type: inline-size; width: 30%; max-width: 260px; flex: none; }
.device-wrap.main { width: 36%; max-width: 300px; z-index: 1; }
.device-wrap.side { margin-bottom: -12%; }
.device {
  background: #0A0A0B; padding: 3.2cqw; border-radius: 15cqw 15cqw 0 0; padding-bottom: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 30px 60px -24px rgba(0,0,0,.55);
}
.device img { width: 100%; border-radius: 12cqw 12cqw 0 0; aspect-ratio: var(--ar); object-fit: cover; object-position: top; }
.rpmbase { --stage: #0B1630; --ar: 945 / 2048; }
.rpmvault { --stage: #1B120C; --ar: 1012 / 2048; }
.tibblo { --stage: #F3DCC0; --ar: 852 / 1524; }
@media (min-width: 900px) { .stage { padding-top: 64px; min-height: 0; } }

.project-body { display: grid; gap: 28px; padding: 28px; }
@media (min-width: 900px) { .project-body { grid-template-columns: 5fr 4fr; gap: 56px; padding: 40px 44px 44px; } }
.p-title { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.p-title img { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.p-title h3 { margin: 0; font-size: 26px; letter-spacing: -0.025em; line-height: 1.1; font-weight: 650; }
.p-title small { display: block; color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.p-desc { margin: 0; color: var(--ink-2); font-size: 17px; max-width: 52ch; }
.p-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.facts { margin: 22px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.facts dd span { display: inline-flex; align-items: center; gap: 6px; }
.facts .ico { width: 15px; height: 15px; color: var(--ink-2); }
.built h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.built ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.built li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }

/* Experience */
.exp { display: grid; gap: 0; border-top: 1px solid var(--line); }
.job { display: grid; gap: 10px 40px; padding: 28px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .job { grid-template-columns: 4fr 8fr; } }
.job .when { color: var(--ink-3); font-size: 15px; font-variant-numeric: tabular-nums; }
.job h3 { margin: 2px 0 0; font-size: 20px; letter-spacing: -0.015em; font-weight: 650; }
.job .org { color: var(--ink-2); font-size: 15px; }
.job ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.job li { margin: 6px 0; }
.job li::marker { color: var(--ink-3); }
.job p { margin: 0; color: var(--ink-2); }

.skills { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 700px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .skills { grid-template-columns: repeat(4, 1fr); } }
.skill { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.skill h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.skill p { margin: 0; font-size: 15px; line-height: 1.6; }

/* Contact */
.contact { margin-top: 88px; background: var(--ink); color: var(--bg); border-radius: 28px; padding: 40px 28px; display: grid; gap: 28px; }
@media (min-width: 900px) { .contact { grid-template-columns: 7fr 5fr; padding: 56px; align-items: end; } }
.contact h2 { margin: 0 0 12px; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.03em; line-height: 1.06; font-weight: 650; }
.contact p { margin: 0; color: color-mix(in srgb, var(--bg) 70%, transparent); max-width: 44ch; }
.contact .mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; color: var(--bg); text-decoration: none; border-bottom: 2px solid color-mix(in srgb, var(--bg) 35%, transparent); padding-bottom: 2px; word-break: break-all; }
.contact .mail:hover { border-bottom-color: var(--bg); }
.contact .links { display: grid; gap: 10px; }
.contact .links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; text-decoration: none; background: color-mix(in srgb, var(--bg) 8%, transparent); color: var(--bg); font-weight: 600; }
.contact .links a:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.contact .links a span { display: inline-flex; align-items: center; gap: 10px; }

/* Plain pages (imprint, 404) */
.page { padding-top: 56px; padding-bottom: 96px; max-width: 760px; }
.page h1 { margin: 0 0 28px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.03em; line-height: 1.06; font-weight: 650; }
.page h2 { margin: 28px 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.page p { margin: 0 0 12px; color: var(--ink-2); }
.page p a { color: var(--ink); }
.list-links { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line); }
.list-links a { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }

/* Footer */
.site-foot { margin-top: 96px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-grid { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 40px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 5fr 2fr 2fr 2fr; } }
.foot-id { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-id { grid-column: auto; } }
.foot-id p { margin: 14px 0 0; color: var(--ink-2); font-size: 15px; max-width: 34ch; }
.site-foot h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.site-foot ul a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.site-foot ul a:hover { color: var(--ink); }
.site-foot ul .ico { width: 15px; height: 15px; }
.foot-bar { border-top: 1px solid var(--line); }
.foot-bar .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 18px; padding-bottom: 22px; color: var(--ink-3); font-size: 13px; }
.foot-bar a { color: var(--ink-3); text-decoration: none; }
.foot-bar a:hover { color: var(--ink); }
.foot-bar nav { display: flex; gap: 18px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }

/* Narrow screens */
.who b, .who > span { white-space: nowrap; }
@media (max-width: 560px) {
  .nav .btn.small span { display: none; }
  .nav .btn.small { padding: 8px 10px; }
  .device-wrap { width: 38%; }
  .device-wrap.main { width: 48%; }
  .stage { padding-top: 32px; gap: 4%; }
}

/* "Latest products": the list keeps going, fading out under the last real row */
.shelf { position: relative; overflow: hidden; padding-bottom: 0; }
.shelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(to bottom, transparent, var(--surface) 85%); pointer-events: none; }
.ghost { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 12px 14px; }
.g-icon { width: 56px; height: 56px; border-radius: 13px; background: var(--sunk); }
.g-lines { display: grid; gap: 7px; }
.g-lines i { display: block; height: 10px; border-radius: 5px; background: var(--sunk); }
.g-lines i:nth-child(1) { width: 38%; height: 12px; }
.g-lines i:nth-child(2) { width: 62%; }
.g-lines i:nth-child(3) { width: 44%; }

/* Smaller projects under the main three */
.mini { display: grid; gap: 4px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); text-decoration: none; }
.mini:hover { border-color: var(--ink-3); }
.mini-k { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.mini-t { font-size: 18px; } .mini-t b { font-weight: 650; }
.mini-d { color: var(--ink-2); font-size: 15px; }
.mini-a { color: var(--ink-2); font-size: 14px; margin-top: 6px; }

/* "How I work" quote under the intro */
.quote { padding-top: 8px; padding-bottom: 72px; }
.quote-k { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.quote blockquote { margin: 0; padding-left: 24px; border-left: 2px solid var(--line); max-width: 920px; }
.quote blockquote p { margin: 0; font-style: italic; font-weight: 450; font-size: clamp(20px, 2.3vw, 28px); line-height: 1.4; letter-spacing: -0.012em; color: var(--ink); }
@media (min-width: 980px) { .hero { padding-bottom: 72px; } }
