/* ============================================================
   Timo Brunn — Website
   Modern light/minimal design
   ============================================================ */

:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --ink: #101c33;
  --ink-soft: #33415e;
  --muted: #5d6c86;
  --line: #e4eaf4;
  --line-strong: #d5dfec;
  --primary: #1a308d;
  --primary-dark: #12245e;
  --primary-soft: #e8eefc;
  --accent: #2f6df6;
  --accent-soft: #eaf2ff;
  --gold: #f0b429;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 28, 51, .06);
  --shadow-md: 0 1px 2px rgba(16, 28, 51, .05), 0 16px 40px -16px rgba(16, 28, 51, .18);
  --shadow-lg: 0 1px 2px rgba(16, 28, 51, .05), 0 30px 60px -24px rgba(16, 28, 51, .22);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --header-h: 72px;
  --maxw: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

::selection { background: var(--primary); color: #fff; }

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 72px; }

@media (min-width: 768px) {
  .section { padding-block: 96px; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 248, 252, .8);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand img {
  height: 40px;
  width: auto;
  display: block;
}

.brand-text { display: none; }
@media (min-width: 420px) {
  .brand-text {
    display: block;
    line-height: 1.2;
  }
  .brand-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .brand-text small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .02em;
  }
}

.site-nav { display: none; }
@media (min-width: 900px) {
  .site-nav { display: flex; align-items: center; gap: 4px; }
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 550;
  transition: background .2s ease, color .2s ease;
}

.site-nav a:hover { background: var(--primary-soft); color: var(--primary); }

.site-nav a[aria-current="page"] {
  background: var(--primary);
  color: #fff;
}

.header-cta { display: none; }
@media (min-width: 900px) {
  .header-cta { display: inline-flex; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.nav-toggle:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.nav-toggle[aria-expanded="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (min-width: 900px) { .nav-toggle { display: none; } }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 24px 20px;
}

.mobile-nav.is-open { display: block; }

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
  font-size: 15px;
}

.mobile-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.mobile-nav a[aria-current="page"] { background: var(--primary); color: #fff; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(26, 48, 141, .55);
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(26, 48, 141, .6); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
}

.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }

.btn svg { flex-shrink: 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 56px 72px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% -30% auto -30%;
  height: 130%;
  background:
    radial-gradient(600px 400px at 18% 8%, rgba(47, 109, 246, .16), transparent 65%),
    radial-gradient(500px 360px at 78% 18%, rgba(26, 48, 141, .14), transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(16, 28, 51, .10) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 85%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 56px; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero-eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
}

.hero h1 {
  margin: 22px 0 0;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ink);
}

.hero h1 .accent-text {
  background: linear-gradient(120deg, var(--primary) 10%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
  max-width: 30rem;
}

.hero-facts div {
  padding: 14px 16px;
  border-left: 2px solid var(--line-strong);
}

.hero-facts strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}

.hero-facts span {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .01em;
}

/* Profile card */

.profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  position: relative;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.profile-logo {
  display: flex;
  justify-content: center;
  padding: 18px 18px 0;
}

.profile-logo img { width: 100%; max-width: 240px; height: auto; }

.profile-card h2 {
  margin: 18px 0 2px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.profile-card .role {
  text-align: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.profile-divider { border: 0; border-top: 1px solid var(--line); margin: 0 0 18px; }

.profile-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-facts div {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.profile-facts strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--primary);
}

.profile-facts span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.profile-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.profile-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: all .2s ease;
}

.profile-socials a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(26, 48, 141, .55);
}

/* ---------- Section headings ---------- */

.section-head {
  max-width: 44rem;
  margin-bottom: 44px;
}

.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.section-head.center .eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}

.section-head p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 38rem;
}

.section-head.center p { margin-inline: auto; }

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 109, 246, .14), transparent 70%);
  opacity: 0;
  transition: opacity .25s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.service-card:hover::after { opacity: 1; }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-soft), #dfe9fd);
  color: var(--primary);
  margin-bottom: 18px;
}

.service-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.service-card p {
  margin: 0;
  font-size: .94rem;
  color: var(--muted);
}

/* ---------- Projects ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.project-card .shot {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #0e1626;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-card .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.project-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.project-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-card li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

.project-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, var(--primary-dark) 0%, var(--primary) 55%, #2c4ea0 100%);
  color: #fff;
  padding: 44px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: linear-gradient(160deg, rgba(0,0,0,.55), transparent 75%);
  -webkit-mask-image: linear-gradient(160deg, rgba(0,0,0,.55), transparent 75%);
}

.cta-band > * { position: relative; }

.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  font-weight: 750;
}

.cta-band p { margin: 0 auto 22px; max-width: 34rem; color: rgba(255,255,255,.82); }

.cta-band .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 12px 28px -10px rgba(0,0,0,.45); }
.cta-band .btn-primary:hover { background: #eef2ff; }

.cta-band .btn-secondary { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); box-shadow: none; }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); color: #fff; }

/* ---------- Page hero (subpages) ---------- */

.page-hero {
  padding-block: 64px 40px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(640px 300px at 85% -10%, rgba(47, 109, 246, .12), transparent 60%),
    var(--surface);
}

.page-hero .eyebrow { margin-bottom: 14px; }

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3rem);
  letter-spacing: -0.035em;
  font-weight: 800;
  line-height: 1.1;
  max-width: 46rem;
}

.page-hero p.lead {
  margin: 18px 0 0;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
}

/* ---------- About / content ---------- */

.prose { max-width: 42rem; }

.prose p { margin: 0 0 18px; color: var(--ink-soft); }

.prose strong { color: var(--ink); font-weight: 650; }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.skill {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color .2s ease, transform .2s ease;
}

.skill:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.skill .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.skill span { font-size: .94rem; color: var(--ink-soft); line-height: 1.45; }

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.info-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.info-card p { margin: 0 0 20px; color: var(--muted); }

.info-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .96rem;
  color: var(--ink-soft);
}

.info-card li svg { flex-shrink: 0; margin-top: 2px; color: var(--primary); }

/* ---------- Footer ---------- */

.site-footer {
  background: #0b1530;
  color: #c7d2e8;
  margin-top: 72px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-block: 56px 40px;
}

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

.site-footer .brand img {
  filter: brightness(0) invert(1);
  height: 44px;
  opacity: .95;
}

.footer-tagline {
  margin: 16px 0 0;
  font-size: 14px;
  color: #93a5c4;
  max-width: 22rem;
}

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: #dfe7f6;
  transition: all .2s ease;
}

.footer-socials a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }

.footer-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7f90b3;
  margin: 0 0 14px;
}

.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: 9px; }

.footer-nav a {
  color: #c7d2e8;
  text-decoration: none;
  font-size: 14.5px;
  transition: color .2s ease;
}

.footer-nav a:hover { color: #fff; }

.footer-contact p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; }

.footer-contact a { color: #8fd3ff; text-decoration: none; font-weight: 600; }
.footer-contact a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #7f90b3;
}

.footer-bottom a { color: #aab8d4; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Reveal animation ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---------- Focus ---------- */

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

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .section { padding-block: 52px; }
  .hero { padding-block: 36px 48px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div:first-child { grid-column: 1 / -1; }
  .project-featured { border-radius: var(--radius); }
  .project-media { min-height: 0; padding: 16px; gap: 16px; }
  .project-body { padding: 24px 20px 26px; }
  .project-body h3 { font-size: 1.3rem; }
  .cta-band { padding: 36px 24px; }
  .profile-card { padding: 22px; }
  .profile-facts { grid-template-columns: 1fr; }
  .info-card { padding: 24px; }
}
