:root {
  --bg: #f9fbfd;
  --surface: #ffffff;
  --text: #37475d;
  --muted: #6b7280;
  --border: #e6eaf0;
  --primary: #344255;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --soft: #f7f9fc;
  --bos-bg: #1a1a1a;
  --bos-surface: #252525;
  --bos-gold: #f5c842;
  --radius: 14px;
  --shadow: 0 8px 26px rgba(47, 63, 84, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

body.bos-body {
  background: var(--bos-bg);
  color: #d1d5db;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

.narrow {
  width: min(980px, 92vw);
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.96rem;
  color: var(--primary);
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--accent);
  background: #eef4ff;
}

.mobile-toggle {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-dark);
}

.btn-bos {
  background: #141414;
  color: var(--bos-gold);
  font-style: italic;
  padding-inline: 15px;
}

.hero {
  padding: 108px 0 76px;
  background: var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.hero-photo {
  position: sticky;
  top: 96px;
}

.hero-photo img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(41, 61, 87, 0.2);
}

.hero-mobile-photo {
  display: none;
}

.hero h1 {
  margin: 0 0 30px;
  color: var(--primary);
  line-height: 1.16;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
}

.hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(47, 63, 84, 0.07);
  padding: 24px;
  margin-bottom: 30px;
}

.hero-card p:first-child {
  font-size: 1.15rem;
  color: #4b5563;
}

.hero-copy {
  font-size: 1.06rem;
  margin-bottom: 18px;
}

.section-divider {
  width: min(900px, 88vw);
  height: 1px;
  background: var(--border);
  margin: 0 auto;
}

.section {
  padding: 76px 0;
}

.section h2 {
  margin: 0 0 24px;
  color: var(--primary);
  line-height: 1.2;
  font-size: clamp(1.95rem, 3.2vw, 2.55rem);
}

.lead {
  font-size: 1.12rem;
  color: #4b5563;
  margin: 0 0 20px;
}

.row {
  display: grid;
  gap: 18px;
}

.row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card h3 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 1.35rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.role-badge {
  background: #f5f7fb;
  border-radius: 9px;
  padding: 10px 14px;
  color: var(--primary);
  font-weight: 500;
}

.list {
  margin: 0;
  padding-left: 20px;
}

.list li {
  margin-bottom: 9px;
}

.accent-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.accent-list li {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.dot {
  color: var(--accent);
  font-weight: 700;
}

.testimonial-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.testimonial-head {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 16px;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.social-link {
  color: var(--primary);
  font-weight: 500;
}

.social-link:hover {
  color: var(--accent);
}

.footer {
  margin-top: 46px;
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 28px 0;
}

.footer p {
  margin: 0 0 8px;
}

.page-shell {
  min-height: 100vh;
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  padding-top: 106px;
  padding-bottom: 56px;
}

.page-title {
  margin: 0 0 10px;
  font-size: clamp(2.25rem, 5vw, 3.7rem);
  color: var(--primary);
}

.page-subtitle {
  font-size: 1.2rem;
  color: #4b5563;
  margin-bottom: 24px;
}

.notice {
  border: 1px solid #dde7ff;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
}

.blog-list {
  display: grid;
  gap: 16px;
}

.blog-item {
  display: block;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(30, 64, 175, 0.17);
}

.blog-item h3 {
  margin: 0 0 8px;
  color: var(--primary);
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.tag {
  display: inline-block;
  margin: 4px 6px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  color: var(--accent-dark);
  font-size: 0.8rem;
}

.article-shell {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  min-height: 100vh;
}

.markdown {
  background: #fff;
  border: 1px solid #e4eaf5;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  color: var(--primary);
  margin-top: 1.2em;
}

.markdown pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
}

.markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.cv-shell {
  min-height: 100vh;
  padding: 46px 0;
}

.cv-wrap {
  width: min(940px, 92vw);
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(51, 65, 85, 0.13);
  overflow: hidden;
  position: relative;
}

.cv-print {
  position: fixed;
  top: 94px;
  right: 24px;
  z-index: 1200;
}

.cv-body {
  padding: 38px 44px;
}

.cv-title {
  margin: 0 0 4px;
  font-size: 2.1rem;
  color: var(--primary);
}

.cv-role {
  margin: 0 0 12px;
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 600;
}

.cv-muted {
  color: var(--muted);
}

.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.cv-section {
  margin-top: 28px;
}

.cv-section h2 {
  font-size: 1.18rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.cv-job {
  margin-bottom: 24px;
}

.cv-job-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.cv-highlight {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px;
}

.cv-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portfolio-shell {
  background: #f9fafb;
  padding: 96px 0 76px;
}

.portfolio-hero {
  text-align: center;
  margin-bottom: 56px;
}

.portfolio-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
  margin-bottom: 56px;
}

.portfolio-item.reverse .portfolio-media {
  order: 2;
}

.portfolio-item.reverse .portfolio-copy {
  order: 1;
}

.portfolio-media {
  position: relative;
}

.media-stack {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.media-stack img,
.media-stack iframe {
  width: 100%;
  display: block;
}

.media-stack iframe {
  aspect-ratio: 16 / 9;
  border: 0;
}

.portfolio-copy .year {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.portfolio-copy h3 {
  margin: 8px 0 12px;
  color: var(--primary);
  font-size: 1.7rem;
}

.portfolio-copy .card {
  padding: 26px;
}

.bos-body .header {
  background: rgba(26, 26, 26, 0.95);
  border-bottom-color: #313131;
}

.bos-body .brand,
.bos-body .nav-link {
  color: #f3f4f6;
}

.bos-body .nav-link:hover {
  color: var(--bos-gold);
  background: #282828;
}

.bos-hero {
  padding: 84px 0 46px;
  text-align: center;
}

.bos-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  font-style: italic;
  color: #fff;
}

.bos-gold {
  color: var(--bos-gold);
}

.bos-kicker {
  color: #9ca3af;
  font-style: italic;
}

.bos-section {
  padding: 62px 0;
}

.bos-card {
  background: var(--bos-surface);
  border-left: 4px solid var(--bos-gold);
  border-radius: 12px;
  padding: 22px;
}

.bos-card h3,
.bos-card h4,
.bos-card h5 {
  margin: 0 0 10px;
  color: #fff;
}

.bos-card p,
.bos-card li {
  color: #9ca3af;
}

.bos-title {
  color: #fff;
  font-size: clamp(1.95rem, 4vw, 2.7rem);
  font-style: italic;
  text-align: center;
  margin: 0 0 22px;
}

.bos-process-step {
  text-align: center;
  background: var(--bos-surface);
  border-radius: 12px;
  padding: 24px;
}

.bos-number {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--bos-gold);
  color: #1a1a1a;
  font-size: 1.55rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.bos-cta {
  text-align: center;
  padding-bottom: 24px;
}

.bos-body .footer {
  background: #141414;
  border-top-color: #2f2f2f;
}

@media (max-width: 980px) {
  .nav {
    min-height: 70px;
    flex-wrap: wrap;
    padding: 8px 0;
  }

  .mobile-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    padding: 7px 10px;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding-top: 96px;
  }

  .hero-grid,
  .row-2,
  .row-3,
  .portfolio-item,
  .cv-cols {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    display: none;
  }

  .hero-mobile-photo {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 22px;
    box-shadow: 0 10px 24px rgba(51, 65, 85, 0.22);
  }

  .hero-mobile-photo img {
    width: 100%;
    display: block;
  }

  .cv-body {
    padding: 24px 20px;
  }

  .cv-print {
    position: static;
    margin: 10px auto;
    width: fit-content;
    display: flex;
  }

  .portfolio-item.reverse .portfolio-media,
  .portfolio-item.reverse .portfolio-copy {
    order: initial;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  header,
  footer,
  .cv-print,
  .mobile-toggle {
    display: none !important;
  }

  .cv-shell {
    padding: 0;
    background: #fff;
  }

  .cv-wrap {
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }

  .cv-section,
  .cv-job,
  ul,
  h2,
  h3 {
    break-inside: avoid;
  }

  @page {
    margin: 1.4cm;
    size: A4;
  }
}