/* =========================================================================
   Digital CV platform — shared styles.
   Colours and the display font come from the profile's theme.css
   (profiles/<name>/theme.css), loaded after this file.
========================================================================= */
:root {
  --radius: 16px;
  --radius-sm: 11px;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-body: "Inter", system-ui, sans-serif;
}

/* =========================================================================
   Base
========================================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.6s var(--ease), color 0.4s var(--ease);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* =========================================================================
   Ambient background
========================================================================= */
.bg-mesh { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: 0.5; will-change: transform;
}
.blob-1 { width: 46vw; height: 46vw; background: var(--accent); top: -12vw; left: -8vw; animation: drift1 22s var(--ease) infinite alternate; }
.blob-2 { width: 40vw; height: 40vw; background: var(--blob-2); bottom: -14vw; right: -10vw; opacity: 0.35; animation: drift2 26s var(--ease) infinite alternate; }
.blob-3 { width: 30vw; height: 30vw; background: var(--accent-soft); top: 40%; left: 55%; opacity: 0.25; animation: drift3 30s var(--ease) infinite alternate; }
[data-theme="light"] .blob { opacity: 0.28; }
[data-theme="light"] .blob-2 { opacity: 0.2; }

@keyframes drift1 { to { transform: translate(8vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-9vw, -8vh) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-12vw, 6vh) scale(0.9); } }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.5;
}

.cursor-glow {
  position: fixed; top: 0; left: 0; width: 460px; height: 460px; z-index: -1;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgb(var(--accent-rgb) / 0.12), transparent 65%);
  transform: translate(-50%, -50%); transition: opacity 0.4s; opacity: 0;
}
@media (hover: hover) and (pointer: fine) { .cursor-glow { opacity: 1; } }

/* =========================================================================
   Top bar
========================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  transition: padding 0.3s var(--ease);
}
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; opacity: 0; transition: opacity 0.4s var(--ease), border-color 0.4s var(--ease);
}
.topbar.scrolled::before { opacity: 1; border-bottom-color: var(--border); }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-size: 14px; letter-spacing: -0.03em;
  box-shadow: 0 4px 14px rgb(var(--accent-rgb) / 0.35);
}
.brand-name { font-size: 15px; letter-spacing: -0.01em; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--text-dim);
  border-radius: 9px; transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface); }

.controls { display: flex; gap: 8px; }
.lang-toggle, .theme-toggle {
  display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.lang-toggle:hover, .theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.theme-toggle { width: 38px; padding: 0; justify-content: center; }
.lang-opt { transition: color 0.25s; color: var(--text-faint); }
.lang-opt.is-active { color: var(--accent); }
.lang-sep { color: var(--text-faint); }

.ic-moon { display: none; }
[data-theme="light"] .ic-sun { display: none; }
[data-theme="light"] .ic-moon { display: block; }

@media (max-width: 720px) { .nav { display: none; } .brand-name { display: none; } }

/* =========================================================================
   Hero
========================================================================= */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 13vh, 150px) 24px clamp(60px, 9vh, 110px);
  position: relative;
}
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--accent); padding: 7px 14px; border: 1px solid var(--border);
  border-radius: 100px; background: var(--surface); margin-bottom: 26px;
}
.hero-title { font-size: clamp(3.2rem, 11vw, 7.5rem); font-weight: 800; margin-bottom: 24px; }
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(100deg, var(--accent-soft), var(--accent), var(--accent-deep));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-lead { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--text-dim); max-width: 38ch; margin-bottom: 36px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 12px;
  font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; box-shadow: 0 8px 24px rgb(var(--accent-rgb) / 0.32); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgb(var(--accent-rgb) / 0.42); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-2); }

.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(28px, 6vw, 64px); list-style: none; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--text-dim));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats span { font-size: 13.5px; color: var(--text-dim); }

.scroll-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 14px; }
.scroll-hint span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: var(--accent); border-radius: 4px; transform: translateX(-50%); animation: scrollPulse 1.8s var(--ease) infinite; }
@keyframes scrollPulse { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 14px); } 100% { opacity: 0; } }
@media (max-width: 720px) { .scroll-hint { display: none; } }

/* =========================================================================
   Sections
========================================================================= */
.section { padding: clamp(64px, 10vh, 120px) 0; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 44px; }
.section-no { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--accent); opacity: 0.7; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
.section-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); align-self: center; }

.prose { font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: var(--text-dim); max-width: 68ch; }

.contact-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 500; color: var(--text-dim);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.chip-link:not(.static):hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.chip-link svg { color: var(--accent); flex-shrink: 0; }

/* =========================================================================
   Timeline
========================================================================= */
.timeline { position: relative; display: flex; flex-direction: column; gap: 22px; }
.tl-item {
  position: relative; display: grid; grid-template-columns: 200px 1fr; gap: 28px;
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 3px 0 0 3px;
  background: linear-gradient(var(--accent), var(--accent-deep)); transform: scaleY(0); transform-origin: top;
  transition: transform 0.5s var(--ease);
}
.tl-item:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-3px); }
.tl-item:hover::before { transform: scaleY(1); }
.tl-period { font-size: 13.5px; font-weight: 600; color: var(--accent); letter-spacing: 0.01em; }
.tl-role { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 2px; }
.tl-company { font-size: 14.5px; font-weight: 500; color: var(--text-dim); margin-bottom: 14px; }
.tl-body { font-size: 15px; color: var(--text-dim); line-height: 1.65; margin-bottom: 18px; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-soft);
}
[data-theme="light"] .tag { color: var(--accent-deep); }
@media (max-width: 720px) { .tl-item { grid-template-columns: 1fr; gap: 14px; padding: 22px; } }

/* =========================================================================
   AI agents
========================================================================= */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.agent-card {
  position: relative; padding: 28px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.agent-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s var(--ease);
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%);
}
.agent-card:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-4px); }
.agent-card:hover::after { opacity: 1; }
.agent-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.agent-glyph {
  display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent-soft);
}
[data-theme="light"] .agent-glyph { color: var(--accent-deep); }
.agent-name { font-family: var(--font-display); font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
.agent-tagline { font-size: 13px; font-weight: 600; color: var(--accent); }
.agent-body { font-size: 15px; color: var(--text-dim); line-height: 1.65; margin-bottom: 18px; position: relative; z-index: 1; }

/* =========================================================================
   Employers grid
========================================================================= */
.employer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.emp-card {
  padding: 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
.emp-card:hover { border-color: var(--accent); transform: translateY(-3px); background: var(--surface-2); }
.emp-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; margin-bottom: 3px; }
.emp-role { font-size: 14px; color: var(--text-dim); margin-bottom: 12px; }
.emp-period { font-size: 12.5px; font-weight: 600; color: var(--accent); }

/* =========================================================================
   Skills
========================================================================= */
.skill-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.skill-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color 0.3s var(--ease), background 0.3s var(--ease); }
.skill-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; }
.skill-card h3::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  font-size: 13px; font-weight: 500; padding: 6px 13px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
.skill-chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* =========================================================================
   Education / two column
========================================================================= */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.col-title { font-size: 1.1rem; margin: 0 0 18px; color: var(--text); }
.col-title:not(:first-child) { margin-top: 36px; }
.line-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.line-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 4px; border-bottom: 1px solid var(--border);
}
.line-list .li-title { font-weight: 500; font-size: 15px; }
.line-list .li-meta { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }

.lang-list { list-style: none; display: flex; flex-direction: column; gap: 18px; margin-bottom: 8px; }
.lang-list li { display: flex; flex-direction: column; gap: 8px; }
.lang-head { display: flex; justify-content: space-between; align-items: baseline; }
.lang-head .l-name { font-weight: 600; font-size: 15px; }
.lang-head .l-level { font-size: 13px; color: var(--text-dim); }
.lang-dots { display: flex; gap: 6px; }
.lang-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); transition: background 0.4s var(--ease); }
.lang-dots span.on { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; gap: 12px; } }

/* =========================================================================
   Footer
========================================================================= */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 48px; }
.footer-cta {
  text-align: center; padding: clamp(56px, 9vh, 96px) 24px; border-radius: 28px;
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--surface);
  border: 1px solid var(--border); margin-bottom: 28px;
}
.footer-cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 28px; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-faint); }
.tailor-link { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; transition: color 0.2s, text-decoration-color 0.2s; }
.tailor-link:hover, .tailor-link:focus-visible { color: var(--accent); text-decoration-color: currentColor; }

/* =========================================================================
   Reveal animation
========================================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .blob { animation: none !important; }
}

/* fade for language swaps */
.lang-swapping [data-i18n], .lang-swapping .timeline, .lang-swapping .employer-grid,
.lang-swapping .skill-groups, .lang-swapping .line-list, .lang-swapping .lang-list { transition: opacity 0.2s var(--ease); opacity: 0.35; }

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =========================================================================
   PDF download controls (screen)
========================================================================= */
.pdf-dl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hero-cta + .pdf-dl { margin: -36px 0 56px; }
.pdf-dl-center { justify-content: center; margin-top: 22px; }
.pdf-dl-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-dim); margin-right: 4px; }
.pdf-btn {
  height: 34px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.pdf-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.pdf-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* =========================================================================
   AI tailor panel (owner only, /#tailor)
========================================================================= */
.tailor {
  width: min(620px, calc(100vw - 32px)); margin: auto; padding: 0;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.tailor::backdrop { background: rgba(6, 7, 10, 0.6); backdrop-filter: blur(4px); }
.tailor-form { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.tailor-head { display: flex; justify-content: space-between; align-items: center; }
.tailor-head h2 { font-size: 1.3rem; }
.tailor-x { background: none; border: 0; color: var(--text-dim); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.tailor-x:hover { color: var(--text); background: var(--surface-2); }
.tailor-hint { font-size: 13.5px; color: var(--text-dim); }
.tailor-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-dim); }
.tailor-field textarea, .tailor-field input {
  font: inherit; font-weight: 400; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
}
.tailor-field textarea { resize: vertical; min-height: 140px; }
.tailor-field textarea:focus, .tailor-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.tailor-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.tailor-lang { border: 0; display: flex; gap: 14px; align-items: center; font-size: 14px; }
.tailor-lang legend { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.tailor-lang input { accent-color: var(--accent); }
.tailor-pass { flex: 1; min-width: 180px; }
.tailor-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tailor-actions .btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.tailor-status { font-size: 13.5px; color: var(--text-dim); }
.tailor-result { border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tailor-notes-title { font-size: 13px; font-weight: 600; color: var(--accent); }
.tailor-notes { font-size: 14px; color: var(--text-dim); white-space: pre-wrap; }
#tailorMatch { display: flex; flex-direction: column; gap: 8px; }
#tailorMatch[hidden] { display: none; }
.tailor-match { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.tailor-match li { display: flex; gap: 10px; align-items: baseline; }
.tailor-match strong { font-weight: 600; color: var(--text); }
.tailor-match em { display: block; font-style: normal; color: var(--text-dim); font-size: 13px; }
.tm-mark { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; transform: translateY(3px); }
.is-yes .tm-mark { background: rgb(34 197 94 / 0.16); color: #16a34a; }
.is-partly .tm-mark { background: rgb(234 179 8 / 0.18); color: #ca8a04; }
.is-no .tm-mark { background: rgb(239 68 68 / 0.16); color: #dc2626; }
.tailor-setup { border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tailor-setup #tailorEnv { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: flex-start; }
.tailor-setup #tailorEnv[hidden] { display: none; }
.tailor-env { width: 100%; font: 12px/1.4 ui-monospace, monospace; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; resize: none; }
.tailor-hint code { font-size: 12px; color: var(--accent); }

/* the print layout never shows on screen */
.print-cv { display: none; }

/* =========================================================================
   Print / PDF layout — A4, light, same fonts + accent as the site
========================================================================= */
/* No top/bottom page margin: that is where browsers print their own date, title and URL.
   The white space is padding instead, repeated on every page by box-decoration-break. */
@page { size: A4; margin: 0 14mm; }

@media print {
  body > :not(.print-cv) { display: none !important; }
  html, body { background: #fff !important; color: #1a1714 !important; }
  body { overflow: visible; }

  .print-cv {
    display: block; font-family: var(--font-body); font-size: 9.2pt; line-height: 1.45;
    padding: 14mm 0; -webkit-box-decoration-break: clone; box-decoration-break: clone;
    color: #1a1714; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .print-cv h1, .print-cv h2, .print-cv h3 { font-family: var(--font-display); letter-spacing: 0; }
  .print-cv h1 { letter-spacing: -0.02em; }

  .pc-header {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
    padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2.5px solid var(--accent);
  }
  .pc-header h1 { font-size: 24pt; font-weight: 800; line-height: 1; }
  .pc-title { margin-top: 5px; font-size: 10pt; font-weight: 600; color: var(--accent-deep); }
  .pc-contact { list-style: none; text-align: right; font-size: 8.6pt; color: #5b5853; }

  .pc-body { display: grid; grid-template-columns: 1fr 34%; gap: 18px; }
  .pc-side { border-left: 1px solid #e4e0d8; padding-left: 14px; }

  .pc-sec { margin-bottom: 12px; }
  .pc-sec h2 {
    font-size: 9pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--accent-deep); margin-bottom: 6px; break-after: avoid; page-break-after: avoid;
  }
  .pc-sec p { margin-bottom: 4px; }
  .pc-intro { color: #5b5853; font-style: italic; }

  .pc-job { margin-bottom: 9px; break-inside: avoid; page-break-inside: avoid; }
  .pc-job-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; font-size: 9.6pt; margin-bottom: 2px; }
  .pc-period { margin-left: auto; font-size: 8.4pt; color: #5b5853; white-space: nowrap; }
  .pc-tags { font-size: 7.8pt; color: #5b5853; }
  .pc-tags b { color: #1a1714; font-weight: 600; }

  .pc-emp, .pc-lines { list-style: none; }
  .pc-emp li { display: flex; flex-direction: column; margin-bottom: 5px; break-inside: avoid; }
  .pc-emp span { font-size: 8.4pt; }
  .pc-emp em, .pc-lines em { font-style: normal; font-size: 8pt; color: #918d86; white-space: nowrap; }
  .pc-lines li { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
  .pc-lines li.pc-stack { flex-direction: column; gap: 0; }
  .pc-lines li.pc-stack em { white-space: normal; }

  .pc-skill { margin-bottom: 6px; break-inside: avoid; }
  .pc-skill h3 { font-size: 8.6pt; font-weight: 600; margin-bottom: 1px; }
  .pc-skill p { font-size: 8.2pt; color: #3d3a36; }
}
