/* ── Design Tokens — knuths.se theme ─────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:      #ffffff;
  --bg-surface:   #f8f8f8;
  --bg-elevated:  #f0f0f0;
  --bg-dark:      #0e1429;
  --bg-dark-soft: #1a2240;

  /* Primary — Red/coral from knuths.se */
  --primary:        hsl(4, 73%, 55%);
  --primary-dark:   hsl(4, 73%, 42%);
  --primary-light:  hsl(4, 73%, 94%);
  --primary-muted:  hsla(4, 73%, 55%, 0.12);

  /* Secondary — Deep blue from knuths.se */
  --secondary:      hsl(229, 61%, 46%);
  --secondary-dark: hsl(229, 61%, 34%);
  --secondary-light:hsl(229, 61%, 95%);
  --secondary-muted:hsla(229, 61%, 46%, 0.12);

  /* Text */
  --text-dark:    hsl(222, 51%, 9%);
  --text-body:    hsl(222, 20%, 30%);
  --text-muted:   hsl(222, 15%, 55%);
  --text-faint:   hsl(222, 12%, 75%);
  --text-white:   #ffffff;

  /* Borders */
  --border:       hsl(220, 15%, 90%);
  --border-dark:  hsl(220, 15%, 80%);

  /* States */
  --success:  #16a34a;
  --danger:   #dc2626;
  --warning:  #d97706;

  /* Radii */
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 4px rgba(14,20,41,0.06);
  --shadow:     0 4px 20px rgba(14,20,41,0.10);
  --shadow-lg:  0 12px 48px rgba(14,20,41,0.14);
  --shadow-red: 0 4px 20px hsla(4,73%,55%,0.30);

  /* Fonts */
  --font-sans:    'Open Sans', system-ui, sans-serif;
  --font-heading: 'Poppins', 'Open Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Layout */
  --nav-height:  72px;
  --section-pad: 96px;
  --container:   1200px;
  --transition:  0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 500; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-body); }

.text-primary  { color: var(--primary) !important; }
.text-secondary{ color: var(--secondary) !important; }
.text-muted    { color: var(--text-muted) !important; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
section { padding: var(--section-pad) 0; }

.section-header {
  margin-bottom: 56px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p  { max-width: 560px; font-size: 1.05rem; color: var(--text-muted); }
.section-header.centered { text-align: center; }
.section-header.centered p { margin: 12px auto 0; }

.label-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--primary-muted);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.label-tag.blue {
  background: var(--secondary-muted);
  color: var(--secondary);
}

/* ── Navigation ────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: box-shadow var(--transition);
}
.nav.scrolled {
  box-shadow: var(--shadow);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-mark {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark svg { display: block; }
.nav-logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}
.nav-logo-text span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-muted);
}
.nav-cta {
  padding: 9px 22px !important;
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
}
.nav-cta:hover {
  background: var(--primary-dark) !important;
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
    gap: 2px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 16px; }
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding-top: var(--nav-height);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('/assets/img/hero-bg.jpg');
  background-size: cover;
  background-position: 50% 50%;
  z-index: 0;
}
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 41, 0.50);
  z-index: 1;
}
.hero-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}
.hero h1 {
  color: #fff;
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  max-width: 600px;
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Clients strip */
.hero-clients {
  position: relative;
  z-index: 2;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-clients-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.client-logos {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}
.client-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}
.client-logo:hover { color: rgba(255,255,255,0.7); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-red);
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border-color: var(--border-dark);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
}
.btn-secondary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 8px 14px;
}
.btn-ghost:hover {
  color: var(--text-dark);
  background: var(--bg-elevated);
}
.btn-sm { padding: 8px 18px; font-size: 0.82rem; }
.btn-lg { padding: 15px 34px; font-size: 1rem; }

/* ── Portfolio Cards with video hover ──────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

.portfolio-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.portfolio-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--primary);
}

/* Media area — image + video overlay */
.card-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-dark);
  flex-shrink: 0;
}
.card-media img.card-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card-media video.card-video {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.portfolio-card:hover .card-media video.card-video {
  opacity: 1;
}
.portfolio-card:hover .card-media img.card-thumb {
  opacity: 0;
}
/* No-video cards: just fade image slightly */
.portfolio-card:hover .card-media img.card-thumb.no-video {
  opacity: 0.85;
  transform: scale(1.04);
  transition: opacity 0.4s ease, transform 0.6s ease;
}

/* Hover overlay with "Läs mer" */
.card-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(to top, rgba(14,20,41,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.portfolio-card:hover .card-overlay { opacity: 1; }
.card-overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-heading);
}
.card-video-badge {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(14,20,41,0.75);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  backdrop-filter: blur(4px);
}
.card-video-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.card-tag {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--primary-muted);
  color: var(--primary);
  border: 1px solid hsla(4,73%,55%,0.2);
}
.card-tag.blue {
  background: var(--secondary-muted);
  color: var(--secondary);
  border-color: hsla(229,61%,46%,0.2);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}
.card-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-footer-links {
  display: flex;
  gap: 6px;
}

/* ── Section: dark background ──────────────────────────────────────────────── */
.section-dark {
  background: var(--bg-dark);
  color: #fff;
}
.section-dark h2 { color: #fff; }
.section-dark p  { color: rgba(255,255,255,0.65); }
.section-dark .label-tag {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
}

.section-gray { background: var(--bg-surface); }

/* ── Services / feature cards ──────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--transition);
}
.service-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--primary);
  transform: translateY(-3px);
}
.service-icon {
  width: 52px; height: 52px;
  background: var(--primary-muted);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-card:hover .service-icon { background: var(--primary); }
.service-card:hover .service-icon svg { stroke: #fff; }
.service-icon svg { transition: stroke var(--transition); }
.service-card h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.service-card p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
}

/* ── Client logos section ──────────────────────────────────────────────────── */
.clients-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  padding: 48px 0;
}
/* Loggor i hero */
.client-logo-img {
  height: 80px;
  width: auto;
  display: block;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.client-logo-img:hover { opacity: 1; }

/* Loggor i ljusa sektionen */
.client-strip-logo {
  height: 110px;
  width: auto;
  display: block;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.client-strip-logo:hover { opacity: 1; }

/* ── Stats ─────────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-block {
  background: #fff;
  padding: 32px 28px;
  text-align: center;
}
.stat-block-value {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.04em;
  display: block;
}
.stat-block-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ── Page header ───────────────────────────────────────────────────────────── */
.page-header {
  padding: calc(var(--nav-height) + 56px) 0 56px;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.page-header h1 { color: #fff; margin-bottom: 12px; }
.page-header p  { color: rgba(255,255,255,0.6); font-size: 1.05rem; }
.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}
.page-header .breadcrumb a { color: rgba(255,255,255,0.5); }
.page-header .breadcrumb a:hover { color: rgba(255,255,255,0.8); }

/* ── Slideshow ─────────────────────────────────────────────────────────────── */
.slideshow {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
}
.slideshow-track { position: relative; }
.slideshow-slide {
  display: none;
}
.slideshow-slide.active { display: block; }
.slideshow-slide img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.slideshow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s;
}
.slideshow-btn:hover { background: rgba(0,0,0,0.70); }
.slideshow-prev { left: 12px; }
.slideshow-next { right: 12px; }
.slideshow-counter {
  position: absolute;
  bottom: 54px;
  right: 14px;
  background: rgba(0,0,0,0.50);
  color: #fff;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 20px;
  z-index: 5;
  pointer-events: none;
}
.slideshow-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: rgba(0,0,0,0.55);
  overflow-x: auto;
  scrollbar-width: thin;
}
.slideshow-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 42px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: none;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s;
}
.slideshow-thumb.active,
.slideshow-thumb:hover { opacity: 1; border-color: var(--red); }
.slideshow-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Detail page ───────────────────────────────────────────────────────────── */
.project-hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 48px;
  box-shadow: var(--shadow-lg);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.detail-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}
.sidebar-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 8px;
}

/* ── Prose / rich text ─────────────────────────────────────────────────────── */
.prose {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-body);
}
.prose h2, .prose h3 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  margin: 2em 0 0.6em;
}
.prose p  { margin-bottom: 1.2em; }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--text-dark); font-weight: 700; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--primary-muted);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
}
.prose pre {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.5em 0;
}
.prose pre code { background: none; color: inherit; padding: 0; }
.prose blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 20px;
  margin: 1.5em 0;
  color: var(--text-muted);
  font-style: italic;
}
.prose img { border-radius: var(--radius); margin: 1.5em 0; box-shadow: var(--shadow); }
.prose a { color: var(--primary); }

/* ── Tech badges ───────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-body);
  border: 1px solid var(--border);
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Filter bar ────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: fit-content;
}
.filter-btn {
  padding: 7px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-heading);
}
.filter-btn:hover  { color: var(--text-dark); }
.filter-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* ── News posts ────────────────────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: var(--primary);
}
.post-card-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-surface);
}
.post-card-body { padding: 24px; }
.post-meta {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
}
.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
  transition: color var(--transition);
}
.post-card:hover .post-card-title { color: var(--primary); }
.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Divider ───────────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
}
.divider-gradient {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
}

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info    { background: var(--secondary-muted); border-color: hsla(229,61%,46%,0.25); color: var(--secondary-dark); }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-state svg { opacity: 0.2; margin: 0 auto 16px; color: var(--text-muted); }
.empty-state h3 { color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }

/* ── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 48px;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}
.pagination a {
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-muted); }
.pagination .current { background: var(--primary); color: #fff; border: none; }
.pagination .disabled { opacity: 0.3; pointer-events: none; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.5);
  padding: 56px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 32px;
}
.footer-brand { max-width: 320px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  text-decoration: none;
}
.footer-logo-mark {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.footer-logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.footer-desc { font-size: 0.875rem; line-height: 1.7; }
.footer-company {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-contact .footer-nav-label { margin-bottom: 2px; }
.footer-contact p {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  margin: 0;
}
.footer-contact a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}
.footer-contact a:hover { color: #fff; }
.footer-contact address {
  font-style: normal;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
  margin-top: 4px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 160px;
}
.footer-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  margin-bottom: 4px;
}
.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.social-links { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: all var(--transition);
  text-decoration: none;
}
.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* ── Scroll reveal ─────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 768px) {
  :root { --section-pad: 64px; }
  .container { padding: 0 20px; }
  .detail-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .hero-clients { gap: 24px; }
  .client-logos { gap: 24px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .filter-bar { border-radius: var(--radius); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
