@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ===== DARK THEME (default) ===== */
:root {
  --bg:        #0e0e10;
  --bg-1:      #141417;
  --bg-2:      #1c1c20;
  --bg-3:      #222228;
  --amber:     #f59e0b;
  --amber-10:  rgba(245,158,11,.10);
  --amber-20:  rgba(245,158,11,.25);
  --cyan:      #22d3ee;
  --cyan-10:   rgba(34,211,238,.10);
  --cyan-20:   rgba(34,211,238,.22);
  --text:      #f4f3f0;
  --muted:     #b5b0aa;
  --subtle:    #6e6a65;
  --border:    rgba(255,255,255,.09);
  --border-a:  rgba(245,158,11,.30);
  --shadow:    rgba(0,0,0,.55);
  --nav-blur:  rgba(14,14,16,.93);
  --ease:      cubic-bezier(.22,1,.36,1);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg:        #fafaf9;
  --bg-1:      #f2f1ef;
  --bg-2:      #ffffff;
  --bg-3:      #f7f6f4;
  --amber:     #d97706;
  --amber-10:  rgba(217,119,6,.08);
  --amber-20:  rgba(217,119,6,.18);
  --cyan:      #0891b2;
  --cyan-10:   rgba(8,145,178,.08);
  --cyan-20:   rgba(8,145,178,.18);
  --text:      #0c0c0e;
  --muted:     #4a4540;
  --subtle:    #9e9890;
  --border:    rgba(0,0,0,.09);
  --border-a:  rgba(217,119,6,.25);
  --shadow:    rgba(0,0,0,.12);
  --nav-blur:  rgba(250,250,249,.93);
}

/* ===== BODY ===== */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}
a { text-decoration: none; color: inherit; }

/* ===== GRAIN TEXTURE ===== */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: .028;
}
[data-theme="light"] body::after { opacity: .012; }

/* ===== CURSOR GLOW ===== */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,123,0,.08) 0%, transparent 65%);
  pointer-events: none; z-index: 2;
  transform: translate(-50%,-50%);
  will-change: transform; opacity: 1;
  transition: opacity .5s ease;
}
[data-theme="light"] .cursor-glow { opacity: 0; }
@media (pointer: coarse) { .cursor-glow { display: none; } }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--amber), var(--cyan));
  transform-origin: left; transform: scaleX(0);
  z-index: 200; transition: transform 80ms linear;
}

/* ===== CONTAINER ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 2.5rem; }

/* ===== NAVBAR ===== */
.nav-bar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 1.4rem 2.5rem;
  /* always-on top shadow so links stay readable over hero aurora */
  background: linear-gradient(to bottom, rgba(14,14,16,.55) 0%, transparent 100%);
  transition: padding .3s ease, background .3s ease, box-shadow .3s ease;
}
.nav-bar.scrolled {
  padding: 1rem 2.5rem;
  background: var(--nav-blur);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="light"] .nav-bar {
  background: linear-gradient(to bottom, rgba(250,250,249,.65) 0%, transparent 100%);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav-logo {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 1.35rem; letter-spacing: -.03em; color: var(--text);
  flex-shrink: 0;
}
.nav-logo span { color: var(--amber); }
.nav-menu { display: flex; gap: 2.25rem; list-style: none; }
.nav-link {
  font-size: .84rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  position: relative; padding-bottom: 3px;
  transition: color .2s ease;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--amber);
  transition: width .3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

/* theme toggle */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 50%; color: var(--amber); font-size: .82rem;
  transition: background .2s, border-color .2s, transform .4s var(--ease);
}
.theme-toggle:hover { background: var(--amber-10); border-color: var(--border-a); transform: rotate(22deg); }

.nav-right { display: flex; align-items: center; gap: .75rem; }
.nav-toggle {
  display: none; background: none;
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: .9rem;
  padding: .38rem .6rem; z-index: 101;
  transition: border-color .2s, background .2s;
}
.nav-toggle:hover { border-color: var(--border-a); background: var(--amber-10); }
.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(14,14,16,.6); backdrop-filter: blur(4px);
  z-index: 98; opacity: 0; transition: opacity .3s ease;
  pointer-events: none;
}
.nav-overlay.visible { opacity: 1; pointer-events: all; }


/* ===== HERO ===== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 400px;
  min-height: 100vh;
  align-items: stretch;
  background: var(--bg);
  overflow: hidden;
}

/* aurora — breathing gradient orbs */
.hero-aurora {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 5%  55%, rgba(224,123,0,.16), transparent 55%),
    radial-gradient(ellipse 55% 65% at 88% 18%, rgba(34,211,238,.11), transparent 50%),
    radial-gradient(ellipse 45% 50% at 42% 88%, rgba(167,139,250,.08), transparent 48%),
    radial-gradient(ellipse 30% 38% at 72% 75%, rgba(34,211,238,.07), transparent 45%);
  animation: auroraFloat 18s ease-in-out infinite alternate;
}
[data-theme="light"] .hero-aurora {
  background:
    radial-gradient(ellipse 70% 80% at 5% 60%, rgba(217,119,6,.15), transparent 58%),
    radial-gradient(ellipse 55% 65% at 90% 18%, rgba(8,145,178,.11), transparent 52%),
    radial-gradient(ellipse 40% 50% at 50% 90%, rgba(167,139,250,.07), transparent 50%),
    radial-gradient(ellipse 28% 36% at 72% 72%, rgba(8,145,178,.06), transparent 45%);
}
@keyframes auroraFloat {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(2%,1.5%) scale(1.04); }
}

.hero-text {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  padding: 130px 3rem 3.5rem 2.5rem;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 1.875rem;
  opacity: 0; animation: fadeUp .6s var(--ease) .15s forwards;
}
.hero-eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--amber); opacity: .55; flex-shrink: 0;
}

.hero-name {
  font-family: 'Syne', sans-serif; font-weight: 800;
  letter-spacing: -.04em; line-height: .94;
  color: var(--text); margin-bottom: 1.75rem;
}
.hero-name-line {
  display: block;
  font-size: clamp(4.5rem, 10vw, 9rem);
  opacity: 0;
}
.hero-name-line:nth-child(1) { animation: fadeUp .78s var(--ease) .3s forwards; }
.hero-name-line:nth-child(2) { animation: fadeUp .78s var(--ease) .46s forwards; }

.hero-desc {
  font-size: 1.05rem; line-height: 1.75; color: var(--muted);
  max-width: 460px; margin-bottom: 2.5rem;
  opacity: 0; animation: fadeUp .6s var(--ease) .64s forwards;
}
.hero-desc strong { color: var(--text); font-weight: 500; }

/* tech tag strip — fills vertical gap and shows key skills at a glance */
.hero-tags {
  display: flex; flex-wrap: wrap; gap: .45rem;
  margin-bottom: 2rem;
  opacity: 0; animation: fadeUp .5s var(--ease) .74s forwards;
}
.hero-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem; letter-spacing: .05em; text-transform: uppercase;
  padding: .25rem .72rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--subtle);
  background: rgba(255,255,255,.03);
  transition: color .2s, border-color .2s;
}
.hero-tags span:hover { color: var(--amber); border-color: var(--border-a); }

.hero-actions {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  opacity: 0; animation: fadeUp .6s var(--ease) .88s forwards;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.75rem;
  background: var(--amber); border: none; border-radius: 6px;
  font-family: 'Inter', sans-serif; font-size: .875rem; font-weight: 600;
  color: #fff; letter-spacing: .01em;
  transition: opacity .2s, transform .3s var(--ease), box-shadow .25s;
}
.btn-primary:hover, .btn-primary:focus-visible {
  opacity: .88; transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(224,123,0,.32); outline: none;
}

.hero-social { display: flex; gap: .6rem; }
.hero-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 1rem; color: var(--muted);
  transition: color .2s, border-color .2s, background .2s, transform .3s var(--ease);
}
.hero-social a:hover, .hero-social a:focus-visible {
  color: var(--amber); border-color: var(--border-a);
  background: var(--amber-10); transform: translateY(-2px); outline: none;
}

/* meta bar — fills whitespace at bottom */
.hero-meta {
  margin-top: auto; padding-top: 2.75rem;
  display: flex; gap: 2.75rem;
  border-top: 1px solid var(--border);
  opacity: 0; animation: fadeIn .7s ease 1.1s forwards;
}
.hero-meta-item {}
.hero-meta-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--subtle); margin-bottom: .3rem;
}
.hero-meta-value {
  font-size: .82rem; font-weight: 500; color: var(--muted);
  display: flex; align-items: center;
}

/* pulsing green "live" dot on Open-to-work status */
.pulse-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e; margin-right: .5rem; flex-shrink: 0;
  animation: pulseDot 2.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  60%       { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* geo-coordinate signature at the very bottom of hero text column */
.hero-coord {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--subtle); margin-top: 1.1rem;
  opacity: 0; animation: fadeIn .6s ease 1.4s forwards;
}

/* photo column */
.hero-photo {
  position: relative; overflow: hidden;
  opacity: 0; animation: fadeIn .9s ease .5s forwards;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
}
/* left merge + top vignette — covers office background */
.hero-photo::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(105deg,
      var(--bg)              0%,
      rgba(14,14,16,.82)    20%,
      rgba(14,14,16,.50)    38%,
      rgba(14,14,16,.18)    55%,
      transparent            72%),
    linear-gradient(to bottom,
      rgba(14,14,16,.55)    0%,
      transparent            28%);
  transition: background .4s ease;
}
[data-theme="light"] .hero-photo::before {
  background:
    linear-gradient(105deg,
      var(--bg)                0%,
      rgba(250,250,249,.98)   22%,
      rgba(250,250,249,.84)   38%,
      rgba(250,250,249,.44)   56%,
      rgba(250,250,249,.10)   68%,
      transparent              78%),
    linear-gradient(to bottom, rgba(250,250,249,.70) 0%, transparent 35%),
    linear-gradient(to right,  rgba(250,250,249,.35) 30%, transparent 68%);
}
/* bottom fade */
.hero-photo::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; z-index: 1;
  height: 240px;
  background: linear-gradient(to top, var(--bg) 0%, rgba(14,14,16,.5) 45%, transparent 100%);
  transition: background .4s ease;
}
[data-theme="light"] .hero-photo::after {
  background: linear-gradient(to top, var(--bg) 0%, rgba(250,250,249,.5) 45%, transparent 100%);
}

/* thin amber accent frame on inner edge of photo */
.hero-photo-accent {
  position: absolute; top: 2.5rem; left: 0; z-index: 2;
  width: 2px; height: 140px;
  background: linear-gradient(to bottom, var(--amber), transparent);
  opacity: .45;
}

.hero-scroll {
  position: absolute; bottom: 2rem; left: 2.5rem; z-index: 2;
  display: flex; align-items: center; gap: .55rem;
  font-family: 'JetBrains Mono', monospace; font-size: .62rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--subtle);
  opacity: 0; animation: fadeIn .6s ease 1.4s forwards;
}
.hero-scroll i { animation: bounce 2.2s ease 2s infinite; font-size: .95rem; }

/* ===== KEYFRAMES ===== */
@keyframes fadeUp  { from { opacity:0; transform:translateY(22px) } to { opacity:1; transform:none } }
@keyframes fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes bounce  { 0%,100%{transform:translateY(0)} 50%{transform:translateY(7px)} }
@keyframes shimmer { from{background-position:-200% center} to{background-position:200% center} }
@keyframes lineIn  { from{transform:scaleX(0)} to{transform:scaleX(1)} }


/* ===== SECTIONS SHARED ===== */
section { padding: 7rem 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .67rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: .7rem;
}
.eyebrow::before {
  content: ''; width: 22px; height: 1px; background: var(--amber); opacity: .55; flex-shrink: 0;
}

.section-title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--text); letter-spacing: -.03em;
  line-height: 1.08; margin-bottom: 3.5rem;
}

.skills-intro {
  font-size: .9rem; color: var(--muted); line-height: 1.7;
  max-width: 580px; margin-top: -2.75rem; margin-bottom: 2.5rem;
}


/* ===== ABOUT ===== */
.about { background: var(--bg-1); }

.about-grid {
  display: grid; grid-template-columns: 360px 1fr;
  gap: 5rem; align-items: start;
}

.about-photo { position: relative; }
.about-photo-frame {
  position: relative; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--border);
  transition: border-color .3s;
}
.about-photo-frame:hover { border-color: var(--border-a); }
.about-photo-frame img {
  width: 100%; height: 520px;
  object-fit: cover; object-position: top center;
  transition: transform .55s var(--ease);
}
.about-photo-frame:hover img { transform: scale(1.03); }

.about-badge {
  position: absolute; bottom: 1.25rem; left: 1.25rem;
  background: rgba(14,14,16,.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 8px;
  padding: .6rem 1rem; z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem; color: var(--amber); letter-spacing: .06em;
  transition: background .4s;
}
[data-theme="light"] .about-badge { background: rgba(245,242,237,.88); }

.about-headline {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1.45rem; color: var(--text);
  margin-bottom: 1.5rem; line-height: 1.3;
}
.about-headline span { color: var(--amber); }

.about-content p {
  font-size: .95rem; color: var(--muted);
  line-height: 1.85; margin-bottom: 1rem;
}

.about-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1.5rem; margin: 2.25rem 0;
  padding: 1.75rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stat-number {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 2.4rem; color: var(--amber);
  letter-spacing: -.04em; line-height: 1; margin-bottom: .3rem;
}
.stat-label { font-size: .78rem; color: var(--muted); line-height: 1.4; }

.btn-outline {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.5rem;
  border: 1px solid var(--border-a); border-radius: 6px;
  font-size: .875rem; font-weight: 500; color: var(--amber);
  transition: background .2s, border-color .2s, transform .3s var(--ease);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--amber-10); border-color: var(--amber);
  transform: translateY(-2px); outline: none;
}


/* ===== SKILLS ===== */
.skills {
  background: var(--bg);
  position: relative;
}
/* ambient glows give the frosted glass something to blur against */
.skills::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 55% 65% at 12% 42%, rgba(245,158,11,.12), transparent 52%),
    radial-gradient(ellipse 50% 60% at 88% 58%, rgba(34,211,238,.10), transparent 50%),
    radial-gradient(ellipse 35% 45% at 50% 90%, rgba(167,139,250,.09), transparent 48%);
}
[data-theme="light"] .skills::before {
  background:
    radial-gradient(ellipse 60% 70% at 10% 40%, rgba(217,119,6,.12), transparent 54%),
    radial-gradient(ellipse 55% 65% at 90% 60%, rgba(8,145,178,.10), transparent 52%),
    radial-gradient(ellipse 40% 50% at 50% 92%, rgba(167,139,250,.08), transparent 50%),
    radial-gradient(ellipse 35% 42% at 72% 20%, rgba(52,211,153,.07), transparent 48%);
}
.skills .container { position: relative; z-index: 1; }

/* D3 force-directed graph container */
.skills-graph-wrap {
  display: none;
  width: 100%; height: 520px;
  position: relative;
  background: rgba(28,28,32,.52);
  backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px; overflow: hidden;
  cursor: grab;
}
.skills-graph-wrap:active { cursor: grabbing; }
[data-theme="light"] .skills-graph-wrap {
  background: rgba(253,251,248,.78);
  border-color: rgba(0,0,0,.09);
  box-shadow: 0 2px 32px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.90);
}

/* 6-col: first 3 cards span 2, last 2 cards span 3 */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  border-radius: 14px;
}

.skill-card {
  grid-column: span 2;
  background: rgba(28,28,32,.58);
  backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  padding: 1.75rem; position: relative; overflow: hidden;
  transition: background .25s ease, border-color .25s, transform .3s var(--ease), box-shadow .25s;
}
[data-theme="light"] .skill-card { background: rgba(255,255,255,.65); border-color: rgba(0,0,0,.08); }
.skill-card:nth-child(4) { grid-column: span 3; }
.skill-card:nth-child(5) { grid-column: span 3; }
.skill-card:hover {
  background: rgba(34,34,40,.72); border-color: var(--border-a);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--shadow), 0 0 0 1px var(--border-a);
}
[data-theme="light"] .skill-card:hover { background: rgba(255,255,255,.88); }

/* sweep on hover */
.skill-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--cyan));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.skill-card:hover::after { transform: scaleX(1); }

.skill-card-header {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1rem;
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text);
}
.skill-card-header i { font-size: .9rem; color: var(--amber); flex-shrink: 0; }

.skill-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.skill-tags span {
  font-family: 'JetBrains Mono', monospace; font-size: .67rem;
  padding: .22rem .55rem;
  background: var(--amber-10); border: 1px solid rgba(224,123,0,.14);
  border-radius: 4px; color: var(--muted);
  transition: background .15s, border-color .15s, color .15s;
}
.skill-card:hover .skill-tags span {
  background: var(--amber-10); border-color: rgba(224,123,0,.3);
  color: var(--text);
}


/* ===== PROJECTS ===== */
.projects {
  background: var(--bg-1);
  position: relative; overflow: hidden;
}
/* ambient colour blobs that the frosted-glass cards blur against */
.projects::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 45% 55% at 8%  30%, rgba(245,158,11,.11), transparent 52%),
    radial-gradient(ellipse 40% 50% at 92% 65%, rgba(34,211,238,.10), transparent 50%),
    radial-gradient(ellipse 30% 40% at 50% 10%, rgba(167,139,250,.08), transparent 48%),
    radial-gradient(ellipse 38% 48% at 30% 85%, rgba(52,211,153,.07), transparent 52%);
}

/* particle canvas sits above the ambient glow, below the cards */
.particles-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1; opacity: 1;
  pointer-events: none;
  display: block;
}

.projects .container { position: relative; z-index: 2; }

.projects-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem;
}

.project-card {
  display: flex; flex-direction: column;
  background: rgba(28,28,32,.58);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,.10); border-radius: 14px;
  padding: 2rem; position: relative; overflow: hidden;
  cursor: pointer;
  transition:
    border-color .28s ease, background .28s ease,
    transform .38s var(--ease), box-shadow .32s ease;
  transform-style: preserve-3d;
}
[data-theme="light"] .project-card {
  background: rgba(255,255,255,.65);
  border-color: rgba(0,0,0,.09);
}
.project-card:hover {
  border-color: var(--border-a);
  background: rgba(34,34,40,.72);
  transform: translateY(-7px);
  box-shadow: 0 22px 60px var(--shadow), 0 0 0 1px var(--border-a);
  outline: none;
}
[data-theme="light"] .project-card:hover { background: rgba(255,255,255,.88); }
.project-card:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* top gradient bar */
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--cyan));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.project-card:hover::before { transform: scaleX(1); }

.project-number {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 3.5rem; color: var(--border); line-height: 1;
  margin-bottom: .875rem; letter-spacing: -.06em;
  transition: color .3s ease;
  user-select: none;
}
.project-card:hover .project-number { color: var(--amber-20); }

.project-label {
  font-family: 'JetBrains Mono', monospace; font-size: .65rem;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--cyan); margin-bottom: .6rem;
}

.project-name {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1.35rem; color: var(--text); letter-spacing: -.02em;
  margin-bottom: .9rem; line-height: 1.2;
}

.project-desc {
  font-size: .875rem; color: var(--muted);
  line-height: 1.78; flex: 1; margin-bottom: 1.5rem;
}

.project-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.25rem; }
.project-tags span {
  font-family: 'JetBrains Mono', monospace; font-size: .64rem;
  padding: .18rem .5rem;
  background: var(--blue-10); border: 1px solid var(--blue-20);
  border-radius: 4px; color: var(--cyan);
}

.project-link {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: auto; font-size: .78rem; font-weight: 500; color: var(--amber);
  transition: gap .2s ease;
}
.project-card:hover .project-link { gap: .65rem; }
.project-link i { font-size: .82rem; }


/* ===== CONTACT ===== */
.contact { background: var(--bg); }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1.55fr;
  gap: 5rem; align-items: start;
}

.contact-lead {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1.4rem; color: var(--text); line-height: 1.4;
  margin-bottom: 1.75rem; letter-spacing: -.02em;
}

.contact-info > p { font-size: .9rem; color: var(--muted); line-height: 1.8; margin-bottom: 2rem; }

.contact-details { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-row { display: flex; align-items: flex-start; gap: .9rem; }
.contact-row i { font-size: .9rem; color: var(--amber); margin-top: .15rem; flex-shrink: 0; width: 16px; }
.contact-row-label {
  font-family: 'JetBrains Mono', monospace; font-size: .62rem;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--subtle); margin-bottom: .15rem;
}
.contact-row-value { font-size: .875rem; color: var(--text); }

.contact-form { display: flex; flex-direction: column; gap: .9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-field { display: flex; flex-direction: column; gap: .35rem; }
.form-field label {
  font-family: 'JetBrains Mono', monospace; font-size: .62rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.form-field input,
.form-field textarea {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 6px; padding: .78rem 1rem;
  color: var(--text); font-family: 'Inter', sans-serif; font-size: .9rem;
  outline: none; resize: vertical;
  transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--subtle); }
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--amber); background: var(--bg-3);
  box-shadow: 0 0 0 3px var(--amber-10);
}


/* ===== FOOTER ===== */
footer {
  background: var(--bg-1); border-top: 1px solid var(--border); padding: 1.75rem 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: var(--muted);
}
.footer-inner strong { color: var(--text); font-weight: 500; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: var(--subtle); font-size: .9rem; transition: color .2s; }
.footer-social a:hover { color: var(--amber); }


/* ===== SCROLL UP ===== */
.scroll-up {
  position: fixed; right: 1.5rem; bottom: -5rem;
  width: 40px; height: 40px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  color: var(--amber); font-size: 1rem; z-index: 50;
  transition: bottom .35s var(--ease), background .2s, border-color .2s, transform .3s var(--ease);
}
.scroll-up.visible { bottom: 1.5rem; }
.scroll-up:hover, .scroll-up:focus-visible {
  background: var(--amber-10); border-color: var(--border-a);
  transform: translateY(-2px); outline: none;
}


/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--subtle); border-radius: 3px; opacity: .5; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }


/* ===== ACCESSIBILITY ===== */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-eyebrow, .hero-name-line, .hero-desc,
  .hero-actions, .hero-meta, .hero-photo, .hero-scroll { opacity: 1 !important; animation: none !important; }
}
