/* frenkli.dev — shared styles */

:root {
  --bg: #ffffff;
  --alt: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --off: #e5e5ea;
  --now: #1fa34a;
  --now-bg: #ddf5e4;
  --now-ink: #0e6b2e;
  --bar: rgba(255, 255, 255, 0.86);
  --draw: #1d1d1f;
  --logo-wave: #6b8cff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.14);
  --r-xl: 28px;
  --r-lg: 24px;
  --r-md: 16px;
  --max: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --alt: #101012;
  --card: #1c1c1e;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #2c2c2e;
  --accent: #6b8cff;
  --accent-ink: #ffffff;
  --off: #2c2c2e;
  --now: #32d74b;
  --now-bg: #12301a;
  --now-ink: #7ee29a;
  --bar: rgba(22, 22, 23, 0.86);
  --draw: #d2d2d7;
  --logo-wave: #2f5bea;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.8; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + 48px); margin: 0 auto; padding: 0 24px; }
.section { padding-block: 120px; }
.section--alt { background: var(--alt); }
.section--tight { padding-block-start: 0; }
.center { text-align: center; }

/* Type */
.eyebrow { font-size: 21px; font-weight: 600; color: var(--muted); margin: 0; }
.h-hero { margin: 0; font-size: clamp(48px, 8vw, 96px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.02; }
.h-page { margin: 0; font-size: clamp(48px, 7vw, 80px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.h-section { margin: 0; font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.035em; }
.h-block { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.025em; }
.lead { margin: 0; font-size: clamp(19px, 2.2vw, 24px); color: var(--muted); letter-spacing: -0.01em; }
.muted { color: var(--muted); }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 18px; font-weight: 500; padding: 14px 26px; border-radius: 999px; border: 0;
}
.link { color: var(--accent); font-weight: 500; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: var(--bg);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600;
}
.pill--locked { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.chip { font-size: 13px; font-weight: 500; background: var(--alt); border-radius: 999px; padding: 6px 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ico { width: 1em; height: 1em; flex: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50; height: 64px;
  background: var(--bar); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.logo__wave { animation: logo-flow 1.8s linear infinite; }
@keyframes logo-flow { from { transform: translateX(0); } to { transform: translateX(7px); } }
@media (prefers-reduced-motion: reduce) { .logo__wave { animation: none; } }
.nav__links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav__links a { font-size: 15px; color: var(--muted); }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__tools { display: flex; align-items: center; gap: 14px; }
.icon-btn { background: none; border: 0; padding: 6px; color: var(--ink); display: flex; border-radius: 999px; }
.lang-btn { background: none; border: 0; padding: 6px 4px; font-size: 14px; color: var(--muted); }
.lang-btn b { color: var(--ink); font-weight: 700; }
.nav__cta { background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; }
.nav__menu { display: none; }
.nav__panel { display: none; }

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__tools { margin-left: auto; }
  .nav__menu { display: flex; }
  .nav__panel {
    position: absolute; left: 0; right: 0; top: 64px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 24px; flex-direction: column;
  }
  .nav__panel.is-open { display: flex; }
  .nav__panel a { padding: 14px 0; font-size: 22px; font-weight: 600; border-bottom: 1px solid var(--line); }
  .nav__panel a[aria-current="page"] { color: var(--accent); }
}

/* Hero */
.hero { padding-block: 120px 72px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.hero__actions { display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* Start page: Berlin across the Spree (colours live on the SVG so the mirrored copy inherits them) */
.scene { display: block; width: 100%; height: auto; min-height: 150px; max-height: 300px; color: var(--draw); }
.scene .sc-train { animation: sc-train 14s linear infinite; }
.scene .sc-ref { color: var(--accent); opacity: 0.32; transform-box: view-box; transform-origin: 720px 150px; animation: sc-wobble 4s ease-in-out infinite; }
.scene .sc-w path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.scene .sc-w1 { stroke-opacity: 0.6; animation: sc-flow 7s linear infinite; }
.scene .sc-w2 { stroke-opacity: 0.38; animation: sc-flow 10s linear infinite; }
.scene .sc-w3 { stroke-opacity: 0.2; animation: sc-flow 14s linear infinite; }
@keyframes sc-flow { from { transform: translateX(0); } to { transform: translateX(160px); } }
@keyframes sc-train { from { transform: translateX(990px); } to { transform: translateX(1420px); } }
@keyframes sc-wobble { 0%, 100% { transform: skewX(-3deg); } 50% { transform: skewX(3deg); } }
@media (prefers-reduced-motion: reduce) {
  .scene .sc-train, .scene .sc-ref, .scene .sc-w1, .scene .sc-w2, .scene .sc-w3 { animation: none; }
  .scene .sc-train { transform: translateX(1150px); }
}

/* Start page menu under the skyline */
.home-menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-block: 56px 120px; }
.home-menu__item { background: var(--alt); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 8px; min-height: 190px; transition: transform 0.2s ease, background 0.2s ease; }
.home-menu__item:hover { opacity: 1; transform: translateY(-3px); }
.home-menu__item svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 6px; }
.home-menu__title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.home-menu__text { font-size: 15px; line-height: 1.45; color: var(--muted); }
.home-menu__arrow { margin-top: auto; align-self: flex-end; font-size: 22px; color: var(--accent); transition: transform 0.2s ease; }
.home-menu__item:hover .home-menu__arrow { transform: translateX(4px); }
@media (max-width: 960px) { .home-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .home-menu__item { min-height: 160px; padding: 20px; } .home-menu__title { font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { .home-menu__item, .home-menu__arrow { transition: none; } }

/* Browser frame */
.browser { border-radius: var(--r-xl); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.browser__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.browser__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.browser__url { flex: 1; text-align: center; font-size: 13px; color: var(--muted); margin-right: 52px; }
.browser img { width: 100%; height: clamp(260px, 42vw, 600px); object-fit: cover; object-position: top; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 20px; }

/* App tiles (start page) */
.tile { background: var(--bg); border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 48px; }
.tile__name { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.tile__line { font-size: 19px; color: var(--muted); margin-top: 8px; padding: 0 32px; }
.tile__links { display: flex; gap: 24px; margin-top: 18px; font-size: 17px; }
.tile__shot { margin-top: 36px; width: 86%; border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden; border: 1px solid var(--line); border-bottom: 0; }
.tile__shot img { width: 100%; height: 260px; object-fit: cover; object-position: top; }

/* Link cards */
.link-card { background: var(--alt); border-radius: var(--r-xl); padding: 36px; display: flex; flex-direction: column; gap: 14px; min-height: 220px; }
.link-card svg { width: 40px; height: 40px; color: var(--accent); }
.link-card__title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.link-card .link { margin-top: auto; }

/* Apps page */
.app-row { background: var(--alt); border-radius: var(--r-xl); overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; scroll-margin-top: 90px; }
.app-row__text { flex: 1 1 380px; padding: 48px; display: flex; flex-direction: column; gap: 14px; }
.app-row__kind { font-size: 14px; font-weight: 600; color: var(--accent); }
.app-row__name { margin: 0; font-size: 44px; font-weight: 700; letter-spacing: -0.035em; }
.app-row__line { margin: 0; font-size: 19px; line-height: 1.45; color: var(--muted); }
.app-row .chip { background: var(--bg); }
.app-row__links { display: flex; gap: 24px; margin-top: 14px; font-size: 17px; flex-wrap: wrap; }
.app-row__shot { flex: 1 1 520px; align-self: stretch; padding-top: 40px; display: flex; align-items: flex-end; }
.app-row__shot div { width: 100%; border-radius: var(--r-md) 0 0 0; overflow: hidden; border: 1px solid var(--line); border-right: 0; border-bottom: 0; }
.app-row__shot img { width: 100%; height: 340px; object-fit: cover; object-position: top left; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.more-card { display: flex; flex-direction: column; gap: 12px; }
.more-card img { width: 100%; height: 170px; object-fit: cover; object-position: top; border-radius: 18px; border: 1px solid var(--line); }
.more-card__name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.more-card__line { font-size: 15px; color: var(--muted); margin-top: -6px; }

/* Projects page */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px; }
.filter {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 999px; padding: 9px 18px; font-size: 15px; font-weight: 500;
}
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 20px; }
.project { background: var(--alt); border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 90px; }
.project[hidden] { display: none; }
.project__shot { display: block; padding: 28px 28px 0; }
.project__shot img { width: 100%; height: 260px; object-fit: cover; border-radius: var(--r-md) var(--r-md) 0 0; border: 1px solid var(--line); border-bottom: 0; }
.project__body { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 12px; flex: 1; border-top: 1px solid var(--line); }
.project__kind { font-size: 14px; font-weight: 600; color: var(--accent); }
.project__name { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
.project__line { margin: 0; font-size: 17px; line-height: 1.45; color: var(--muted); }
.project .chip { background: var(--bg); }
.project__links { display: flex; gap: 24px; margin-top: auto; padding-top: 10px; font-size: 17px; flex-wrap: wrap; }

/* Case study */
.case-head { padding-block: 72px 56px; }
.case-head__kind { margin-top: 40px; font-size: 17px; }
.case-head__title { margin-top: 18px; font-size: clamp(56px, 9vw, 104px); }
.case-head__tagline { margin: 18px 0 0; font-size: clamp(24px, 3vw, 30px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.case-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.next-card__k { display: block; font-size: 15px; }
.next-card__v { display: block; font-size: 36px; font-weight: 700; letter-spacing: -0.03em; }
.facts dt { margin: 0; }
.facts dd { margin: 6px 0 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.fact__k { display: block; font-size: 13px; color: var(--muted); }
.fact__v { display: block; font-size: 18px; font-weight: 600; margin-top: 6px; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.number__big { display: block; font-size: 64px; font-weight: 700; letter-spacing: -0.04em; color: var(--accent); line-height: 1.1; }
.number__label { display: block; font-size: 17px; color: var(--muted); margin-top: 8px; }
.story { display: flex; flex-direction: column; gap: 72px; }
.story__row { display: flex; gap: 48px; flex-wrap: wrap; }
.story__row h2 { margin: 0; flex: 0 0 300px; font-size: 32px; font-weight: 700; letter-spacing: -0.025em; }
.story__row div { flex: 1 1 500px; display: flex; flex-direction: column; gap: 14px; }
.story__row p { margin: 0; font-size: 20px; line-height: 1.55; color: var(--muted); }
.next-card { background: var(--alt); border-radius: var(--r-xl); padding: 44px 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }

/* Career */
.page-head { padding-block: 100px 72px; }
.page-head__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.page-head__text { display: flex; flex-direction: column; gap: 16px; }
.cv-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.cv-buttons[hidden] { display: none; }

.company { background: var(--alt); border-radius: var(--r-lg); padding: 26px 28px; display: flex; flex-direction: column; gap: 22px; border: 2px solid transparent; }
.company--current { border-color: var(--accent); }
.company__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.company__name { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.company__meta { font-size: 14px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.roles { list-style: none; margin: 0; padding: 0; }
.role { display: flex; gap: 14px; }
.role__rail { width: 14px; flex: none; display: flex; flex-direction: column; align-items: center; }
.role__dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; border: 2px solid var(--accent); background: var(--alt); }
.role--now .role__dot { background: var(--accent); }
.role__line { width: 2px; flex: 1; min-height: 18px; background: var(--line); margin: 4px 0; }
.role:last-child .role__line { display: none; }
.role__body { display: flex; justify-content: space-between; gap: 12px; flex: 1; padding-bottom: 16px; flex-wrap: wrap; }
.role__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; font-weight: 500; }
.role--now .role__title { font-weight: 700; }
.role__when { font-size: 14px; color: var(--muted); }
.now { display: inline-flex; align-items: center; gap: 5px; background: var(--now-bg); color: var(--now-ink); border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.now::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--now); }
.company .chip { background: var(--bg); padding: 5px 11px; }
.company__links { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); margin-top: auto; }

.degree { background: var(--bg); border-radius: var(--r-xl); padding: 44px; display: flex; flex-direction: column; gap: 18px; }
.degree__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.degree__name { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.03em; }
.degree .chip { background: var(--alt); font-size: 14px; padding: 7px 14px; }
.cert { background: var(--bg); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.cert svg { width: 34px; height: 34px; color: var(--accent); }
.cert__name { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.langs { list-style: none; margin: 0; padding: 0; }
.lang { display: flex; align-items: center; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lang__name { flex: 0 0 160px; font-size: 20px; font-weight: 600; }
.lang__bar { flex: 1 1 300px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.lang__bar span { height: 8px; border-radius: 4px; background: var(--off); }
.lang__bar span.on { background: var(--accent); }
.lang__lvl { flex: 0 0 90px; text-align: right; font-size: 16px; color: var(--muted); }

/* About */
.about { padding-block: 96px 110px; }
.about__row { display: flex; gap: 64px; flex-wrap: wrap; align-items: center; }
.about__photo { flex: 0 1 420px; width: 420px; height: 540px; object-fit: cover; object-position: 50% 20%; border-radius: var(--r-xl); }
.about__text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 22px; }
.about__facts { margin: 10px 0 0; }
.about__facts div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 17px; }
.about__facts dt { color: var(--muted); }
.about__facts dd { margin: 0; font-weight: 600; text-align: right; }

.contact { display: flex; gap: 64px; flex-wrap: wrap; }
.contact__intro { flex: 1 1 340px; display: flex; flex-direction: column; gap: 18px; }
.contact__links { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; font-size: 18px; }
.form { flex: 1 1 480px; background: var(--bg); border-radius: var(--r-xl); padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.form input, .form textarea {
  font: inherit; font-size: 17px; font-weight: 400; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.form textarea { resize: vertical; min-height: 140px; }
.form .btn { align-self: flex-start; margin-top: 6px; }
.form__status { margin: 0; font-size: 15px; min-height: 1.5em; }

/* Footer */
.footer { padding-top: 100px; }
.footer__skyline { display: block; width: 100%; height: auto; }
.footer__skyline .s { fill: none; stroke: var(--draw); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer__skyline .w { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.footer__skyline .train { fill: #ffcc00; stroke: var(--draw); stroke-width: 2; }
.footer__skyline .acc { fill: var(--accent); }
.footer__skyline .tower { fill: var(--bg); }

/* Moving footer: the Spree flows, the U1 crosses the Oberbaum Bridge */
.footer__skyline .flow { animation: fz-flow 2.4s linear infinite; }
.footer__skyline .ubahn { transform: translateX(924px); animation: fz-ubahn 9s linear infinite; }
@keyframes fz-flow { from { transform: translateX(0); } to { transform: translateX(48px); } }
@keyframes fz-ubahn {
  0% { transform: translateX(620px); }
  100% { transform: translateX(1310px); }
}
@media (prefers-reduced-motion: reduce) {
  .footer__skyline .flow, .footer__skyline .ubahn { animation: none; }
}
.footer__bottom { background: var(--alt); padding: 40px 0 28px; font-size: 13px; color: var(--muted); }
.footer__cols { display: flex; gap: 48px; flex-wrap: wrap; }
.footer__brand { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.footer__brand strong { font-size: 17px; color: var(--ink); letter-spacing: -0.02em; }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col strong { color: var(--ink); font-weight: 600; }
.footer__legal { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 28px; }

@media (max-width: 640px) {
  .section { padding-block: 80px; }
  .hero { padding-block: 80px 56px; }
  .app-row__text, .degree, .form, .link-card { padding: 28px; }
  .about__photo { height: 420px; }
  .story__row h2 { flex-basis: 100%; }
  .lang__name { flex-basis: 110px; }
}
