/* ==========================================================================
   IRFAN MIRZAN · WORKSPACE DESIGN SYSTEM
   Lean, zero-bloat, 60fps native performance · WCAG AA compliant
   ========================================================================== */

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

:root {
  /* Surfaces & Canvas (60%) */
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-badge: #F8FAFC;

  /* Typography & Ink (30%) */
  --text-main: #09090B;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-faint: #94A3B8;

  /* Structural Dividers */
  --border-light: #E2E8F0;
  --border-card: #E2E8F0;
  --border-dark: #09090B;

  /* Brand Accents (10%) */
  --blue-primary: #2563EB;
  --blue-hover: #1D4ED8;
  --blue-soft: #EFF6FF;
  --blue-border: #BFDBFE;

  --orange-accent: #F97316;
  --orange-hover: #EA580C;
  --orange-soft: #FFF7ED;
  --orange-border: #FED7AA;

  --status-green: #10B981;

  /* Crisp Micro-Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-blue: 0 4px 12px rgba(37, 99, 235, 0.22);
  --shadow-modal: 0 16px 36px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);

  /* Radii */
  --radius-full: 9999px;
  --radius-card: 16px;
  --radius-control: 12px;
  --radius-sm: 8px;

  /* Transitions */
  --anim-fast: 140ms cubic-bezier(0.16, 1, 0.3, 1);
  --anim-smooth: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--text-main);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.2;
}

.brand-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin-right: 0.5rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-body);
  text-decoration: none;
  transition: color var(--anim-fast);
}

.nav-link:hover {
  color: var(--orange-accent);
}

/* Pulsing Status Pill */
.live-beacon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.32rem 0.65rem;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2.5s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--anim-fast);
  border: none;
}

.btn-primary-pill {
  background: var(--blue-primary);
  color: #FFFFFF;
  padding: 0.52rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  box-shadow: var(--shadow-blue);
}

.btn-primary-pill:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  padding: 0.52rem 1.15rem;
  border-radius: var(--radius-control);
  font-size: 0.875rem;
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

/* ==========================================================================
   HERO & WORKSPACE GRID
   ========================================================================== */
.hero-section {
  padding: 2.5rem 0 2rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .workspace-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

/* Left Hero Card */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--orange-accent);
}

.hero-heading {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

@media (min-width: 768px) {
  .hero-heading {
    font-size: 2.65rem;
  }
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-body);
}

.hero-desc strong {
  color: var(--text-main);
  font-weight: 600;
}

.quick-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
}

.social-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: all var(--anim-fast);
}

.social-link:hover {
  color: var(--blue-primary);
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

/* Right Widgets Column */
.widgets-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--anim-fast), box-shadow var(--anim-fast);
}

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

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.widget-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.widget-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-body);
}

/* Split Time & Weather */
.time-weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.tw-block {
  padding: 0.75rem;
  background: var(--bg-page);
  border-radius: var(--radius-control);
  border: 1px solid var(--border-light);
}

.tw-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.tw-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  font-family: 'JetBrains Mono', monospace;
}

.tw-sub {
  font-size: 0.75rem;
  color: var(--text-body);
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Focus Items */
.focus-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
}

.focus-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.focus-item:first-child {
  padding-top: 0;
}

.focus-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  background: var(--orange-soft);
  color: var(--orange-accent);
  flex-shrink: 0;
}

.focus-content {
  font-size: 0.8125rem;
  color: var(--text-body);
  line-height: 1.4;
}

.focus-content strong {
  display: block;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.1rem;
}

/* Stack Chips */
.stack-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-body);
}

/* ==========================================================================
   FEATURED WORK & CASE STUDIES
   ========================================================================== */
.section {
  padding: 2.5rem 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-accent);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-body);
  max-width: 640px;
}

/* Category Filter Pills */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--anim-fast);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--text-main);
  color: #FFFFFF;
  border-color: var(--text-main);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
  cursor: pointer;
  transition: transform var(--anim-smooth), box-shadow var(--anim-smooth), border-color var(--anim-fast);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-light);
  transition: background var(--anim-fast);
}

.project-card:hover::before {
  background: var(--blue-primary);
}

/* Project Image Thumbnail */
.project-card-image-wrap {
  width: 100%;
  height: 190px;
  border-radius: var(--radius-control);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  position: relative;
  margin-bottom: 0.35rem;
}

.project-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-card-image {
  transform: scale(1.03);
}

.project-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.folder-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.project-arrow-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  transition: all var(--anim-fast);
}

.project-card:hover .project-arrow-icon {
  background: var(--blue-primary);
  color: #FFFFFF;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-tagline {
  font-size: 0.8125rem;
  color: var(--orange-accent);
  font-weight: 700;
  margin-top: -0.25rem;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.55;
}

.project-preview-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-control);
  padding: 0.85rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-body);
  line-height: 1.45;
}

.preview-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.preview-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.18rem 0.48rem;
  border-radius: 4px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

.project-role-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.project-action-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ==========================================================================
   PLAYGROUND: DUAL MODE STUDIO (THERMAL BOOTH & CUP SLEEVE)
   ========================================================================== */
.playground-section {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 2.25rem 2rem;
  margin: 1.5rem 0 3rem;
  box-shadow: var(--shadow-sm);
}

.playground-top-bar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .playground-top-bar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.lab-switcher {
  display: inline-flex;
  background: var(--bg-page);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  gap: 0.25rem;
}

.lab-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--anim-fast);
}

.lab-tab-btn.active {
  background: var(--text-main);
  color: #FFFFFF;
  box-shadow: var(--shadow-xs);
}

.playground-pane {
  display: none;
}

.playground-pane.active {
  display: block;
}

.playground-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .playground-grid {
    grid-template-columns: 1fr 340px;
    align-items: start;
  }
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sim-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sim-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
}

.sim-slider {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  accent-color: var(--blue-primary);
}

.sim-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sim-chip-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--anim-fast);
}

.sim-chip-btn.active, .sim-chip-btn:hover {
  background: var(--text-main);
  color: #FFFFFF;
  border-color: var(--text-main);
}

.sleeve-input-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-light);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-page);
  outline: none;
  transition: border-color var(--anim-fast);
}

.sleeve-input-control:focus {
  border-color: var(--blue-primary);
  background: #FFFFFF;
}

/* Thermal Paper Visual Frame */
.receipt-paper-frame {
  background: #FDFBF7;
  border: 1px dashed #D4D4D8;
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.receipt-header-meta {
  width: 100%;
  text-align: center;
  border-bottom: 1px dashed #A1A1AA;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: #27272A;
  line-height: 1.4;
}

.dither-canvas-wrapper {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  padding: 6px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#thermalCanvas {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.receipt-footer-meta {
  width: 100%;
  text-align: center;
  border-top: 1px dashed #A1A1AA;
  padding-top: 0.75rem;
  margin-top: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: #52525B;
}

/* Match-a-Made Cup Preview */
.matcha-preview-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}

.cup-display-wrap {
  width: 180px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cup-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.order-ticket-slip {
  width: 100%;
  background: #FFFFFF;
  border: 1px dashed #CBD5E1;
  border-radius: 6px;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

.ticket-header {
  text-align: center;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px dashed #CBD5E1;
  padding-bottom: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.7rem;
  line-height: 1.35;
}

.ticket-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-body);
}

.ticket-row strong {
  color: var(--text-main);
}

.ticket-footer {
  text-align: center;
  border-top: 1px dashed #CBD5E1;
  padding-top: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
  padding: 2.5rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
}

.footer-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-body);
  text-decoration: none;
  transition: color var(--anim-fast);
}

.footer-link:hover {
  color: var(--orange-accent);
}

/* ==========================================================================
   NATIVE HTML5 DIALOGS (<dialog>)
   ========================================================================== */
dialog {
  border: none;
  border-radius: var(--radius-card);
  background: #FFFFFF;
  color: var(--text-main);
  box-shadow: var(--shadow-modal);
  padding: 0;
  max-width: 680px;
  width: 92%;
  margin: auto;
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

dialog[open] {
  animation: modal-enter 180ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-body);
  transition: all var(--anim-fast);
}

.modal-close-btn:hover {
  background: var(--text-main);
  color: #FFFFFF;
}

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.modal-media-stage {
  position: relative;
  width: 100%;
  height: 380px;
  background: #09090b;
  border-radius: var(--radius-control);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.modal-media-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 120ms ease;
  user-select: none;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--anim-fast);
}

.gallery-nav-btn:hover {
  background: var(--blue-primary);
  border-color: var(--blue-primary);
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn.prev {
  left: 12px;
}

.gallery-nav-btn.next {
  right: 12px;
}

.gallery-counter-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  pointer-events: none;
}

.modal-gallery-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.4rem 0.2rem 0.6rem;
  margin-top: -0.35rem;
  min-height: 68px;
  height: 68px;
  flex-shrink: 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.modal-gallery-thumb {
  width: 76px;
  height: 52px;
  min-width: 76px;
  min-height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border-light);
  cursor: pointer;
  flex-shrink: 0;
  background: #f1f5f9;
  transition: all var(--anim-fast);
}

.modal-gallery-thumb:hover {
  border-color: var(--blue-primary);
  transform: translateY(-2px);
}

.modal-gallery-thumb.active {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

.modal-footer {
  padding: 1.15rem 1.5rem;
  background: var(--bg-page);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-main);
  color: #FFFFFF;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS ENHANCEMENTS (< 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .hero-section {
    padding: 1.75rem 0 1.25rem;
  }

  .hero-card {
    padding: 1.5rem 1.25rem;
    gap: 1.1rem;
  }

  .hero-heading {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .nav-wrapper {
    height: 56px;
  }

  .brand-title {
    display: none;
  }

  .live-beacon {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }

  .btn-primary-pill {
    padding: 0.45rem 0.9rem;
    font-size: 0.8125rem;
  }

  .time-weather-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .playground-section {
    padding: 1.5rem 1.15rem;
  }

  .lab-switcher {
    width: 100%;
    justify-content: center;
  }

  .lab-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  .project-card {
    padding: 1.2rem;
  }

  .project-card-image-wrap {
    height: 160px;
  }

  dialog {
    width: 95%;
  }

  .modal-header, .modal-body, .modal-footer {
    padding: 1.15rem;
  }
}
