/* ==========================================================================
   janmichalicka.cz — Ján Michalička, senior full-stack developer
   Single stylesheet. No frameworks, no external requests.
   Colours live in the :root block below; dark mode overrides follow it.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin + latin-ext only) ------------------ */
@font-face {
  font-family: 'Jakarta';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/jakarta-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: 'Jakarta';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/jakarta-latin-ext.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Jakarta';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/jakarta-italic-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: 'Jakarta';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/jakarta-italic-latin-ext.woff2') format('woff2');
  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;
}

/* ---------- Design tokens — LIGHT ---------------------------------------- */
:root {
  --violet: #5b4be0;
  --violet-soft: #7c6dff;
  --teal: #0fb4a6;
  --amber: #ff7a45;

  --bg: #fafaff;
  --bg-deep: #f2f2fb;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --ink: #14152b;
  --ink-soft: #3b3d5c;
  --muted: #5e6080;
  --line: rgba(20, 21, 43, 0.1);
  --line-strong: rgba(20, 21, 43, 0.16);

  --accent: var(--violet);
  --accent-ink: #ffffff;
  --accent-tint: rgba(91, 75, 224, 0.1);
  --ok: #0f9d71;

  --shadow-sm: 0 1px 2px rgba(20, 21, 43, 0.05), 0 2px 8px rgba(20, 21, 43, 0.04);
  --shadow-md: 0 2px 6px rgba(20, 21, 43, 0.06), 0 14px 34px rgba(20, 21, 43, 0.08);
  --shadow-lg: 0 6px 14px rgba(20, 21, 43, 0.07), 0 30px 70px rgba(20, 21, 43, 0.14);

  --aurora-1: rgba(124, 109, 255, 0.4);
  --aurora-2: rgba(15, 180, 166, 0.28);
  --aurora-3: rgba(255, 122, 69, 0.22);
  --grain: 0.035;

  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 44px);
  --sans: 'Jakarta', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  color-scheme: light;
}

/* ---------- Design tokens — DARK ----------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0a0b16;
    --bg-deep: #07080f;
    --surface: #14152a;
    --glass: rgba(26, 28, 51, 0.66);
    --glass-strong: rgba(22, 24, 44, 0.88);
    --ink: #edeef8;
    --ink-soft: #c6c8df;
    --muted: #9699bd;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);

    --accent: #8b7bff;
    --accent-ink: #0a0b16;
    --accent-tint: rgba(139, 123, 255, 0.16);
    --teal: #2bd4c4;
    --amber: #ff9a6b;
    --ok: #2bd48f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.4), 0 14px 34px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.45), 0 30px 70px rgba(0, 0, 0, 0.6);

    --aurora-1: rgba(123, 103, 255, 0.4);
    --aurora-2: rgba(16, 190, 175, 0.26);
    --aurora-3: rgba(255, 122, 69, 0.18);
    --grain: 0.055;

    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0a0b16;
  --bg-deep: #07080f;
  --surface: #14152a;
  --glass: rgba(26, 28, 51, 0.66);
  --glass-strong: rgba(22, 24, 44, 0.88);
  --ink: #edeef8;
  --ink-soft: #c6c8df;
  --muted: #9699bd;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);

  --accent: #8b7bff;
  --accent-ink: #0a0b16;
  --accent-tint: rgba(139, 123, 255, 0.16);
  --teal: #2bd4c4;
  --amber: #ff9a6b;
  --ok: #2bd48f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.4), 0 14px 34px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.45), 0 30px 70px rgba(0, 0, 0, 0.6);

  --aurora-1: rgba(123, 103, 255, 0.4);
  --aurora-2: rgba(16, 190, 175, 0.26);
  --aurora-3: rgba(255, 122, 69, 0.18);
  --grain: 0.055;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The aurora: three soft colour fields pinned behind everything. */
body::before {
  content: '';
  position: fixed;
  inset: -20vh -10vw;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 12% 4%, var(--aurora-1), transparent 62%),
    radial-gradient(38vw 38vw at 92% 18%, var(--aurora-2), transparent 60%),
    radial-gradient(44vw 44vw at 68% 86%, var(--aurora-3), transparent 62%);
  filter: blur(14px);
}
/* A whisper of grain so the gradients never band. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 {
  margin: 0 0 0.4em;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 100;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s;
}
.skip:focus { top: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Shared bits --------------------------------------------------- */
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
}

.grad {
  background: linear-gradient(104deg, var(--violet-soft) 4%, var(--accent) 34%, var(--teal) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme='dark'] .grad,
.lead { }

.lead {
  font-size: clamp(1.03rem, 0.95rem + 0.4vw, 1.2rem);
  color: var(--ink-soft);
  line-height: 1.6;
}

.section {
  position: relative;
  padding-block: clamp(58px, 7.5vw, 104px);
}
/* A contained hairline marks each section boundary. */
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(min(100%, var(--wrap)) - var(--gutter) * 2);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 22%, var(--line-strong) 78%, transparent);
}
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 4.5vw, 56px); }
.section-head h2 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem); }
.section-head .lead { margin-top: 14px; }

.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Pills used for tech tags */
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tags li {
  font-family: var(--mono);
  font-size: 0.705rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--accent-tint);
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  color: #fff;
  background-image: linear-gradient(100deg, var(--violet) 0%, var(--violet-soft) 52%, var(--teal) 130%);
  box-shadow: 0 6px 18px rgba(91, 75, 224, 0.3);
}
:root[data-theme='dark'] .btn-primary { color: #0a0b16; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .btn-primary { color: #0a0b16; }
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(91, 75, 224, 0.38); }
.btn-ghost {
  color: var(--ink);
  background: var(--glass-strong);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(0); }

/* ---------- Header -------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}
.masthead.is-stuck {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.masthead > .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand .mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background-image: linear-gradient(135deg, var(--violet) 0%, var(--violet-soft) 46%, var(--teal) 100%);
  box-shadow: 0 4px 12px rgba(91, 75, 224, 0.34);
}
.brand .name { font-size: 1rem; }
.brand .name small {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .masthead .brand .name small { display: none; }
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: block;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}
.nav a:hover { background: var(--accent-tint); color: var(--accent); }

.tools { display: flex; align-items: center; gap: 8px; }

.lang {
  display: flex;
  align-items: center;
  /* It is a <p>, so it inherits margin-bottom: 1em. In .tools (align-items: center)
     the MARGIN box is what gets centred, which lifts the pill by half that margin. */
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--glass);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}
.lang a, .lang span {
  /* Flex-centred rather than relying on line-height, so the mono font's metrics
     can't push the label off-centre inside its pill. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--muted);
}
.lang a:hover { color: var(--accent); }
.lang [aria-current] { background: var(--accent); color: var(--accent-ink); }

.icon-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--glass);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, transform 0.18s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .i-sun { display: none; }
:root[data-theme='dark'] .icon-btn .i-sun { display: block; }
:root[data-theme='dark'] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .icon-btn .i-sun { display: block; }
  :root:not([data-theme='light']) .icon-btn .i-moon { display: none; }
}

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    padding: 10px;
    border-radius: var(--radius);
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  /* Without JS the menu can't open, so keep the links inline instead. */
  html:not(.js) .nav {
    position: static;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  html:not(.js) .nav ul { flex-direction: row; flex-wrap: wrap; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .masthead > .wrap { flex-wrap: wrap; padding-block: 12px; }
}

/* ---------- Hero ---------------------------------------------------------- */
.hero { padding-block: clamp(44px, 7vw, 86px) clamp(56px, 8vw, 104px); }
.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 11px;
  margin-bottom: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.status .dot {
  position: relative;
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
}
.status .dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  opacity: 0.55;
  animation: ping 2.4s ease-out infinite;
}
/* Swap one class in the HTML to go from booked (amber) to available (green). */
.status.is-open .dot,
.status.is-open .dot::after { background: var(--ok); border-color: var(--ok); }
.status.is-open .dot::after { background: none; }
@keyframes ping {
  0% { transform: scale(0.75); opacity: 0.65; }
  75%, 100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .status .dot::after { animation: none; }
}

.hero h1 {
  font-size: clamp(2.35rem, 1.1rem + 5.3vw, 4.15rem);
  letter-spacing: -0.045em;
  margin-bottom: 22px;
}
.hero .lead { font-size: clamp(1.06rem, 0.98rem + 0.46vw, 1.26rem); max-width: 52ch; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
  max-width: 440px;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.facts b {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.facts span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Tilted stack of live project screenshots */
.showcase {
  position: relative;
  aspect-ratio: 1 / 0.98;
  perspective: 1400px;
}
.showcase figure {
  position: absolute;
  margin: 0;
  width: 72%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.showcase img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.showcase .s1 { top: 1%;    left: 0;   transform: rotate(-4.2deg); z-index: 3; }
.showcase .s2 { top: 30%;   right: 0;  transform: rotate(3.4deg);  z-index: 2; }
.showcase .s3 { bottom: 1%; left: 8%;  transform: rotate(-1.4deg); z-index: 1; }
.showcase:hover .s1 { transform: rotate(-5.6deg) translate(-10px, -10px); }
.showcase:hover .s2 { transform: rotate(4.8deg) translate(10px, 0); }
.showcase:hover .s3 { transform: rotate(-2.2deg) translate(-5px, 12px); }
@media (prefers-reduced-motion: reduce) {
  .showcase figure, .showcase:hover figure { transition: none; }
}
@media (max-width: 999px) {
  .showcase { max-width: 540px; margin-inline: auto; }
}

/* ---------- Work ---------------------------------------------------------- */
.work-grid {
  display: grid;
  gap: clamp(20px, 2.4vw, 28px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
@media (prefers-reduced-motion: reduce) {
  .project, .project:hover { transform: none; transition: none; }
}

.project .shot {
  position: relative;
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}
.project .shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.project:hover .shot img { transform: scale(1.035); }
@media (prefers-reduced-motion: reduce) {
  .project .shot img, .project:hover .shot img { transform: none; transition: none; }
}
.project .where {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.project .body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  padding: 22px clamp(18px, 2.2vw, 24px) clamp(20px, 2.4vw, 26px);
}
.project h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.03em; }
.project h3 a { color: inherit; text-decoration: none; }
.project h3 a::after { content: ''; position: absolute; inset: 0; }
.project .body > p { margin: 0; font-size: 0.925rem; color: var(--muted); line-height: 1.6; }
.project .role {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.project .tags { margin-top: auto; padding-top: 4px; }
.project .visit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.project .visit svg { width: 15px; height: 15px; transition: transform 0.2s; }
.project:hover .visit svg { transform: translate(2px, -2px); }
.project { position: relative; }

.note-line {
  margin-top: clamp(24px, 3vw, 36px);
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-tint);
  font-size: 0.93rem;
  color: var(--ink-soft);
  max-width: 90ch;
}

/* ---------- Stack --------------------------------------------------------- */
.stack-grid {
  display: grid;
  gap: clamp(18px, 2.2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.stack-card { padding: clamp(20px, 2.4vw, 28px); }
.stack-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.stack-card h3 svg { width: 20px; height: 20px; flex: none; color: var(--accent); }

/* ---------- Timeline ------------------------------------------------------ */
.timeline { position: relative; max-width: 880px; margin: 0; padding: 0 0 0 30px; list-style: none; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--teal) 55%, transparent);
}
.timeline > li { position: relative; padding-bottom: clamp(26px, 3vw, 38px); }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--accent);
}
.timeline > li.now::before {
  background-image: linear-gradient(135deg, var(--violet), var(--teal));
  border-color: transparent;
  box-shadow: 0 0 0 4px var(--accent-tint);
}
.tl-when {
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}
.timeline h3 { margin: 5px 0 2px; font-size: 1.1rem; letter-spacing: -0.025em; }
.tl-where { margin: 0 0 8px; font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.timeline p { margin: 0; font-size: 0.93rem; color: var(--muted); line-height: 1.6; }
.timeline .tags { margin-top: 10px; }

.earlier {
  margin-top: clamp(28px, 3.4vw, 42px);
  padding: clamp(20px, 2.4vw, 28px);
}
.earlier h3 { font-size: 1.02rem; margin-bottom: 14px; }
.earlier dl { display: grid; gap: 10px; margin: 0; }
.earlier dl > div {
  display: grid;
  gap: 2px 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.earlier dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 620px) {
  .earlier dl > div { grid-template-columns: 170px 1fr; align-items: baseline; }
}
.earlier dt {
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.earlier dd { margin: 0; font-size: 0.93rem; color: var(--ink-soft); }
.earlier dd b { color: var(--ink); }

/* ---------- About --------------------------------------------------------- */
.about-grid {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
@media (min-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
}
.about-grid > div:last-child { max-width: 68ch; }
.portrait {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  /* A flat surface, not the gradient: the photo's antialiased rounded corners let whatever
     sits underneath show through as a 1px ring, and a gradient makes that ring visible. */
  background: var(--surface);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
/* Gradient tile with initials — the no-photo variant. Add is-empty to .portrait to use it. */
.portrait.is-empty {
  background-image: linear-gradient(140deg, var(--violet) 0%, var(--violet-soft) 45%, var(--teal) 100%);
}
.portrait .initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 4.4rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.92);
}
.values { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.values li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.values svg { width: 20px; height: 20px; margin-top: 2px; color: var(--teal); }

/* ---------- Contact / imprint --------------------------------------------- */
.contact-grid {
  display: grid;
  gap: clamp(20px, 2.6vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  align-items: start;
}
.panel { padding: clamp(22px, 2.6vw, 30px); }
.panel h3 { font-size: 1.05rem; margin-bottom: 16px; }

address { font-style: normal; line-height: 1.75; color: var(--ink-soft); }
address strong { color: var(--ink); }

.rows { display: grid; gap: 11px; margin: 16px 0 0; }
.rows > div {
  display: grid;
  gap: 2px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.rows dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rows dd {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.97rem;
  color: var(--ink);
}
.rows .val { font-variant-numeric: tabular-nums; letter-spacing: -0.005em; }
.rows .note { font-size: 0.8rem; font-weight: 500; color: var(--muted); }

.copy {
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.copy:hover { color: var(--accent); border-color: var(--accent); }
.copy.is-done { color: var(--ok); border-color: var(--ok); background: transparent; }
html:not(.js) .copy { display: none; }

.cta-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, var(--accent-tint), transparent 62%),
    var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: var(--shadow-md);
}
.cta-panel h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); margin: 0; }
.cta-panel .btn { align-self: flex-start; }
.links { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.links a:hover { color: var(--accent); }
.links svg { width: 18px; height: 18px; flex: none; color: var(--accent); }

/* ---------- Footer -------------------------------------------------------- */
.site-footer {
  margin-top: 0;
  padding-block: clamp(36px, 4vw, 54px) 30px;
  border-top: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.footer-grid {
  display: grid;
  gap: clamp(26px, 3.4vw, 46px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  margin-bottom: 30px;
}
.site-footer h2 {
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 13px;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer ul.plain li { font-size: 0.93rem; color: var(--muted); }
.footer-brand p { margin-top: 12px; font-size: 0.9rem; color: var(--muted); max-width: 32ch; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- Reveal on scroll (JS adds the classes) ------------------------ */
.reveal.is-pending { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal.is-pending { opacity: 1; transform: none; }
}

/* ---------- Standalone centred pages (404, redirects) --------------------- */
.center-page {
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px var(--gutter);
}
.center-page .big {
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 0 0 8px;
  background: linear-gradient(104deg, var(--violet-soft), var(--accent) 40%, var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.center-page .lead { margin-bottom: 26px; }

/* Root language gate (public/index.html) — no header, so the brand must not
   keep the margin-right:auto it carries inside .masthead. */
.lang-gate .brand { margin-right: 0; }
.lang-gate .lead { margin: 26px 0; }
.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 0;
}

@media print {
  body::before, body::after { display: none; }
  .masthead, .site-footer, .hero-actions, .copy { display: none; }
}
