/* Rupak Biswas Portfolio — New Website
   Clean, standalone CSS (no Tailwind build required)
   Fonts: Geist + Geist Mono via Google Fonts
*/

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* ─── Design Tokens ─── */
:root {
  --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  /* Light theme */
  --background: #ffffff;
  --foreground: #0a0a0a;
  --surface: #f8f8f8;
  --secondary: #f0f0f0;
  --border: #e4e4e7;
  --muted-foreground: #71717a;
  --body: #3f3f46;
  --accent: #2563eb;
  --primary: #0a0a0a;
  --primary-foreground: #ffffff;
  --ink-panel: #0f0f13;
  --ink-panel-foreground: #f8f8f8;
  --shadow-soft: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
  --shadow-lift: 0 4px 16px -2px rgb(0 0 0 / 0.12), 0 2px 6px -2px rgb(0 0 0 / 0.08);
}

/* Dark theme — auto based on time, toggleable */
.dark {
  --background: #0a0a0a;
  --foreground: #fafafa;
  --surface: #111113;
  --secondary: #1a1a1e;
  --border: #27272a;
  --muted-foreground: #71717a;
  --body: #a1a1aa;
  --accent: #60a5fa;
  --primary: #fafafa;
  --primary-foreground: #0a0a0a;
  --ink-panel: #141418;
  --ink-panel-foreground: #f8f8f8;
}

/* ─── 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(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ─── Layout ─── */
.container-page {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 768px) {
  .container-page { padding-inline: 2.5rem; }
}
@media (min-width: 1024px) {
  .container-page { padding-inline: 3rem; }
}

/* ─── Skip link ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.sr-only:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 60;
  width: auto; height: auto; clip: auto; white-space: normal;
  background: var(--surface); padding: 0.5rem 1rem;
  border-radius: 0.375rem; border: 1px solid var(--border);
}

/* ─── Header / Nav ─── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--background);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.site-header.scrolled { border-color: var(--border); }
.site-header .inner {
  display: flex; height: 4rem;
  align-items: center; justify-content: space-between;
}
.site-logo {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.site-nav {
  display: none; align-items: center; gap: 1.5rem;
}
@media (min-width: 768px) {
  .site-nav { display: flex; }
}
.site-nav a {
  font-size: 0.875rem; color: var(--muted-foreground);
  transition: color 0.15s;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--foreground); font-weight: 500;
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500;
  color: var(--muted-foreground); transition: color 0.15s;
}
.nav-cta:hover { color: var(--foreground); }

/* Mobile menu toggle */
.mobile-menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  background: none; border: none; cursor: pointer;
  color: var(--foreground);
}
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }
.mobile-nav {
  display: none; flex-direction: column; gap: 0.5rem;
  padding: 1rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1rem; padding: 0.5rem 0;
  color: var(--muted-foreground); border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a.active { color: var(--foreground); font-weight: 500; }

/* ─── Eyebrow / Label ─── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* ─── Typography helpers ─── */
.font-display { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted-foreground); }
.text-body { color: var(--body); }
.text-accent { color: var(--accent); }
.tracking-tight { letter-spacing: -0.025em; }
.prose-measure { max-width: 65ch; }

/* ─── Sections ─── */
main { min-height: 60vh; }
.section-gap { padding-top: 5rem; }
@media (min-width: 768px) { .section-gap { padding-top: 7rem; } }

/* ─── Hero (Home) ─── */
.hero {
  padding-top: 6rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .hero { padding-top: 8rem; padding-bottom: 6rem; }
}
.hero-eyebrow { margin-bottom: 1.25rem; }
.hero-heading {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--body);
  max-width: 50ch;
  line-height: 1.65;
}
.hero-actions {
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.9375rem; font-weight: 500;
  transition: opacity 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary); color: var(--primary-foreground);
}
.btn-primary:hover { opacity: 0.85; }
.btn-outline {
  background: var(--surface); color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--secondary); }

/* ─── Project Cards ─── */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 768px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}
.project-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  background: var(--background);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
}
.project-image {
  width: calc(100% + 3.5rem);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: -1.75rem -1.75rem 1.5rem;
  border-radius: 1.25rem 1.25rem 0 0;
  background: var(--surface);
}
.work-section-heading {
  margin-top: 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}
.project-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.project-card .tags {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem 0.75rem; margin-bottom: 0.75rem;
}
.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  background: var(--secondary);
  color: var(--muted-foreground);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}
.project-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
@media (min-width: 768px) { .project-card h3 { font-size: 1.375rem; } }
.project-card .company {
  font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.25rem;
}
.project-card dl { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.project-card dt { font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.project-card dd { font-size: 0.875rem; color: var(--body); }
.project-card .sr-only-dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.card-link {
  margin-top: auto;
  padding-top: 1.5rem;
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.875rem; font-weight: 500; color: var(--accent);
}
.card-link svg { transition: transform 0.15s; }
.project-card:hover .card-link svg { transform: translate(2px, -2px); }

/* ─── Home: Leadership preview ─── */
.leadership-preview {
  margin-top: 2rem;
  padding: 2.5rem;
  background: var(--surface);
  border-radius: 1.5rem;
  border: 1px solid var(--border);
}
.leadership-cards {
  display: grid; gap: 1.5rem; margin-top: 1.5rem;
}
@media (min-width: 768px) {
  .leadership-cards { grid-template-columns: repeat(3, 1fr); }
}
.leadership-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.75rem;
}
.leadership-card h3 {
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.025em;
}
.leadership-card p { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.65; color: var(--body); }

/* ─── Inline link with arrow ─── */
.arrow-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.875rem; font-weight: 500; color: var(--accent);
}
.arrow-link:hover { text-decoration: underline; }

/* ─── Work page: project list ─── */
.work-list { margin-top: 3rem; }
.work-list-item a {
  display: grid; gap: 0.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  transition: background 0.15s;
}
@media (min-width: 768px) {
  .work-list-item a {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem; padding: 1.25rem 0.5rem;
  }
}
.work-list-item a:hover { background: var(--surface); }
.work-list-item a:last-child { border-bottom: 1px solid var(--border); }
.work-list-item .title { font-weight: 500; }
.work-list-item .role { color: var(--body); }
.work-list-item .case { font-size: 0.875rem; color: var(--muted-foreground); }
@media (min-width: 768px) { .work-list-item .case { text-align: right; } }

/* ─── About page ─── */
.about-grid {
  display: grid; gap: 3rem; margin-top: 2.5rem;
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid; gap: 0.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
@media (min-width: 640px) {
  .timeline-item { grid-template-columns: 160px 1fr; }
}
.timeline-item:last-child { border-bottom: 1px solid var(--border); }
.timeline-year { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted-foreground); padding-top: 0.1rem; }
.timeline-content h3 { font-weight: 600; }
.timeline-content p { font-size: 0.875rem; color: var(--body); margin-top: 0.25rem; }

/* ─── Leadership page ─── */
.leadership-grid { display: grid; gap: 0; margin-top: 2.5rem; }
.leadership-row {
  display: grid; gap: 1rem;
  padding: 2rem; background: var(--surface);
  border-radius: 0;
}
@media (min-width: 768px) {
  .leadership-row { grid-template-columns: 1fr 1fr; padding: 2.5rem 3rem; }
}
.leadership-row:nth-child(odd) { background: var(--background); }
.leadership-row h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; }
.leadership-row p { font-size: 0.9375rem; line-height: 1.65; color: var(--body); }
.leadership-row a { font-size: 0.875rem; color: var(--accent); }
.leadership-row a:hover { text-decoration: underline; }

.leadership-card {
  transition: background-color 0.2s ease;
}
.leadership-card:hover {
  background-color: var(--background) !important;
}
.dark .leadership-card:hover {
  background-color: #17171c !important;
}

.rhythm-panel {
  margin-top: 5rem;
  background: var(--ink-panel);
  color: var(--ink-panel-foreground);
  border-radius: 1.5rem;
  padding: 2.5rem;
}
@media (min-width: 768px) { .rhythm-panel { padding: 3rem; } }
.rhythm-panel .eyebrow { color: rgba(248,248,248,0.6); }
.rhythm-grid {
  display: grid; gap: 1.5rem; margin-top: 1.5rem;
}
@media (min-width: 768px) { .rhythm-grid { grid-template-columns: repeat(3, 1fr); } }
.rhythm-item {
  padding-top: 1rem;
  border-top: 1px solid rgba(248,248,248,0.15);
}
.rhythm-item h3 { font-weight: 600; font-size: 0.9375rem; }
.rhythm-item p { margin-top: 0.5rem; font-size: 0.875rem; color: rgba(248,248,248,0.75); }

/* ─── Approach page ─── */
.approach-steps {
  display: grid; gap: 0; margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.approach-step {
  display: grid; gap: 1rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) {
  .approach-step { grid-template-columns: 3rem 1fr; gap: 2rem; }
}
.step-number {
  font-family: var(--font-mono);
  font-size: 0.75rem; color: var(--muted-foreground);
  padding-top: 0.25rem;
}
.step-content h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.025em; }
.step-content p { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--body); line-height: 1.65; }
.principles-grid {
  display: grid; gap: 1rem; margin-top: 3rem;
}
@media (min-width: 768px) { .principles-grid { grid-template-columns: repeat(2, 1fr); } }
.principle-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 1rem; padding: 1.5rem;
}
.principle-card h3 { font-weight: 600; }
.principle-card p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--body); line-height: 1.65; }

/* ─── Contact page ─── */
.contact-hero {
  padding-top: 6rem; padding-bottom: 5rem;
}
.contact-hero h1 {
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 600; line-height: 1.05; letter-spacing: -0.025em;
  max-width: 20ch;
}
.contact-hero p { margin-top: 2rem; font-size: 1.125rem; color: var(--body); max-width: 50ch; line-height: 1.65; }
.contact-actions { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ─── Footer ─── */
.site-footer {
  margin-top: 8rem;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid; gap: 2.5rem; padding: 4rem 0;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-cta p { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; }
.footer-cta a { margin-top: 1rem; display: inline-block; color: var(--accent); }
.footer-cta a:hover { text-decoration: underline; }
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; }
.footer-col .label { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 0.5rem; }
.footer-col a { color: var(--muted-foreground); transition: color 0.15s; }
.footer-col a:hover { color: var(--foreground); }
.footer-bottom {
  display: flex; flex-direction: column; gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.75rem; color: var(--muted-foreground);
}
@media (min-width: 640px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ─── Utility ─── */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }

/* ─── Dark/Light toggle button ─── */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9999px;
  background: none; border: 1px solid var(--border);
  cursor: pointer; color: var(--muted-foreground);
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--foreground); border-color: var(--foreground); }

/* ─── Divider ─── */
hr.section-rule { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* ─── Home: stat row ─── */
.stat-row {
  display: flex; flex-wrap: wrap; gap: 2rem;
  margin-top: 4rem; padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.stat-item .num {
  font-size: 2.25rem; font-weight: 600; letter-spacing: -0.025em;
}
.stat-item .label { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* ─── About: skills tags ─── */
.skills-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.skill-tag {
  font-size: 0.8125rem; padding: 0.25rem 0.75rem;
  background: var(--secondary); border: 1px solid var(--border);
  border-radius: 9999px; color: var(--body);
}

/* ─── Tailored Utilities for Full Parity with Live Site ─── */
.font-display { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.15; }
.text-6xl { font-size: 3.75rem; line-height: 1.05; }
.text-7xl { font-size: 4.5rem; line-height: 1.02; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.text-balance { text-wrap: balance; }

.text-muted-foreground { color: var(--muted-foreground); }
.text-body { color: var(--body); }
.text-foreground { color: var(--foreground); }
.text-accent { color: var(--accent); }

.bg-surface { background-color: var(--surface); }
.bg-secondary { background-color: var(--secondary); }
.bg-border { background-color: var(--border); }
.bg-background { background-color: var(--background); }
.bg-ink-panel { background-color: var(--ink-panel); }
.text-ink-panel-foreground { color: var(--ink-panel-foreground); }

.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-l { border-left: 1px solid var(--border); }
.border-r { border-right: 1px solid var(--border); }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.prose-measure { max-width: 68ch; }

.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.overflow-hidden { overflow: hidden; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-x-10 { column-gap: 2.5rem; }
.gap-y-6 { row-gap: 1.5rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-7 { padding: 1.75rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }
.pt-4 { padding-top: 1rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-12 { padding-top: 3rem; }
.pt-16 { padding-top: 4rem; }
.pt-20 { padding-top: 5rem; }
.pt-24 { padding-top: 6rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-14 { margin-top: 3.5rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.mt-24 { margin-top: 6rem; }

.space-y-px > * + * { margin-top: 1px; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-12 > * + * { margin-top: 3rem; }

.scroll-mt-24 { scroll-margin-top: 6rem; }
.w-full { width: 100%; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.hidden { display: none !important; }
.shrink-0 { flex-shrink: 0 !important; }
.text-left { text-align: left !important; }
.uppercase { text-transform: uppercase !important; }
.opacity-60 { opacity: 0.6 !important; }
.overflow-x-auto { overflow-x: auto !important; }

.mr-2 { margin-right: 0.5rem !important; }
.mt-2\.5 { margin-top: 0.625rem !important; }
.p-5 { padding: 1.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pt-6 { padding-top: 1.5rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-px { gap: 1px !important; }

.size-1\.5 { width: 0.375rem !important; height: 0.375rem !important; }
.size-4 { width: 1rem !important; height: 1rem !important; }
.text-\[11px\] { font-size: 11px !important; line-height: 1rem !important; }
.leading-\[1\.1\] { line-height: 1.1 !important; }

.space-y-3 > * + * { margin-top: 0.75rem !important; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important; transition-duration: 150ms !important; }
.hover\:underline:hover { text-decoration: underline !important; }
.hover\:border-foreground\/30:hover { border-color: rgba(var(--foreground-rgb, 17, 24, 39), 0.3) !important; }

.bg-primary { background-color: var(--primary) !important; color: var(--primary-foreground) !important; }
.text-primary-foreground { color: var(--primary-foreground) !important; }
.border-foreground { border-color: var(--foreground) !important; }

.bg-success\/12 { background-color: rgba(16, 185, 129, 0.12) !important; }
.text-success { color: #10b981 !important; }
.bg-warning\/15 { background-color: rgba(245, 158, 11, 0.15) !important; }
.text-warning { color: #d97706 !important; }
.dark .text-warning { color: #f59e0b !important; }

.border-ink-panel-foreground\/10 { border-color: rgba(255, 255, 255, 0.1) !important; }
.border-ink-panel-foreground\/15 { border-color: rgba(255, 255, 255, 0.15) !important; }
.\!text-ink-panel-foreground\/60,
.text-ink-panel-foreground\/60 { color: rgba(255, 255, 255, 0.6) !important; }
.text-ink-panel-foreground\/70 { color: rgba(255, 255, 255, 0.7) !important; }
.text-ink-panel-foreground\/75 { color: rgba(255, 255, 255, 0.75) !important; }

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row !important; }
  .sm\:items-center { align-items: center !important; }
  .sm\:justify-between { justify-content: space-between !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .md\:grid-cols-\[6rem_14rem_1fr\] { grid-template-columns: 6rem 14rem 1fr !important; }
  .md\:items-baseline { align-items: baseline !important; }
  .md\:p-8 { padding: 2rem !important; }
  .md\:p-10 { padding: 2.5rem !important; }
  .md\:p-12 { padding: 3rem !important; }
  .md\:px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
  .md\:pt-20 { padding-top: 5rem !important; }
  .md\:pt-24 { padding-top: 6rem !important; }
  .md\:text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
  .md\:text-4xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
  .md\:text-5xl { font-size: 3rem !important; line-height: 1.15 !important; }
  .md\:text-6xl { font-size: 3.75rem !important; line-height: 1.05 !important; }
}
@media (min-width: 1024px) {
  .lg\:block { display: block !important; }
  .lg\:flex-col { flex-direction: column !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-\[17rem_1fr\] { grid-template-columns: 17rem 1fr !important; }
  .lg\:overflow-visible { overflow: visible !important; }
  .lg\:pb-0 { padding-bottom: 0 !important; }
  .lg\:text-7xl { font-size: 4.5rem !important; line-height: 1.02 !important; }
}

/* ─── Flagship Feature: DesignForge AI (Linear / Stripe Inspired) ─── */
.flagship-section {
  margin-top: 5rem;
  margin-bottom: 5rem;
}
.flagship-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dark .flagship-badge {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
  color: var(--accent);
}
.flagship-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.flagship-card {
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.flagship-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.12);
}
.flagship-header {
  max-width: 54rem;
}
.flagship-header h3 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--foreground);
  margin-top: 0.75rem;
}
.flagship-positioning {
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.75rem;
  line-height: 1.45;
}
.flagship-description {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--body);
  margin-top: 1rem;
  max-width: 65ch;
}
.flagship-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.flagship-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}
.flagship-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Browser Frame Presentation */
.browser-frame {
  margin-top: 3rem;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.12);
}
.browser-chrome {
  height: 38px;
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
}
.browser-dots {
  display: flex;
  gap: 6px;
}
.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.browser-dot:nth-child(1) { background: #ef4444; opacity: 0.75; }
.browser-dot:nth-child(2) { background: #f59e0b; opacity: 0.75; }
.browser-dot:nth-child(3) { background: #10b981; opacity: 0.75; }
.browser-address {
  margin-left: 0.75rem;
  flex: 1;
  max-width: 380px;
  height: 22px;
  background: var(--background);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}
.browser-content img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 3-Column Sub-Feature Showcase */
.flagship-subfeatures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.flagship-subcard {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.flagship-subcard:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.flagship-subcard-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--border);
}
.flagship-subcard-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.flagship-subcard-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--foreground);
}
.flagship-subcard-body p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--body);
  margin-top: 0.5rem;
}

/* ─── Refined Impact Metric Card ─── */
.metric-card-editorial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}
.metric-card-editorial:hover {
  border-color: var(--accent);
}
.metric-card-editorial .val {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foreground);
  line-height: 1;
}
.metric-card-editorial .ctx {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin-top: 0.75rem;
}
.metric-card-editorial .sub {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
  margin-top: 0.35rem;
}

/* ─── Executive Full-Screen Countdown Website Loader ─── */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--background);
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s ease, visibility 0.55s;
  will-change: opacity, transform;
}
.site-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.99);
}
.loader-inner {
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
}
.loader-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.loader-brand {
  margin-top: 1.75rem;
}
.loader-name {
  font-family: var(--font-sans);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foreground);
  line-height: 1.15;
}
.loader-role {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.35rem;
}

/* Large Countdown Number Display */
.loader-countdown-box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2rem;
  font-family: var(--font-mono);
}
.loader-count-num {
  font-size: clamp(3rem, 8vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}
.loader-count-unit {
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 600;
}

/* Sleek Progress Track */
.loader-bar-track {
  width: 100%;
  height: 3px;
  background-color: var(--border);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 1rem;
}
.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--foreground), var(--accent));
  border-radius: 9999px;
  transition: width 0.08s linear;
}

/* Status Ticker */
.loader-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.loader-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ─── System Timezone Clock in Header ─── */
.system-clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}
.system-clock-badge:hover {
  border-color: var(--foreground);
  transform: translateY(-1px);
}
.clock-live-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
  display: inline-block;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite ease-in-out;
}
.system-clock-badge.night-mode .clock-live-indicator {
  background-color: #60a5fa;
  box-shadow: 0 0 6px rgba(96, 165, 250, 0.5);
}
.clock-time-val {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.clock-tz-val {
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.clock-mode-pill {
  font-size: 0.625rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}
.system-clock-badge.night-mode .clock-mode-pill {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}
@media (max-width: 640px) {
  .clock-tz-val,
  .clock-mode-pill {
    display: none;
  }
}

/* ─── Lazy Loading Image States & Network Fallback ─── */
img {
  max-width: 100%;
  height: auto;
}
img[loading="lazy"] {
  opacity: 1;
}
img.img-loaded,
img:not([loading="lazy"]) {
  opacity: 1 !important;
}

/* Network Issue Fallback Card for Images */
.network-fallback-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 1rem;
  text-align: center;
  min-height: 220px;
  width: 100%;
  margin: 1rem 0;
}
.network-fallback-card svg {
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}
.network-fallback-card .fallback-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}
.network-fallback-card .fallback-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  max-width: 32ch;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.network-fallback-card .fallback-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.network-fallback-card .fallback-retry-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

/* ─── Global Network Connection Toast ─── */
.network-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.network-toast.toast-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.network-toast.toast-offline {
  background: #18181b;
  color: #fafafa;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.dark .network-toast.toast-offline {
  background: #27272a;
  border-color: rgba(239, 68, 68, 0.5);
}
.network-toast.toast-online {
  background: #18181b;
  color: #fafafa;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.network-toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.network-toast.toast-offline .network-toast-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}
.network-toast.toast-online .network-toast-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
