/* ─── Design Tokens ─── */
:root {
  --bg: #f0f4ff;
  --surface: rgba(255,255,255,0.65);
  --accent: #6366f1;
  --accent-2: #0066cc;
  --heading: #0f0f23;
  --body: #374151;
  --muted: #6b7280;
  --border-glass: rgba(255,255,255,0.88);
  --border: rgba(229,231,235,0.7);
  --shadow-sm: 0 2px 8px rgba(99,102,241,0.06);
  --shadow-md: 0 8px 32px rgba(99,102,241,0.10);
  --shadow-lg: 0 24px 64px rgba(99,102,241,0.16);
  --radius: 18px;
  --radius-sm: 12px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
}

/* Aurora mesh — fixed behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 8%,  rgba(99,102,241,0.14) 0%, transparent 58%),
    radial-gradient(ellipse 55% 50% at 85% 15%,  rgba(139,92,246,0.11) 0%, transparent 52%),
    radial-gradient(ellipse 65% 55% at 50% 95%,  rgba(14,165,233,0.09) 0%, transparent 58%);
  pointer-events: none;
  animation: auroraShift 24s ease-in-out infinite alternate;
}

@keyframes auroraShift {
  0%   { opacity: 1; transform: scale(1) translate(0, 0); }
  50%  { opacity: 0.85; transform: scale(1.04) translate(1%, -1%); }
  100% { opacity: 1; transform: scale(1) translate(-1%, 1%); }
}

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

/* ─── Layout ─── */
.page {
  max-width: 100%;
  padding: 40px 60px 100px;
  position: relative;
  z-index: 1;
}

/* ─── Back link ─── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 36px;
  padding: 7px 16px 7px 12px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: 40px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.back-link:hover { color: var(--accent); background: rgba(255,255,255,0.95); box-shadow: var(--shadow-md); }
.back-link svg { flex-shrink: 0; }

/* ─── Page header (case study pages) ─── */
.page-header {
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 36px 40px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm), var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -70px; right: -70px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 70%);
  pointer-events: none;
}

/* ─── Brand ─── */
.brand {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ─── Page title ─── */
.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.page-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 0;
}

/* ─── Section ─── */
.section {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--heading);
  letter-spacing: -0.01em;
}
.section p { color: var(--body); margin-bottom: 12px; }
.section p:last-child { margin-bottom: 0; }
.section strong { color: var(--heading); font-weight: 600; }

/* ─── Tabs ─── */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.tab {
  padding: 10px 20px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab.active { color: var(--heading); border-bottom-color: var(--accent); font-weight: 600; }
.tab:hover:not(.active) { color: var(--body); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Bullet list ─── */
ul.points { padding-left: 20px; }
ul.points li { color: var(--body); margin-bottom: 10px; }
ul.points li strong { color: var(--heading); }

/* ─── Image grid ─── */
.img-grid { display: grid; gap: 14px; margin-top: 16px; }
.img-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.img-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.img-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.img-box {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(99,102,241,0.07);
  transition: transform 0.25s, box-shadow 0.25s;
}
.img-box:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,0.13); }
.img-box img { width: 100%; height: auto; display: block; }
.img-box .caption {
  font-size: 11px; color: var(--muted);
  padding: 8px 12px;
  background: rgba(255,255,255,0.5);
  text-align: center;
}

/* ─── Laptop frame mockup ─── */
.laptop-wrap {
  margin: 0 auto 8px;
  max-width: 900px;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.22)) drop-shadow(0 6px 16px rgba(0,0,0,0.12));
}

.laptop-frame {
  background: #1c1c2a;
  border-radius: 12px 12px 0 0;
  padding: 8px 8px 0;
}

.laptop-frame .browser-bar {
  background: #252535;
  border-radius: 6px 6px 0 0;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.browser-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.browser-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-url {
  flex: 1;
  height: 18px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  margin-left: 6px;
}

.laptop-frame .screen {
  overflow: hidden;
  border-radius: 0 0 2px 2px;
  line-height: 0;
}

.laptop-frame .screen img {
  width: 100%;
  height: auto;
  display: block;
}

.laptop-base {
  background: linear-gradient(180deg, #2c2c3e 0%, #1a1a28 100%);
  height: 14px;
  border-radius: 0 0 6px 6px;
}

.laptop-notch {
  width: 72px;
  height: 7px;
  background: #131320;
  border-radius: 0 0 5px 5px;
  margin: 0 auto;
}

/* ─── Callout ─── */
.callout {
  background: rgba(99,102,241,0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.callout p { color: #312e81; margin-bottom: 6px; }
.callout p:last-child { margin-bottom: 0; }

/* ─── Quote ─── */
.quote-block {
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 20px 0;
  border: 1px solid var(--border-glass);
}
.quote-block blockquote { font-style: italic; color: var(--body); margin-bottom: 6px; }
.quote-block .attribution { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ─── Metric pills ─── */
.metrics { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.metric-pill {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  color: #fff;
  border-radius: 40px;
  padding: 7px 18px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 3px 14px rgba(99,102,241,0.28);
}

/* ─── Pattern pills ─── */
.pattern-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pattern-pill {
  background: rgba(99,102,241,0.08);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 40px;
  padding: 4px 14px;
  font-size: 12px; font-weight: 500;
}

/* ─── Problem grid ─── */
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.problem-box {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.problem-box .problem-label {
  font-size: 11px; font-weight: 700;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 8px;
}
.problem-box p { font-size: 13px; color: var(--body); }

/* ─── Divider ─── */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.18), transparent);
  margin: 12px 0;
}

/* ─── Other projects ─── */
.other-projects { margin-top: 60px; }
.other-projects h2 {
  font-family: 'Syne', sans-serif;
  font-size: 21px; font-weight: 700;
  margin-bottom: 20px;
  color: var(--heading); letter-spacing: -0.01em;
}
.project-cards { display: flex; flex-direction: column; gap: 14px; }
.project-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  color: inherit;
}
.project-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(99,102,241,0.14); }
.project-card img { width: 200px; height: 140px; object-fit: cover; display: block; flex-shrink: 0; }
.project-card-body { padding: 20px 20px 20px 16px; }
.project-card-body .brand { margin-bottom: 4px; }
.project-card-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--heading); }
.project-card-body .subtitle { font-size: 12px; font-weight: 600; color: var(--body); margin-bottom: 8px; }
.project-card-body p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ─── Footer ─── */
footer {
  border-top: 1px solid rgba(99,102,241,0.12);
  padding: 28px; text-align: center; margin-top: 80px;
  position: relative; z-index: 1;
}
footer a { font-size: 13px; color: var(--muted); margin: 0 14px; transition: color .15s; }
footer a:hover { color: var(--accent); }

/* ─── Landing: Hero ─── */
.hero {
  position: relative;
  padding: 72px 56px 60px;
  margin-bottom: 40px;
  border-radius: 24px;
  background: rgba(255,255,255,0.58);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm), 0 40px 80px rgba(99,102,241,0.06);
  overflow: hidden;
}
.hero-mesh { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
}
.blob-1 {
  width: 420px; height: 320px;
  background: rgba(99,102,241,0.22);
  top: -120px; left: -80px;
  animation: floatBlob 20s ease-in-out infinite;
}
.blob-2 {
  width: 340px; height: 260px;
  background: rgba(139,92,246,0.18);
  top: -60px; right: -60px;
  animation: floatBlob 20s ease-in-out infinite;
  animation-delay: -7s;
}
.blob-3 {
  width: 280px; height: 220px;
  background: rgba(14,165,233,0.14);
  bottom: -80px; left: 45%;
  animation: floatBlob 20s ease-in-out infinite;
  animation-delay: -13s;
}
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(18px, -14px) scale(1.06); }
  66%       { transform: translate(-12px, 10px) scale(0.96); }
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: 52px; font-weight: 700;
  line-height: 1.08; margin-bottom: 20px;
  color: var(--heading); letter-spacing: -0.03em;
}
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #0066cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tag {
  display: inline-block;
  background: rgba(99,102,241,0.10);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: 40px;
  padding: 5px 16px; font-size: 12px; font-weight: 600; margin-bottom: 20px;
}
.hero p { font-size: 16px; color: var(--body); max-width: 560px; line-height: 1.72; }

/* ─── Landing: Project grid ─── */
.ai-projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ai-project-card {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.32s ease, box-shadow 0.32s ease;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm), var(--shadow-md);
  display: block; color: inherit;
  will-change: transform;
}
.ai-project-card:hover {
  transform: translateY(-7px) perspective(900px) rotateX(1.5deg);
  box-shadow: 0 6px 20px rgba(99,102,241,0.10), 0 32px 72px rgba(99,102,241,0.18);
}
.ai-project-card .card-img { height: 200px; overflow: hidden; }
.ai-project-card .card-img img {
  width: 100%; height: 200px; object-fit: cover; display: block;
  transition: transform 0.42s ease;
}
.ai-project-card:hover .card-img img { transform: scale(1.05); }
.ai-project-card .card-body { padding: 20px 22px 24px; }
.ai-project-card .card-body .brand { margin-bottom: 4px; }
.ai-project-card .card-body h3 {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 700; margin-bottom: 8px;
  color: var(--heading); letter-spacing: -0.01em;
}
.ai-project-card .card-body p { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .page { padding: 24px 20px 80px; }
  .hero { padding: 48px 28px 40px; }
  .hero h1 { font-size: 36px; }
  .img-grid.cols-2, .img-grid.cols-3, .img-grid.cols-4 { grid-template-columns: 1fr; }
  .problem-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .ai-projects-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 26px; }
  .section { padding: 22px 20px; }
  .page-header { padding: 28px 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, .blob { animation: none; }
  .ai-project-card:hover, .img-box:hover, .project-card:hover { transform: none; }
}
