:root {
  --bg-main: #090d16;
  --bg-card: #111a2e;
  --bg-card-hover: #16223d;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(6, 182, 212, 0.3);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #06b6d4;
  --accent-sky: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

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

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-cyan);
  color: #041019;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 1000;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

/* Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-sky) 60%, var(--accent-emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-logo svg {
  width: 32px;
  height: 32px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-link:hover, .nav-link:focus-visible {
  color: var(--text-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.nav-cta:hover, .nav-cta:focus-visible {
  background: var(--accent-cyan);
  color: #041019;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* Hero Section */
.hero-section {
  padding: 160px 0 100px;
  position: relative;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 60%);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-emerald);
  margin-bottom: 2rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.btn-primary {
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #041019;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
}

.btn-secondary {
  padding: 0.85rem 1.75rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Stats Bar */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 950px;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Sections Common */
.section {
  padding: 100px 0;
  scroll-margin-top: 88px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4rem;
}

.section-tag {
  color: var(--accent-cyan);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Capabilities Cards Grid */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.cap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.cap-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  box-shadow: 0 16px 32px rgba(6, 182, 212, 0.08);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.cap-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.cap-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.cap-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Projects Section & Terminal Mockup */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Terminal Frame */
.terminal-window {
  background: #060911;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 200px;
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #0d1424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 8px;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; opacity: 0.8; }
.dot-yellow { background: #f59e0b; opacity: 0.8; }
.dot-green { background: #10b981; opacity: 0.8; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  letter-spacing: 0.02em;
}

.terminal-body {
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #cbd5e1;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.t-prompt { color: var(--accent-cyan); font-weight: 600; }
.t-cmd { color: #f8fafc; font-weight: 500; }
.t-ok { color: var(--accent-emerald); font-weight: 600; }
.t-metric { color: var(--accent-sky); }
.t-muted { color: #64748b; }

.project-body {
  padding: 1.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-metrics {
  display: flex;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.metric-col h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-emerald);
  font-variant-numeric: tabular-nums;
}

.metric-col p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Architecture Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.pillar-item {
  padding: 1.75rem;
  background: rgba(17, 26, 46, 0.5);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.pillar-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pillar-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Contact Section */
.contact-container {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: #090d16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-fast);
}

.form-control:focus, .form-control:focus-visible {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #041019;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.form-submit-btn:hover, .form-submit-btn:focus-visible {
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
  transform: translateY(-1px);
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #111a2e;
  border: 1px solid var(--accent-emerald);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  background: #070a11;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-nav {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.footer-nav a:hover, .footer-nav a:focus-visible {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 860px) {
  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: #090d16;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-150%);
    transition: var(--transition-smooth);
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }

  .stats-banner {
    grid-template-columns: 1fr;
  }
}
