/* ─────────────────────────────────────────────
   V7: "The Architect" — Bento Grid Portfolio
   Design: Dark OLED + Green accent system
   Typography: Space Grotesk / Inter / JetBrains Mono
   ───────────────────────────────────────────── */

/* ── VARIABLES ── */
:root {
  /* Dark theme (default) */
  --bg-primary: #06090F;
  --bg-secondary: #0D1117;
  --bg-card: #111820;
  --bg-card-hover: #161D27;
  --border: #1B2332;
  --border-hover: #2D3A4D;
  --text-primary: #E6EDF3;
  --text-secondary: #9BA4B0;
  --text-muted: #636D78;
  --accent: #3FB950;
  --accent-dim: #238636;
  --accent-glow: rgba(63, 185, 80, 0.12);
  --accent-glow-strong: rgba(63, 185, 80, 0.25);
  --highlight: #58A6FF;
  --surface-glass: rgba(13, 17, 23, 0.7);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(63, 185, 80, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 64px;
  --container-max: 1200px;
  --transition: 200ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #FAFBFC;
  --bg-secondary: #F0F2F5;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F6F8FA;
  --border: #D8DEE4;
  --border-hover: #B8C0CC;
  --text-primary: #1B1F24;
  --text-secondary: #57606A;
  --text-muted: #8B949E;
  --accent: #1A7F37;
  --accent-dim: #238636;
  --accent-glow: rgba(26, 127, 55, 0.08);
  --accent-glow-strong: rgba(26, 127, 55, 0.15);
  --highlight: #0969DA;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 40px rgba(26, 127, 55, 0.06);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  cursor: none;
}

a, button, select, input, textarea, [role="button"] {
  cursor: none;
}

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

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

ul, ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ── GRAIN OVERLAY ── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ── SCROLL PROGRESS ── */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 10001;
  width: 0;
  transition: none;
  box-shadow: 0 0 8px var(--accent);
}

/* ── CONTAINER ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAVIGATION ── */
#header {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  transition: var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--nav-height);
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
  50% { opacity: 0.6; box-shadow: 0 0 16px var(--accent); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

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

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

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

.version-select {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
}

.version-select:focus-visible {
  border-color: var(--accent);
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.theme-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

.resume-btn {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

[data-theme="light"] .resume-btn {
  color: #fff;
}

.resume-btn:hover {
  background: var(--accent-dim);
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO: BENTO GRID ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) 24px 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.45fr;
  grid-template-rows: auto auto auto;
  gap: 12px;
  max-width: var(--container-max);
  width: 100%;
  grid-template-areas:
    "main      photo"
    "metrics   metrics"
    "location  ticker"
    "socials   ticker";
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--border-hover);
}

/* Main intro */
.bento-main {
  grid-area: main;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 36px;
}

.bento-main__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(63, 185, 80, 0.2);
  width: fit-content;
}

.status-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.text-accent {
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  padding-top: 4px;
}

/* Photo */
.bento-photo {
  grid-area: photo;
  padding: 0;
  overflow: hidden;
  position: relative;
  min-height: 320px;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-photo:hover .hero-photo {
  transform: scale(1.04);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(transparent, rgba(6, 9, 15, 0.9));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.photo-role, .photo-product {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.photo-product {
  color: var(--accent);
}

[data-theme="light"] .photo-overlay {
  background: linear-gradient(transparent, rgba(250, 251, 252, 0.9));
}

/* Metrics */
.bento-metrics {
  grid-area: metrics;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 28px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
}

.bento-metrics::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: radial-gradient(ellipse at 50% 50%, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.metric-unit {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* Location */
.bento-location {
  grid-area: location;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 24px 28px;
}

.bento-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  margin-bottom: 4px;
}

.bento-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* Tech ticker */
.bento-ticker {
  grid-area: ticker;
  padding: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: ticker-scroll 20s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.ticker-sep {
  color: var(--text-muted);
  opacity: 0.4;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Socials */
.bento-socials {
  grid-area: socials;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.social-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  box-shadow: var(--shadow-glow);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

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

.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-glow-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* ── SECTIONS ── */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 185, 80, 0.15);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ── ABOUT ── */
.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.75;
}

.about-lead {
  font-size: 1.125rem;
  color: var(--text-primary) !important;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-text em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ── STACK ── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.stack-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.stack-group:hover {
  border-color: var(--border-hover);
}

.stack-group-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.stack-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.pill--primary {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: var(--accent-glow);
}

.pill--accent {
  border-color: rgba(88, 166, 255, 0.3);
  color: var(--highlight);
  background: rgba(88, 166, 255, 0.08);
}

/* ── EXPERIENCE ── */
.exp-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: var(--transition);
}

.exp-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.exp-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.exp-company {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.exp-product {
  color: var(--accent);
  font-weight: 500;
  margin-left: 4px;
}

.exp-role {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.exp-card__right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

.exp-card__body {
  margin-bottom: 20px;
}

.exp-group {
  margin-bottom: 20px;
}

.exp-group:last-child {
  margin-bottom: 0;
}

.exp-group-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.exp-group-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-list li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.exp-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}

.highlight {
  color: var(--accent);
  font-weight: 600;
}

.exp-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tag--accent {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ── BUILDS ── */
.builds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.build-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  cursor: default;
}

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

.build-card--featured {
  border-color: rgba(63, 185, 80, 0.2);
  background: linear-gradient(135deg, var(--bg-card), rgba(63, 185, 80, 0.03));
}

.build-card--featured:hover {
  border-color: rgba(63, 185, 80, 0.4);
  box-shadow: var(--shadow-glow);
}

.build-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.build-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: space-between;
}

.build-card__icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.build-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid rgba(63, 185, 80, 0.2);
}

.build-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}

.build-link:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

.build-link svg {
  width: 16px;
  height: 16px;
}

.build-card__name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.build-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.build-card__desc strong {
  color: var(--accent);
  font-weight: 600;
}

.build-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

/* ── EDUCATION ── */
.edu-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.edu-heading {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.edu-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  transition: var(--transition);
}

.edu-card:hover {
  border-color: var(--border-hover);
}

.edu-card__icon {
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 2px;
}

.edu-card__icon svg {
  width: 20px;
  height: 20px;
}

.edu-card__degree {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.edu-card__school {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.edu-card__meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.cert-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.cert-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.cert-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.cert-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.cert-issuer {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── RECOMMENDATIONS ── */
.recs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.rec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
}

.rec-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.rec-quote-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  opacity: 0.5;
}

.rec-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  flex: 1;
}

.rec-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.rec-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* ── CONTACT ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-lead {
  font-size: 1.25rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 32px;
  font-weight: 500;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.contact-link-item:hover {
  color: var(--accent);
}

.contact-link-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.contact-link-item:hover svg {
  color: var(--accent);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 12px 16px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
}

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

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
}

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

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

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

.footer-socials a svg {
  width: 18px;
  height: 18px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}

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

.footer-top svg {
  width: 16px;
  height: 16px;
}

/* ── MODAL ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: 90%;
  max-width: 800px;
  height: 80vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.modal-title {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  flex: 1;
  padding: 0;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10002;
  padding: 14px 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-slow);
  pointer-events: none;
}

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

.toast.success {
  border-color: var(--accent);
}

.toast.error {
  border-color: #f85149;
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.bento-card {
  opacity: 0;
  transform: translateY(20px);
  animation: bento-in 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bento-card:nth-child(1) { animation-delay: 100ms; }
.bento-card:nth-child(2) { animation-delay: 200ms; }
.bento-card:nth-child(3) { animation-delay: 300ms; }
.bento-card:nth-child(4) { animation-delay: 400ms; }
.bento-card:nth-child(5) { animation-delay: 500ms; }
.bento-card:nth-child(6) { animation-delay: 550ms; }

@keyframes bento-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bento-card { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 0.5fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .edu-layout {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--nav-height) + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px;
    gap: 2px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 10px 16px;
    width: 100%;
  }

  .mobile-toggle {
    display: flex;
  }

  .resume-btn {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "photo"
      "metrics"
      "location"
      "ticker"
      "socials";
  }

  .bento-main {
    padding: 28px 24px;
  }

  .bento-photo {
    min-height: 240px;
  }

  .bento-metrics {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }

  .metric-divider {
    width: 1px;
    height: 36px;
  }

  .hero-name {
    font-size: 2.75rem;
  }

  .hero-cta {
    flex-direction: column;
  }

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

  .builds-grid {
    grid-template-columns: 1fr;
  }

  .recs-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .exp-card__header {
    flex-direction: column;
  }

  .exp-card__right {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
    gap: 4px;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 480px) {
  #header {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .nav {
    padding: 0 16px;
  }

  .hero-name {
    font-size: 2.25rem;
  }

  .metric-value {
    font-size: 2rem;
  }
}

/* ═══════════════════════════════════════════════
   3D EFFECTS & IMMERSIVE DESIGN
   ═══════════════════════════════════════════════ */

/* ── CUSTOM CURSOR ── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: -3px;
  left: -3px;
  transition: transform 100ms ease, opacity 100ms ease;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  position: absolute;
  top: -18px;
  left: -18px;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              width 200ms ease, height 200ms ease,
              top 200ms ease, left 200ms ease,
              border-color 200ms ease,
              background 200ms ease;
}

.cursor.hovering .cursor-ring {
  width: 56px;
  height: 56px;
  top: -28px;
  left: -28px;
  border-color: var(--accent);
  background: rgba(63, 185, 80, 0.08);
}

.cursor.hovering .cursor-dot {
  transform: scale(2);
  background: var(--accent);
}

.cursor.clicking .cursor-ring {
  transform: scale(0.8);
}

/* Hide on touch devices */
@media (hover: none) {
  .cursor { display: none; }
  body { cursor: auto !important; }
}

/* ── THREE.JS CANVAS ── */
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#hero {
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 2;
}

/* ── FLOATING 3D SHAPES ── */
.floating-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  perspective: 1200px;
  overflow: hidden;
}

.shape {
  position: absolute;
  transform-style: preserve-3d;
}

/* ─ Cube ─ */
.cube {
  width: 40px;
  height: 40px;
  position: relative;
  transform-style: preserve-3d;
  animation: cube-rotate 12s linear infinite;
}

.cube-sm {
  width: 24px;
  height: 24px;
}

.cube .face {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(63, 185, 80, 0.2);
  background: rgba(63, 185, 80, 0.03);
  backface-visibility: visible;
}

.cube .front  { transform: translateZ(20px); }
.cube .back   { transform: translateZ(-20px) rotateY(180deg); }
.cube .right  { transform: translateX(20px) rotateY(90deg); }
.cube .left   { transform: translateX(-20px) rotateY(-90deg); }
.cube .top    { transform: translateY(-20px) rotateX(90deg); }
.cube .bottom { transform: translateY(20px) rotateX(-90deg); }

.cube-sm .front  { transform: translateZ(12px); }
.cube-sm .back   { transform: translateZ(-12px) rotateY(180deg); }
.cube-sm .right  { transform: translateX(12px) rotateY(90deg); }
.cube-sm .left   { transform: translateX(-12px) rotateY(-90deg); }
.cube-sm .top    { transform: translateY(-12px) rotateX(90deg); }
.cube-sm .bottom { transform: translateY(12px) rotateX(-90deg); }

@keyframes cube-rotate {
  0%   { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* ─ Octahedron ─ */
.octahedron {
  width: 30px;
  height: 30px;
  position: relative;
  transform-style: preserve-3d;
  animation: octa-spin 16s linear infinite;
}

.octahedron::before,
.octahedron::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
}

.octahedron::before {
  border-bottom: 26px solid rgba(88, 166, 255, 0.15);
  top: 0;
}

.octahedron::after {
  border-top: 26px solid rgba(88, 166, 255, 0.1);
  bottom: 0;
}

@keyframes octa-spin {
  0%   { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg); }
}

/* ─ Ring ─ */
.ring-3d {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(63, 185, 80, 0.15);
  border-radius: 50%;
  transform-style: preserve-3d;
  animation: ring-orbit 20s linear infinite;
}

.ring-3d::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(88, 166, 255, 0.1);
  border-radius: 50%;
}

@keyframes ring-orbit {
  0%   { transform: rotateX(70deg) rotateZ(0deg); }
  100% { transform: rotateX(70deg) rotateZ(360deg); }
}

/* ─ Pyramid ─ */
.pyramid {
  width: 32px;
  height: 32px;
  position: relative;
  transform-style: preserve-3d;
  animation: pyramid-rotate 14s linear infinite;
}

.pyramid .face {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid rgba(63, 185, 80, 0.08);
}

.pyramid .front { transform: rotateX(30deg) translateZ(10px); }
.pyramid .right { transform: rotateY(90deg) rotateX(30deg) translateZ(10px); }
.pyramid .back  { transform: rotateY(180deg) rotateX(30deg) translateZ(10px); }
.pyramid .left  { transform: rotateY(-90deg) rotateX(30deg) translateZ(10px); }
.pyramid .base  {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(63, 185, 80, 0.04);
  transform: rotateX(90deg) translateZ(-14px);
}

@keyframes pyramid-rotate {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* ─ Shape positions ─ */
.shape-1 { top: 12%; left: 8%; animation: float-y 8s ease-in-out infinite; }
.shape-2 { top: 20%; right: 12%; animation: float-y 10s ease-in-out infinite 1s; }
.shape-3 { bottom: 25%; left: 15%; animation: float-y 12s ease-in-out infinite 2s; }
.shape-4 { bottom: 15%; right: 8%; animation: float-y 9s ease-in-out infinite 0.5s; }
.shape-5 { top: 55%; left: 5%; animation: float-y 11s ease-in-out infinite 3s; }

@keyframes float-y {
  0%, 100% { transform: translateY(0) translateX(0); }
  25%      { transform: translateY(-20px) translateX(5px); }
  50%      { transform: translateY(-8px) translateX(-5px); }
  75%      { transform: translateY(-25px) translateX(3px); }
}

/* ── 3D TILT CARD EFFECTS ── */
.tilt-card,
.build-card,
.stat-card,
.rec-card,
.exp-card,
.stack-group {
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
}

/* Inner 3D depth layer on cards */
.bento-main__content,
.build-card__name,
.exp-card__header,
.stat-number,
.rec-card p {
  transform: translateZ(20px);
  transform-style: preserve-3d;
}

/* Shine/glare overlay for tilt */
.tilt-card::after,
.build-card::after,
.stat-card::after,
.rec-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 5;
}

.tilt-card:hover::after,
.build-card:hover::after,
.stat-card:hover::after,
.rec-card:hover::after {
  opacity: 1;
}

/* ── GLOW BORDER ON HOVER (3D feel) ── */
.bento-card:hover,
.build-card:hover,
.stat-card:hover,
.exp-card:hover {
  box-shadow:
    var(--shadow-md),
    0 0 30px rgba(63, 185, 80, 0.06),
    inset 0 0 30px rgba(63, 185, 80, 0.02);
}

/* ── PARALLAX SECTIONS ── */
.section {
  transform-style: preserve-3d;
}

.section-title {
  transition: transform 300ms ease;
}

/* ── HIDE SHAPES ON MOBILE ── */
@media (max-width: 768px) {
  .floating-shapes { display: none; }
  .cursor { display: none; }
  body { cursor: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-shapes { display: none; }
  .cursor { display: none; }
  body { cursor: auto !important; }
  .shape, .cube, .octahedron, .ring-3d, .pyramid {
    animation: none !important;
  }
}
