:root {
  --bg-primary: #000000;
  --bg-gradient: linear-gradient(90deg, #240000, #000000, #240000);
  --accent: #FF5A1F;
  --accent-hover: #ff7235;
  --accent-glow: rgba(255, 90, 31, 0.35);
  --accent-dim: rgba(255, 90, 31, 0.12);
  --text-primary: #FFFFFF;
  --text-secondary: #CFCFCF;
  --text-muted: #888;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --font: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  min-height: 100vh;
  background: var(--bg-primary);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

sup {
  font-size: 0.6em;
  vertical-align: super;
}

/* ─── Scrollbar ─── */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* ─── Navigation ─── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 64px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  transition: background 0.2s;
}

.nav-icon-btn:hover {
  background: var(--glass-bg);
}

/* ─── Hero Section ─── */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 28px 60px;
  position: relative;
  overflow: hidden;
}

/* Glowing circle behind hero */
.hero-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 65%);
  pointer-events: none;
}

/* Floating math symbols */
.hero-symbols {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-symbol {
  position: absolute;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 90, 31, 0.12);
  animation: floatSymbol 8s ease-in-out infinite;
}

.hero-symbol:nth-child(1) { top: 15%; left: 8%; font-size: 3rem; animation-delay: 0s; }
.hero-symbol:nth-child(2) { top: 25%; right: 12%; font-size: 2.5rem; animation-delay: 1.5s; }
.hero-symbol:nth-child(3) { top: 60%; left: 5%; font-size: 2rem; animation-delay: 3s; }
.hero-symbol:nth-child(4) { bottom: 20%; right: 8%; font-size: 3.5rem; animation-delay: 4.5s; }
.hero-symbol:nth-child(5) { top: 40%; left: 50%; font-size: 1.8rem; animation-delay: 6s; }
.hero-symbol:nth-child(6) { bottom: 35%; right: 20%; font-size: 2.2rem; animation-delay: 2s; }

@keyframes floatSymbol {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.12; }
  50% { transform: translateY(-20px) rotate(5deg); opacity: 0.25; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  animation: fadeInUp 0.8s ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 90, 31, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

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

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px;
  border-radius: 50%;
  width: 52px;
  height: 52px;
}

.btn-ghost:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* ─── Scroll Indicator ─── */

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: bounce 2s infinite;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-indicator a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scroll-indicator .arrow {
  font-size: 1.4rem;
  line-height: 1;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* ─── Hero Cards Row ─── */

.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 780px;
  margin: 48px auto 0;
  animation: fadeInUp 1s ease 0.3s both;
}

/* ─── Glass Card ─── */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.glass-card .card-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

/* ─── CAM Preview Card ─── */

.cam-preview {
  min-height: 140px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.3)),
              repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 20px),
              #080808;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.cam-preview::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.cam-preview::after {
  content: '';
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.cam-equation {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.cam-line {
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin-top: 12px;
}

.glass-card .card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}

.glass-card .card-cta:hover {
  background: var(--accent);
  color: #fff;
}

.glass-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ─── Calculator Showcase Card ─── */

.calc-showcase {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.calc-showcase .showcase-expr {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: right;
}

.calc-showcase .showcase-result {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
}

.calc-showcase .showcase-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.mock-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.mock-key {
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mock-key.op {
  background: var(--accent-dim);
  border-color: rgba(255, 90, 31, 0.12);
  color: var(--accent);
}

.mock-key.equals {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  grid-column: span 4;
  margin-top: 2px;
}

/* ─── Sections General ─── */

.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 28px;
  position: relative;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  max-width: 900px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ─── Calculator Section ─── */

.calculator-section {
  padding: 60px 16px 80px;
}

.calc-app {
  max-width: 380px;
  margin: 0 auto;
  background: rgba(10, 10, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  padding: 24px 20px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.calc-app::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -40%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.calc-app-brand {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 14px;
}

.calc-display {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 16px 18px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  margin-bottom: 14px;
}

#displayExpression {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: right;
  width: 100%;
  min-height: 1.4em;
  direction: rtl;
  text-align: left;
}

#result {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
  text-align: right;
  width: 100%;
  line-height: 1.15;
  transition: color 0.2s;
}

#result.error {
  color: #e74c3c;
}

.calc-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

.toolbar-btn {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.toolbar-btn:hover,
.toolbar-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(255, 90, 31, 0.3);
}

.toolbar-mode {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: auto;
  font-family: var(--font-mono);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 7px;
}

.key {
  height: 52px;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 700;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

.key:active {
  transform: scale(0.92);
}

.key-num {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-primary);
}

.key-num:hover {
  background: rgba(255, 255, 255, 0.10);
}

.key-op {
  background: rgba(255, 90, 31, 0.15);
  border: none;
  color: var(--accent);
}

.key-op:hover {
  background: rgba(255, 90, 31, 0.22);
}

.key-fn {
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
}

.key-fn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.key-clear {
  background: rgba(231, 76, 60, 0.10);
  border: none;
  color: #e74c3c;
}

.key-clear:hover {
  background: rgba(231, 76, 60, 0.18);
}

.key-equals {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
  grid-column: span 4;
  height: 48px;
  font-size: 1.3rem;
  border-radius: 14px;
}

.key-equals:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px var(--accent-glow);
}

.keypad-sci {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  margin-bottom: 0;
}

.key-sci {
  height: 36px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  transition: all 0.12s;
}

.key-sci:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

.key-sci:active {
  transform: scale(0.93);
}

/* ─── CAM Section ─── */

#camSection {
  padding: 60px 28px 80px;
}

.cam-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
}

.cam-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.cam-card > p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.cam-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── CAM Modal ─── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.cam-video {
  width: 100%;
  min-height: 240px;
  max-height: 380px;
  object-fit: cover;
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.cam-canvas {
  display: none;
}

.cam-progress {
  margin-top: 14px;
}

.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.cam-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.cam-toolbar .btn {
  flex: 1;
  min-width: 100px;
}

.cam-status {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-height: 1.4em;
  text-align: center;
}

.cam-result {
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-align: left;
}

.cam-result .result-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.cam-result .result-equation {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.cam-result .result-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

/* ─── NLI Section ─── */

.nli-section {
  padding: 60px 28px 80px;
}

.nli-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.nli-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.nli-row {
  display: flex;
  gap: 10px;
}

.nli-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.nli-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.nli-input::placeholder {
  color: var(--text-muted);
}

.nli-explanation {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-height: 1.4em;
  line-height: 1.5;
}

/* ─── Footer ─── */

.footer {
  text-align: center;
  padding: 32px 28px;
  border-top: 1px solid rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* ─── Animations ─── */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ─── Toast ─── */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  padding: 12px 18px;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.error {
  border-color: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.toast.success {
  border-color: rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}

.toast-leave {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(16px); }
}

/* ─── Responsive ─── */

@media (max-width: 900px) {
  .hero-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 8vw, 4.5rem);
  }
}

@media (max-width: 768px) {
  .nav-inner {
    padding: 0 16px;
  }

  .nav-links {
    gap: 0;
  }

  .nav-link {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .nav-logo {
    font-size: 1.1rem;
  }

  .hero {
    padding: 80px 16px 40px;
  }

  .hero-circle {
    width: 350px;
    height: 350px;
  }

  #result {
    font-size: 2.2rem;
  }

  .key {
    height: 48px;
    font-size: 1.05rem;
    border-radius: 12px;
  }

  .key-equals {
    height: 44px;
    font-size: 1.2rem;
    border-radius: 12px;
  }

  .calc-app {
    max-width: 360px;
    padding: 20px 16px 16px;
    border-radius: 24px;
  }

  .calc-display {
    padding: 14px 16px;
    min-height: 80px;
    border-radius: 14px;
  }

  .section {
    padding: 60px 16px;
  }

  .calculator-section {
    padding: 50px 12px 60px;
  }

  .cam-card,
  .nli-card {
    padding: 20px;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-body {
    padding: 16px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .nli-row {
    flex-direction: column;
  }

  .nli-row .btn {
    width: 100%;
  }

  .cam-toolbar .btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.4rem;
  }

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

  .btn {
    padding: 12px 22px;
    font-size: 0.88rem;
  }

  .calc-app {
    max-width: 100%;
    padding: 18px 14px 14px;
    border-radius: 20px;
  }

  .calc-display {
    padding: 12px 14px;
    min-height: 70px;
    border-radius: 12px;
  }

  #result {
    font-size: 2rem;
  }

  #displayExpression {
    font-size: 0.78rem;
  }

  .key {
    height: 46px;
    font-size: 1rem;
    border-radius: 12px;
  }

  .key-equals {
    height: 42px;
    font-size: 1.15rem;
    border-radius: 12px;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }
}
