:root {
  --bg-primary: #070a11;
  --bg-secondary: #0d131f;
  --bg-card: rgba(13, 22, 38, 0.7);
  --bg-card-hover: rgba(19, 31, 53, 0.85);
  
  /* Elevated card surface for spatial depth in dark mode */
  --bg-surface-elevated: rgba(17, 27, 47, 0.85);
  --bg-surface-hover: rgba(22, 35, 60, 0.95);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(16, 185, 129, 0.4);
  
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --blue-400: #60a5fa;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

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

/* Ambient glow & grid */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 10, 17, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

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

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

.brand-icon {
  width: 32px;
  height: 32px;
}

.brand-text span {
  color: var(--emerald-400);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-400);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--emerald-400);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 5.5rem 0 3.5rem;
  text-align: left;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--emerald-400);
  margin-bottom: 1.75rem;
}

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

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.hero h1 {
  font-size: clamp(2.35rem, 5vw, 3.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 950px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 20%, var(--emerald-400) 70%, var(--cyan-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.18rem;
  color: var(--text-secondary);
  max-width: 780px;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #04130e;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Metrics bar */
.metrics-strip {
  margin: 3.5rem 0 4.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  background: linear-gradient(135deg, #ffffff 40%, var(--emerald-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Section Common */
section {
  padding: 4.5rem 0;
}

.section-head {
  margin-bottom: 3rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 680px;
  margin-top: 0.5rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2.25rem 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-400);
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--cyan-400);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Philosophy Banner */
.philosophy-banner {
  background: rgba(13, 22, 38, 0.55);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--emerald-400);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin-top: 3rem;
}

.philosophy-banner p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
}

.philosophy-author {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--emerald-400);
  font-family: var(--font-mono);
}

/* Enterprise Heritage Timeline / Grid */
.heritage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.heritage-card {
  background: rgba(12, 19, 32, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.85rem 1.65rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.heritage-card:hover {
  background: rgba(16, 26, 45, 0.9);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.heritage-era {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  align-self: flex-start;
  margin-bottom: 0.85rem;
}

.heritage-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.heritage-role {
  font-size: 0.85rem;
  color: var(--cyan-400);
  font-family: var(--font-mono);
  margin-bottom: 0.85rem;
}

.heritage-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Standardized Featured Projects Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  align-items: stretch;
}

.project-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  position: relative;
}

.project-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-400);
  display: inline-block;
  margin-bottom: 0.65rem;
}

.project-card h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

/* Card Anchor Footer */
.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 1.25rem;
  margin-top: auto;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-400);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-card-action:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--emerald-400);
  transform: translateY(-1px);
}

.badge-card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* Contact Card */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.contact-card h2 {
  font-size: 2.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.email-box {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.email-address {
  font-family: var(--font-mono);
  color: var(--emerald-400);
  font-size: 1.05rem;
  font-weight: 500;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  border-color: var(--emerald-400);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.btn-contact-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.btn-contact-social:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.contact-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1.75rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  margin-top: 5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .heritage-grid {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding: 3.5rem 0 2rem;
  }
  .metrics-strip {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem;
  }
}
