/* ── PREMIUM PORTFOLIO DESIGN SYSTEM (LIGHT/DARK) ────────────── */

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

:root {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-dark: #0f172a; /* Keeping terminal dark slate for professional contrast */
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  
  /* Accent Colors (Terracotta & Slate Blue) */
  --accent: #c2410c; /* Terracotta Rust Orange */
  --accent-rgb: 194, 65, 12;
  --accent2: #334155; /* Slate Blue */
  --accent2-rgb: 51, 65, 85;
  --text: #0f172a; /* Dark Slate Heading */
  --text-muted: #475569; /* Slate Grey Body */
  --text-dim: #94a3b8;
  
  /* Status Colors */
  --green: #0f766e;
  --gold: #b45309;
  --red: #be123c;
  
  /* Fonts */
  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Animations */
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --r-card: 16px;
  --r-inner: 8px;
}

[data-theme="dark"] {
  --bg: #0b0f19;
  --bg-card: #131c30;
  --bg-card-hover: #1e294b;
  --border: #1e293b;
  --border-hover: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent: #ea580c;
  --accent-rgb: 234, 88, 12;
  --accent2: #475569;
  --accent2-rgb: 71, 85, 105;
  
  --green: #2dd4bf;
  --gold: #fbbf24;
  --red: #f87171;
}

/* Global Theme Transition */
body, nav, .bento-card, .exp-card, .project-card, .lab-card, .contact-method-card, .form-field input, .form-field textarea, .theme-toggle-btn, .fc-node, .inspector-card {
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

/* ── BASE RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  
  /* Grid Background Layout matching the reference photo */
  background-color: var(--bg);
  background-image: 
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center top;
}

/* Glass noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.01;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

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

img {
  display: block;
  max-width: 100%;
}

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

/* ── LAYOUT & CONTAINER ───────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAVIGATION ──────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 0;
  transition: all var(--transition);
}
nav.scrolled {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
nav .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 22px;
  border-radius: 30px;
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
}
.nav-cta:hover {
  background: var(--text);
  color: var(--bg-card);
  border-color: var(--text);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  cursor: pointer;
}
.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  transform: translateX(100%);
  transition: transform var(--transition);
}
.mobile-nav.open {
  transform: translateX(0);
}
.mobile-nav a {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.mobile-nav a:hover {
  color: var(--accent);
}
.mobile-close {
  position: absolute;
  top: 24px; right: 32px;
  font-size: 2rem;
  color: var(--text-muted);
}

/* ── HERO SECTION ────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 140px 0 80px;
}
.lorenz-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35; /* Blending the canvas attractor into the clean grid background */
}
.hero-radial-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.02) 0%, transparent 70%);
  z-index: 2;
  pointer-events: none;
}
.hero-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 10;
  width: 100%;
}
.hero-content {
  position: relative;
  z-index: 10;
}
.hero-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 10;
}
.hero-profile-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
}
.hero-profile-card .profile-pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--border);
  overflow: hidden;
}
.hero-profile-card .profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-profile-card .profile-info h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}
.hero-profile-card .profile-title {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 12px;
}
.hero-profile-card .profile-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Callout Badges replacing handwritten annotations */
.callout-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}
.callout-badge span.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.callout-badge.green span.dot { background: var(--green); }
.callout-badge.gold span.dot { background: var(--gold); }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 24px;
}
.hero-title span {
  color: var(--accent);
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 620px;
}
.hero-desc strong {
  color: var(--text);
  font-weight: 600;
}
.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Button Classes matching the reference photo */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.15);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: #a5360a;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.25);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 6px;
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  background: var(--bg-card);
}
.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

/* ── BENTO ABOUT SECTION ──────────────────────────────────────── */
.section {
  padding: 100px 0;
  position: relative;
}
.section-header {
  margin-bottom: 50px;
  position: relative;
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-title em {
  font-style: normal;
  color: var(--accent);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(170px, auto);
  gap: 20px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03), 0 1px 8px rgba(15, 23, 42, 0.02);
}

.bento-card.col-2 { grid-column: span 2; }
.bento-card.row-2 { grid-row: span 2; }
.bento-card.col-3 { grid-column: span 3; }

.bento-card-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.bento-card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.bitcoin-card {
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.03) 0%, transparent 100%);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bitcoin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bitcoin-logo {
  font-size: 2.2rem;
  color: #f7931a;
}
.bitcoin-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #f7931a;
  background: rgba(247, 147, 26, 0.08);
  border: 1px solid rgba(247, 147, 26, 0.15);
  padding: 4px 10px;
  border-radius: 100px;
}
.bitcoin-body h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 20px;
}
.bitcoin-highlight {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}
.bitcoin-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 10px;
}
.profile-pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}
.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-info h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}
.profile-info p {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-top: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 100%;
  align-content: center;
}
.stat-item {
  text-align: center;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.tag {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
}

.roles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.role-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.role-item i {
  color: var(--accent);
  font-size: 0.75rem;
}

/* ── EXPERIENCE SECTION ──────────────────────────────────────── */
.exp-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 30px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.exp-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
}
.exp-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exp-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}
.exp-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  width: fit-content;
}
.badge-intern { background: rgba(15, 118, 110, 0.08); color: var(--green); border: 1px solid rgba(15, 118, 110, 0.15); }
.badge-hack { background: rgba(180, 83, 9, 0.08); color: var(--gold); border: 1px solid rgba(180, 83, 9, 0.15); }
.badge-freelance { background: rgba(194, 65, 12, 0.08); color: var(--accent); border: 1px solid rgba(194, 65, 12, 0.15); }

.exp-right h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.exp-org {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.exp-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.exp-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ── PROJECTS SECTION ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.04);
}
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.project-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.project-icon.violet { background: rgba(51, 65, 85, 0.06); color: var(--accent2); }
.project-icon.cyan { background: rgba(194, 65, 12, 0.06); color: var(--accent); }
.project-icon.green { background: rgba(15, 118, 110, 0.06); color: var(--green); }
.project-icon.gold { background: rgba(180, 83, 9, 0.06); color: var(--gold); }
.project-icon.red { background: rgba(190, 18, 60, 0.06); color: var(--red); }

.project-links {
  display: flex;
  gap: 10px;
}
.proj-link {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.proj-link:hover {
  border-color: var(--text);
  color: var(--text);
}

.project-body h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.project-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-bullets {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project-bullets li {
  display: flex;
  gap: 8px;
}
.project-bullets li::before {
  content: '→';
  color: var(--accent);
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stack-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ── THE LAB (SANDBOX SIMULATIONS) ───────────────────────────── */
.lab-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-top: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.lab-tabs {
  display: flex;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.lab-tab-btn {
  flex: 1;
  padding: 18px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  border-right: 1px solid var(--border);
  cursor: pointer;
}
.lab-tab-btn:last-child {
  border-right: none;
}
.lab-tab-btn:hover {
  color: var(--text);
  background: #ffffff;
}
.lab-tab-btn.active {
  color: var(--accent);
  background: #ffffff;
  border-bottom: 2px solid var(--accent);
}

.lab-panel {
  display: none;
  padding: 40px;
  min-height: 400px;
}
.lab-panel.active {
  display: block;
}
.panel-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── THE LAB INTERACTIVE ARCHITECTURE FLOWCHARTS ────────────── */
.lab-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 30px;
}
.lab-diagram {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px 20px;
  width: 100%;
}
.diagram-tier {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.tier-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-align: center;
}
.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
}
.nodes-grid.centered {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.nodes-grid.centered .fc-node {
  flex: 0 1 170px;
}
.fc-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-inner);
  padding: 12px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}
.fc-node:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.08);
}
.fc-node.active-node {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.03);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.1);
}
.fc-node.highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.08);
}
.fc-node.dimmed {
  opacity: 0.35;
}
.fc-node .node-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.fc-node .node-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.tier-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  height: 10px;
}

.lab-inspector {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.inspector-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.inspector-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.inspector-body .project-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 750;
  color: var(--text);
  margin-bottom: 8px;
}
.inspector-body .project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.inspector-body .hint-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 16px;
  font-style: italic;
}
.inspector-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s ease-in-out;
}
.node-badge {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
}
.ins-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.ins-file {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ins-file code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.ins-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 4px;
}

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

/* ── CERTIFICATIONS SECTION ──────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.cert-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}
.cert-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-inner);
  background: rgba(194, 65, 12, 0.06);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.cert-details h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.cert-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ── CONTACT SECTION ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  margin-top: 30px;
}
.contact-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 30px;
}
.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-method-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.contact-method-card i {
  color: var(--accent);
  font-size: 1.1rem;
}
.contact-method-card:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateX(4px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.form-field input, .form-field textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--text);
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--accent);
}
.form-field textarea {
  min-height: 120px;
  resize: vertical;
}
.form-status {
  display: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-top: 10px;
}
.form-status.success {
  display: block;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.15);
  color: var(--green);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
footer .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.footer-socials {
  display: flex;
  gap: 16px;
}
.footer-socials a {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-socials a:hover {
  color: var(--accent);
}

/* ── DEVELOPER TERMINAL ──────────────────────────────────────── */
.terminal-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 30px;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #ffffff;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: all var(--transition);
  backdrop-filter: blur(12px);
}
.terminal-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.terminal-trigger kbd {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.65rem;
}

.dev-terminal-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 330px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid rgba(255,255,255,0.05);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.dev-terminal-container.open {
  transform: translateY(0);
}
.terminal-bar {
  background: rgba(255,255,255,0.02);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.terminal-title {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-actions button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px;
  transition: color var(--transition);
}
.terminal-actions button:hover {
  color: #ffffff;
}

.terminal-output {
  flex: 1;
  padding: 18px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #cbd5e1;
}
.output-line {
  line-height: 1.5;
  white-space: pre-wrap;
}
.output-line .highlight { color: var(--accent); font-weight: 500; }
.output-line .accent { color: #38bdf8; }
.output-line .gold { color: #f59e0b; }
.output-line .green { color: #34d399; }
.output-line .red { color: #f87171; }

.terminal-input-row {
  padding: 12px 24px;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 10px;
}
.terminal-prompt {
  color: #34d399;
  font-weight: 600;
  white-space: nowrap;
}
#terminal-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  width: 100%;
}

/* ── RESPONSIVE STYLING ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card.col-3 {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-profile-card {
    max-width: 450px;
    margin: 0 auto;
  }
  .lab-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .samudra-flow-container {
    grid-template-columns: 1fr;
  }
  .samudra-svg-connections {
    display: none;
  }
  .exp-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
  nav {
    padding: 16px 0;
  }
  .nav-links, .nav-cta {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card.col-2, .bento-card.col-3 {
    grid-column: span 1;
  }
  .form-field-row {
    grid-template-columns: 1fr;
  }
  footer .inner {
    flex-direction: column;
    gap: 20px;
  }
}

/* ── SAMUDRA SACHET FLOW CHART ── */
#panel-samudra .lab-layout {
  grid-template-columns: 1fr;
  gap: 28px;
}

#panel-samudra .inspector-card {
  min-height: 180px;
}

.samudra-diagram-container {
  width: 100%;
  padding: 30px 20px !important;
  background: var(--bg) !important;
}

.samudra-flow-container {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 1.35fr;
  gap: 28px;
  width: 100%;
  position: relative;
}

.samudra-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 2;
}

.samudra-layer-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all var(--transition);
}

.samudra-layer-box:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.samudra-layer-box .layer-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 4px;
}

.samudra-svg-connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

[data-theme="dark"] .samudra-svg-connections path {
  stroke: var(--border-hover) !important;
}

