/* ============================================
   Corpademia — Refined Editorial Design
   Aesthetic: Restrained luxury. Confident whitespace.
   Fonts: Bricolage Grotesque (display) + Plus Jakarta Sans (body)
   ============================================ */

:root {
  --bg: #faf9f7;
  --paper: #ffffff;
  --paper-2: #f5f4f1;
  --ink: #0a0b0d;
  --ink-secondary: #3d4250;
  --muted: #6b7084;
  --line: #e6e3de;
  --line-light: #f0ede8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --teal: #0f9f88;
  --gold: #c87d1a;
  --violet: #6d28d9;
  --blue-soft: #eef4ff;
  --teal-soft: #edfcf7;
  --gold-soft: #fef9ec;
  --violet-soft: #f3f0ff;
  --shadow-sm: 0 1px 3px rgba(10, 11, 13, .04);
  --shadow: 0 8px 32px rgba(10, 11, 13, .06);
  --shadow-lg: 0 24px 64px rgba(10, 11, 13, .08);
  --radius: 20px;
  --radius-lg: 28px;
  --max: 1200px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }
html { scroll-behavior: smooth }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  position: relative;
}

/* Subtle grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: .28;
  pointer-events: none;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

img { max-width: 100%; display: block }
a { color: inherit; transition: opacity .2s var(--ease) }
.container { max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px) }

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Ensure sections have min-height so reveals trigger properly */
.section {
  min-height: 100px;
}
.reveal-delay-1 { transition-delay: .08s }
.reveal-delay-2 { transition-delay: .16s }
.reveal-delay-3 { transition-delay: .24s }
.reveal-delay-4 { transition-delay: .32s }

/* ============================================
   Header
   ============================================ */

header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(250, 249, 247, .88);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(17, 19, 24, .04);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; text-decoration: none }
.brand img { height: 52px; width: auto }

.nav-links { display: flex; gap: 4px; align-items: center }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all .2s var(--ease);
  letter-spacing: -.01em;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: rgba(17, 19, 24, .04);
}
.nav-cta {
  margin-left: 8px;
  background: var(--ink) !important;
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: -.01em;
  transition: all .25s var(--ease) !important;
}
.nav-cta:hover {
  background: var(--ink-secondary) !important;
  transform: translateY(-1px);
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
}

/* Hero gradient text */
.hero-gradient {
  background: linear-gradient(135deg, var(--ink) 0%, var(--accent) 50%, var(--teal) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientShift 6s ease infinite;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
}

/* Animated mesh background for hero */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.hero-bg::before,
.hero-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .07;
  animation: float 12s ease-in-out infinite;
}
.hero-bg::before {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  right: -100px;
}
.hero-bg::after {
  width: 500px;
  height: 500px;
  background: var(--teal);
  bottom: -150px;
  left: -100px;
  animation-delay: -4s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1) }
  33% { transform: translate(30px, -20px) scale(1.05) }
  66% { transform: translate(-20px, 15px) scale(.95) }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all .3s var(--ease);
  border: none;
  cursor: pointer;
  letter-spacing: -.01em;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 16px rgba(10, 11, 13, .12);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,99,235,.2), rgba(15,159,136,.2));
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.btn-primary:hover::before { opacity: 1 }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(10, 11, 13, .2);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  border-color: #ccc;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 14px 0;
}
.btn-ghost:hover { color: var(--ink) }
.btn-ghost .arrow {
  transition: transform .2s var(--ease);
}
.btn-ghost:hover .arrow {
  transform: translateX(4px);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: clamp(32px, 5vw, 60px) 0 clamp(40px, 8vw, 80px);
}

.hero-inner {
  max-width: 800px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 20px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(48px, 7.5vw, 88px);
  line-height: 1.15;
  letter-spacing: -.04em;
  margin: 0 0 28px;
  max-width: 780px;
}

.hero-sub {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-secondary);
  line-height: 1.65;
  max-width: 600px;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Hero metrics — clean horizontal strip */
.hero-metrics {
  display: flex;
  gap: 0;
  margin-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric {
  flex: 1;
  padding: 28px 0;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: none }
.metric:first-child { padding-right: 32px }
.metric:not(:first-child):not(:last-child) { padding: 28px 32px }
.metric:last-child { padding-left: 32px }
.metric-value {
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: 6px;
}
.metric-label {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: clamp(48px, 8vw, 96px) 0;
}

.section-header {
  margin-bottom: clamp(32px, 5vw, 56px);
  max-width: 680px;
}
.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 16px;
  letter-spacing: -.03em;
}

.section-header p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
  margin: 0;
}

/* ============================================
   Features Grid — Clean cards
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

.feature-card {
  background: var(--paper);
  padding: clamp(24px, 3vw, 36px);
  transition: background .3s var(--ease);
}
.feature-card:hover {
  background: var(--paper-2);
}
.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}
.feature-card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  line-height: 1.25;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ============================================
   Two-column Value Story
   ============================================ */

.value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
}

.card-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.card h3 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 12px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* Timeline bars */
.timeline {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}
.timeline-item {
  background: var(--paper-2);
  border-radius: 16px;
  padding: 18px 20px;
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.timeline-head strong {
  font-size: 15px;
  font-weight: 700;
}
.timeline-head span {
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  letter-spacing: -.02em;
}
.bar-track {
  display: flex;
  gap: 3px;
  height: 32px;
}
.bar-segment {
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  padding: 0 6px;
}

/* KPI rows */
.kpi-list {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}
.kpi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-light);
}
.kpi-row:last-child { border-bottom: none }
.kpi-row strong {
  font-size: 15px;
  font-weight: 700;
}
.kpi-row span {
  font-size: 13px;
  color: var(--muted);
}

/* ============================================
   Expertise Tabs
   ============================================ */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--paper-2);
  border-radius: 14px;
  padding: 4px;
  width: fit-content;
}
.tab-btn {
  padding: 10px 20px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s var(--ease);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -.01em;
}
.tab-btn:hover { color: var(--ink) }
.tab-btn.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.tab-panel { display: none }
.tab-panel.active { display: block }

.domain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.domain-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}
.domain-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--paper-2);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}
.domain-item span:last-child {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

/* ============================================
   Case Studies / Success Stories
   ============================================ */

.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.cases-grid .case-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 620px;
}

.case-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3.5vw, 40px);
  transition: all .4s var(--ease);
  position: relative;
}
.case-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(37,99,235,.03), rgba(15,159,136,.03));
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.case-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(37,99,235,.12);
  transform: translateY(-2px);
}
.case-card:hover::after { opacity: 1 }

.case-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -.01em;
}

.case-card h3 {
  font-size: clamp(22px, 2.5vw, 28px);
  margin: 0 0 12px;
}

.case-desc {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
  line-height: 1.65;
}

.case-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.case-stat {
  padding: 6px 14px;
  background: var(--paper-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.case-quote {
  font-style: italic;
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 12px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}

.case-cite {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding-left: 16px;
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: gap .2s var(--ease);
}
.case-link:hover { gap: 10px }

/* ============================================
   About
   ============================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
.mini-card {
  background: var(--paper-2);
  border-radius: 16px;
  padding: 18px;
}
.mini-card-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.mini-card strong {
  display: block;
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 6px;
}
.mini-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================
   Contact / CTA
   ============================================ */

.cta-block {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 64px);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, .15), transparent 70%);
  pointer-events: none;
}

.cta-block .section-label {
  color: rgba(255, 255, 255, .5);
}
.cta-block h2 {
  color: #fff;
  font-size: clamp(32px, 4.5vw, 52px);
  margin: 0 0 14px;
}
.cta-block p {
  color: rgba(255, 255, 255, .6);
  font-size: 17px;
  max-width: 520px;
  margin: 0 0 32px;
  line-height: 1.7;
}
.cta-block .btn-primary {
  background: #fff;
  color: var(--ink);
}
.cta-block .btn-primary:hover {
  background: #f0efed;
}
.cta-block .btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, .7);
  border-color: rgba(255, 255, 255, .15);
}
.cta-block .btn-secondary:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
}

/* ============================================
   Contact Form
   ============================================ */

.interest-form {
  margin-top: 28px;
  max-width: 560px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.form-group .optional {
  font-weight: 500;
  opacity: .5;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all .2s var(--ease);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, .25);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .12);
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.form-alt {
  font-size: 14px;
  color: rgba(255, 255, 255, .4);
}
.form-status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
}
.form-status.success {
  color: #34d399;
}
.form-status.error {
  color: #f87171;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr }
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  padding: 32px 0 48px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-inner p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.footer-inner img { height: 48px }

/* ============================================
   Portfolio Page
   ============================================ */

.portfolio-hero {
  padding: clamp(48px, 8vw, 80px) 0 clamp(24px, 4vw, 40px);
}
.portfolio-hero h1 {
  font-size: clamp(44px, 6vw, 72px);
  margin: 16px 0 14px;
  letter-spacing: -.04em;
}
.portfolio-hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
  margin: 0;
  line-height: 1.65;
}

.filter-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 14px;
  padding: 4px;
  width: fit-content;
}
.filter-btn {
  padding: 10px 18px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s var(--ease);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.filter-btn:hover { color: var(--ink) }
.filter-btn.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .35s var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.project-card-thumb {
  width: 100%;
  height: 280px;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  image-rendering: -webkit-optimize-contrast;
}
.placeholder-icon {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--line);
}

.project-card-body {
  padding: 24px 28px 28px;
}
.project-card-category {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 8px;
}
.project-card-body h3 {
  font-size: 22px;
  margin: 0 0 8px;
}
.project-card-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.project-card-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-card-stats span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 12px;
  font-weight: 800;
}

/* ============================================
   Project Detail
   ============================================ */

.project-detail { padding: 40px 0 60px }

.project-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.project-breadcrumb a {
  text-decoration: none;
  color: var(--accent);
}
.project-breadcrumb a:hover { opacity: .7 }

.project-header { margin-bottom: 40px }
.project-header h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 12px;
  letter-spacing: -.04em;
}
.project-tagline {
  font-size: 19px;
  color: var(--ink-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 0 24px;
}

.project-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project-meta-item { display: flex; flex-direction: column; gap: 4px }
.project-meta-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.project-meta-value {
  font-size: 15px;
  font-weight: 700;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 36px 0;
}
.result-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.result-metric {
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--accent);
}
.result-label {
  font-size: 14px;
  color: var(--muted);
}

.project-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

/* Testimonial block */
.testimonial-block {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 4vw, 48px);
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
.testimonial-block::before {
  content: "\201C";
  position: absolute;
  top: -20px;
  left: 20px;
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-size: 140px;
  color: rgba(255, 255, 255, .04);
  line-height: 1;
}
.quote-text {
  color: rgba(255, 255, 255, .85);
  font-size: 18px;
  font-style: italic;
  line-height: 1.75;
  margin: 0 0 20px;
  position: relative;
}
.quote-author {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.quote-title {
  color: rgba(255, 255, 255, .4);
  font-size: 13px;
  font-weight: 600;
}

/* Tech tags */
.tech-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.tech-tag {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

/* ============================================
   Screenshot Gallery + Preview Toggle
   ============================================ */

.screenshot-gallery { margin-bottom: 36px }

.screenshot-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}
.screenshot-gallery-header h2 {
  font-size: 28px;
  margin: 0;
}

.preview-toggle {
  display: flex;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}
.preview-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s var(--ease);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.preview-toggle-btn:hover { color: var(--ink) }
.preview-toggle-btn.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.preview-toggle-icon {
  display: flex;
  align-items: center;
}

/* ---- Carousel ---- */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink);
  border: 1px solid var(--line);
}

.carousel-track {
  display: flex;
  transition: transform .5s var(--ease);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  position: relative;
  cursor: pointer;
}
.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Nav arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s var(--ease);
  z-index: 10;
  box-shadow: var(--shadow);
}
.carousel-nav:hover {
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateY(-50%) scale(1.06);
}
.carousel-nav:active { transform: translateY(-50%) scale(.96) }
.carousel-nav.prev { left: 16px }
.carousel-nav.next { right: 16px }
.carousel-nav:disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  border: none;
  cursor: pointer;
  transition: all .3s var(--ease);
  padding: 0;
}
.carousel-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}
.carousel-dot:hover:not(.active) { background: var(--muted) }

/* Counter badge */
.carousel-counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(10, 11, 13, .7);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  z-index: 10;
}

/* Mobile grid fallback for single-image projects */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}
.screenshots-grid.mobile-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 240px));
  justify-content: center;
}

.screenshot-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.screenshot-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.screenshot-item img { width: 100%; height: auto; display: block }

.screenshot-mobile { max-width: 260px }
.phone-frame {
  background: #1a1a1a;
  border-radius: 28px;
  padding: 10px 6px;
}
.phone-frame img { border-radius: 20px }

.empty-screenshots {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}
.empty-screenshots p { font-size: 15px; font-weight: 600; margin: 0 }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(16px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: pointer;
}
.lightbox.active { display: flex }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .2) }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1080px) {
  .features-grid { grid-template-columns: 1fr 1fr }
}

@media (max-width: 820px) {
  .hero-metrics { flex-direction: column; }
  .metric { border-right: none; border-bottom: 1px solid var(--line); padding: 20px 0 !important }
  .metric:last-child { border-bottom: none }

  .features-grid,
  .value-grid,
  .domain-grid,
  .cases-grid,
  .about-grid,
  .project-content,
  .portfolio-grid { grid-template-columns: 1fr }

  .mini-cards { grid-template-columns: 1fr }
  .tabs { flex-wrap: wrap }
  .screenshots-grid { grid-template-columns: 1fr }
  .nav-links { display: none }

  /* Timeline bars — prevent clipping on mobile */
  .timeline-item { padding: 14px 14px; }
  .timeline-head span { font-size: 20px; }
  .bar-track { height: 28px; gap: 2px; }
  .bar-segment { font-size: 8px; letter-spacing: .01em; border-radius: 6px; min-width: 0; }
}

@media (max-width: 600px) {
  .results-grid { grid-template-columns: 1fr }
  .portfolio-grid { grid-template-columns: 1fr }
  .project-card-thumb { height: 160px }

  /* Timeline bars — stack head vertically on small screens */
  .timeline-head { flex-direction: column; gap: 2px; margin-bottom: 10px; }
  .timeline-head span { font-size: 22px; }
  .bar-track { height: 30px; }
  .bar-segment { font-size: 9px; padding: 0 4px; border-radius: 6px; }
}
