:root {
  --bg-primary: rgb(0, 0, 0);
  --bg-secondary: rgb(0, 0, 0);
  --bg-card: rgba(16, 20, 26, 0.42);
  --bg-card-hover: rgba(18, 22, 29, 0.56);
  --bg-glass: rgba(255, 255, 255, 0.035);
  --border-glass: rgba(201, 160, 99, 0.16);
  --border-soft: rgba(255, 255, 255, 0.075);
  --accent-primary: #C9A063;
  --accent-secondary: #E1BE7A;
  --accent-glow: rgba(201, 160, 99, 0.12);
  --text-primary: #E8EBEF;
  --text-secondary: #BFC5CF;
  --text-muted: #7B8490;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); background: var(--bg-primary); color: var(--text-primary); line-height: 1.7; overflow-x: hidden; min-height: 100vh; }
body::before { display: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

#particle-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 1; }
.page-wrapper { position: relative; z-index: 1; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
section { padding: 108px 0; position: relative; }
.section-compact { padding-top: 84px; }
.section-kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); color: var(--accent-secondary); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.73rem; margin-bottom: 18px; }
.section-kicker::before { content: ''; display: block; width: 28px; height: 1px; background: var(--accent-primary); opacity: 0.85; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -0.045em; margin-bottom: 18px; max-width: none; }
.section-subtitle { color: var(--text-secondary); max-width: 720px; font-size: 1rem; text-align: center; }
.timeline-desc, .about-copy p, .outside-content p, .focus-rail p, .adjacent-list p, .skill-card p, .leadership-grid p, .detail-section p, .contact-info > p, .personal-intro, .muted-note { text-align: justify; }

.site-header { position: relative; z-index: 100; }
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(7, 10, 14, 0.58); backdrop-filter: blur(22px) saturate(1.1); -webkit-backdrop-filter: blur(22px) saturate(1.1); border-bottom: 1px solid rgba(255,255,255,0.045); }
.nav-inner { max-width: 1180px; height: 64px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 120px 1fr 120px; align-items: center; }
.scroll-progress { position: absolute; bottom: -1px; left: 0; height: 2px; width: 0%; background: linear-gradient(to right, var(--accent-primary) 0%, #94a3b8 100%); transition: width 0.08s ease-out; z-index: 101; }
.nav-logo { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; transition: transform var(--transition-smooth), filter var(--transition-smooth); }
.nav-logo.unlock-armed { filter: drop-shadow(0 0 10px rgba(201,160,99,0.5)); }
.logo-imperfeqt { transition: transform var(--transition-smooth); }
.nav-logo.unlock-step-1 .logo-imperfeqt { transform: rotate(90deg); }
.nav-logo.unlock-step-2 .logo-imperfeqt { transform: rotate(180deg); }
.nav-links { list-style: none; display: flex; align-items: center; justify-content: center; gap: 30px; }
.nav-links a, .nav-projects-toggle { border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.01em; padding: 8px 0; position: relative; }
.nav-links a:hover, .nav-links a.active, .nav-projects:hover .nav-projects-toggle, .nav-projects-toggle.active { color: var(--text-primary); }
.nav-links a::after, .nav-projects-toggle::after { content: ''; position: absolute; left: 0; right: 0; bottom: 1px; height: 2px; transform: scaleX(0); transform-origin: center; background: var(--accent-primary); transition: transform var(--transition-fast); }
.nav-links a:hover::after, .nav-links a.active::after, .nav-projects:hover .nav-projects-toggle::after, .nav-projects-toggle.active::after { transform: scaleX(1); }
.nav-cta { justify-self: end; padding: 9px 20px !important; background: var(--accent-primary); color: #111 !important; border-radius: var(--radius-sm); box-shadow: 0 10px 28px rgba(201,160,99,0.14); }
.nav-cta::after { display: none; }
.nav-projects { position: relative; }
.nav-projects-menu { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px); width: 310px; padding: 10px; border: 1px solid var(--border-glass); border-radius: var(--radius-md); background: rgba(6, 8, 12, 0.94); box-shadow: 0 18px 60px rgba(0,0,0,0.42); opacity: 0; pointer-events: none; transition: opacity var(--transition-fast), transform var(--transition-fast); backdrop-filter: blur(18px); }
.nav-projects:hover .nav-projects-menu, .nav-projects:focus-within .nav-projects-menu { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-projects-menu a { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-radius: 8px; color: var(--text-secondary); font-size: 0.82rem; gap: 8px; }
.nav-projects-menu a:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.nav-projects-menu a svg.arrow { opacity: 0; transform: translate(-4px, 4px); transition: opacity var(--transition-fast), transform var(--transition-fast); }
.nav-projects-menu a:hover svg.arrow { opacity: 1; transform: translate(2px, -2px); }
.nav-toggle { display: none; background: none; border: 0; padding: 4px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; border-radius: 2px; background: var(--text-secondary); }

.hero { min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero-container { max-width: 1280px; }
.hero-centered { max-width: 940px; margin: 0 auto; text-align: center; }
.hero-headshot-frame {
  width: clamp(170px, 18vw, 245px);
  margin: clamp(36px, 6vh, 68px) auto clamp(36px, 6vh, 64px);
  position: relative;
  cursor: pointer;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  perspective: 1000px;
}
/* ── Flip-card portrait ───────────────────────────────────── */
.portrait-box {
  border: 1px solid rgba(201, 160, 99, 0.72);
  border-radius: 18px;
  padding: 9px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035), 0 28px 80px rgba(0, 0, 0, 0.36);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease,
              border-color var(--transition-smooth),
              box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 5;
}

.portrait-box::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 1px rgba(240, 207, 142, 0.85), 0 0 34px rgba(201, 160, 99, 0.36);
  transition: opacity 0.28s ease, box-shadow 0.28s ease;
}

@media (hover: hover) {
  .hero-headshot-frame:hover .portrait-box::after {
    opacity: 0.5;
  }
}

/* Circuit Overlay Container */
.circuit-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 90vw);
  height: 180px;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
  transition: opacity 0.5s ease 0.3s;
}

#circuit-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.circuit-text {
  position: absolute;
  top: -22px;
  width: 100%;
  text-align: center;
  color: #E1BE7A; /* brand off-gold */
  font-family: 'STIX Two Math', 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0.03em;
  opacity: 0.95;
}

.hero-headshot-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  filter: grayscale(100%) contrast(1.08);
  transform: scale(1.12);
  display: block;
  pointer-events: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Flanks (Horizontal Wires) */
.portrait-flank {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 160, 99, 0.72));
  opacity: 0.7;
  transform: scaleY(1);
  transition: width 0.3s ease, right 0.3s ease, left 0.3s ease, opacity 0.3s ease;
  z-index: 10;
}

.portrait-flank-left {
  right: calc(100% + 22px);
  transform-origin: right;
}

.portrait-flank-right {
  left: calc(100% + 22px);
  transform-origin: left;
  background: linear-gradient(90deg, rgba(201, 160, 99, 0.72), transparent);
}

.hero-headshot-frame.holding .portrait-flank-left,
.hero-headshot-frame.holding .portrait-flank-right {
  transform: scaleX(1.55);
  opacity: 1;
}

.hero-headshot-frame.hold-complete .portrait-box {
  border-color: #f0cf8e;
  box-shadow: 0 0 0 1px rgba(240, 207, 142, 0.24), 0 0 40px rgba(201, 160, 99, 0.25), 0 30px 90px rgba(0, 0, 0, 0.48);
}

/* Teleporting state — photo hides, circuit appears */
.hero-headshot-frame.teleporting .portrait-box {
  transform: scale(0.85);
  opacity: 0;
}

.hero-headshot-frame.teleporting .circuit-container {
  opacity: 1;
}

/* 1. Retracting State: first retract (and shrink) without moving closer */
.hero-headshot-frame.retracting .portrait-flank {
  opacity: 1;
  width: 14px; /* shrink to tiny stub */
  transition: width 0.25s cubic-bezier(0.25, 1, 0.5, 1),
              right 0.25s cubic-bezier(0.25, 1, 0.5, 1),
              left 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-headshot-frame.retracting .portrait-flank-left {
  right: calc(100% + 40px); /* pull outwards slightly */
}

.hero-headshot-frame.retracting .portrait-flank-right {
  left: calc(100% + 40px); /* pull outwards slightly */
}

/* 2. Teleporting State: expand and move closer to collide violently */
.hero-headshot-frame.teleporting .portrait-flank {
  opacity: 1;
  height: 1.5px;
  width: min(315px, 40vw); /* expand */
  transition: width 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335),
              right 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335),
              left 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335);
}

.hero-headshot-frame.teleporting .portrait-flank-left {
  right: 38%;
  background: #D7AC5F;
  box-shadow: 0 0 10px rgba(215, 172, 95, 0.92), 0 0 20px rgba(215, 172, 95, 0.5);
}

.hero-headshot-frame.teleporting .portrait-flank-right {
  left: 38%;
  background: #D7AC5F;
  box-shadow: 0 0 10px rgba(215, 172, 95, 0.92), 0 0 20px rgba(215, 172, 95, 0.5);
}

/* Clean fade out of flanks once canvas sweep starts */
.hero-headshot-frame.canvas-active .portrait-flank {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.6s ease-in-out !important;
}

/* Screen shake keyframes for high-energy kinetic impact */
@keyframes screen-shake {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-3px, 2px); }
  20% { transform: translate(3px, -2px); }
  30% { transform: translate(-2px, -3px); }
  40% { transform: translate(2px, 3px); }
  50% { transform: translate(-3px, 1px); }
  60% { transform: translate(3px, -1px); }
  70% { transform: translate(-1px, 2px); }
  80% { transform: translate(2px, -2px); }
  90% { transform: translate(-2px, 1px); }
  100% { transform: translate(0, 0); }
}

.hero-headshot-frame.shake-active {
  animation: screen-shake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

.hero-name { font-size: clamp(2.8rem, 7.0vw, 4.8rem); line-height: 1.1; letter-spacing: -0.05em; font-weight: 900; margin-bottom: clamp(54px, 8vh, 72px); }
.gradient-text { display: inline-block; font-size: clamp(2.6rem, 6.8vw, 4.3rem); font-weight: 800; background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, #E8EBEF 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.2; }
.hero-tagline { color: var(--text-primary); font-size: clamp(1.15rem, 2.1vw, 1.55rem); margin-bottom: 28px; line-height: 1.42; }
.hero-desc { max-width: 900px; margin: 0 auto 52px; color: var(--text-secondary); font-size: clamp(0.95rem, 1.4vw, 1.1rem); line-height: 1.72; text-wrap: balance; }
.hero-actions { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 48px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 28px; border-radius: var(--radius-sm); font-weight: 700; border: 1px solid transparent; transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-primary); color: #111; box-shadow: 0 14px 42px rgba(201,160,99,0.14); }
.btn-ghost { background: rgba(255,255,255,0.018); color: var(--text-secondary); border-color: var(--border-soft); }
.btn-ghost:hover { border-color: rgba(201,160,99,0.36); color: var(--text-primary); }
.focus-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: 720px; margin: 0 auto; padding-top: 28px; }
.stat-value { color: var(--text-primary); font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.03em; }
.stat-label { color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; line-height: 1.5; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 56px; align-items: start; margin-top: 42px; }
.about-text p { color: var(--text-secondary); font-size: 1.03rem; line-height: 1.82; margin-bottom: 22px; }
.about-card, .skill-card, .project-card, .research-card, .leadership-grid article { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); backdrop-filter: blur(10px); }
.about-card { padding: 34px; }
.about-card h3 { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-secondary); margin-bottom: 20px; }
.education-item { padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.education-item:last-child { border-bottom: 0; }
.edu-degree { font-weight: 700; color: var(--text-primary); }
.edu-institution { color: var(--accent-secondary); font-size: 0.9rem; margin-top: 2px; }
.edu-details { color: var(--text-muted); font-size: 0.85rem; margin-top: 5px; }

.timeline { margin-top: 48px; position: relative; max-width: 900px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, var(--accent-primary), var(--border-soft)); }
.timeline-item { position: relative; padding-left: 34px; padding-bottom: 46px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -5px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-primary); border: 2px solid var(--accent-primary); }
.timeline-period { color: var(--accent-secondary); font-family: var(--font-mono); font-size: 0.78rem; margin-bottom: 4px; }
.timeline-role { font-size: 1.18rem; font-weight: 800; }
.timeline-company { color: var(--text-muted); margin-bottom: 10px; }
.timeline-desc { color: var(--text-secondary); max-width: 760px; }
.timeline-tags, .project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag { padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(201,160,99,0.18); background: rgba(201,160,99,0.045); color: var(--accent-secondary); font-family: var(--font-mono); font-size: 0.68rem; }

.projects-grid { margin-top: 46px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.project-card { display: block; min-height: 265px; padding: 34px; position: relative; overflow: hidden; transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast); }
.project-card:hover { transform: translateY(-3px); border-color: rgba(201,160,99,0.34); background: var(--bg-card-hover); }
.project-tier { display: inline-flex; margin-bottom: 34px; font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-secondary); border: 1px solid rgba(201,160,99,0.18); border-radius: 999px; padding: 4px 10px; background: rgba(201,160,99,0.045); }
.project-card h3 { font-size: 1.25rem; line-height: 1.25; margin-bottom: 16px; }
.project-card p { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.72; }
.tier-a, .tier-b, .tier-c, .tier-cyber { color: var(--accent-secondary); }

.split-section { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 90px; align-items: center; }
.focus-heading h2 { font-size: clamp(3rem, 7vw, 5.2rem); line-height: 1; letter-spacing: -0.07em; }
.focus-list h3 { color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.73rem; margin: 0 0 22px; }
.focus-list h3:not(:first-child) { margin-top: 44px; }
.focus-list p { font-size: clamp(1.2rem, 2.3vw, 1.6rem); color: var(--text-primary); margin: 16px 0; }

.tech-tabs { display: inline-flex; gap: 6px; padding: 5px; margin: 32px 0 40px; border: 1px solid var(--border-soft); background: rgba(255,255,255,0.025); border-radius: var(--radius-md); }
.tech-tab { border: 0; background: transparent; color: var(--text-muted); padding: 10px 16px; border-radius: 9px; cursor: pointer; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.tech-tab.active { background: var(--accent-primary); color: #111; }
.tech-panel { display: none; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tech-panel.active { display: grid; }
.skill-card { padding: 28px; min-height: 170px; border: 1px solid rgba(215, 172, 95, 0.24) !important; transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast) !important; }
.skill-card:hover { border-color: rgba(215, 172, 95, 0.46) !important; box-shadow: 0 0 30px rgba(215, 172, 95, 0.08) !important; transform: translateY(-2px); }
.skill-card h3 { margin-bottom: 12px; font-size: 1.02rem; }
.skill-card p { color: var(--text-secondary); font-size: 0.9rem; }

.leadership-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 42px; }
.leadership-grid article { padding: 28px; border: 1px solid rgba(215, 172, 95, 0.24) !important; transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast) !important; }
.leadership-grid article:hover { border-color: rgba(215, 172, 95, 0.46) !important; box-shadow: 0 0 30px rgba(215, 172, 95, 0.08) !important; transform: translateY(-2px); }
.leadership-grid span { color: var(--accent-secondary); font-family: var(--font-mono); font-size: 0.75rem; }
.leadership-grid h3 { margin: 12px 0 8px; }
.leadership-grid p { color: var(--text-secondary); }
.outside-grid, .contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: center; }
.personal-teaser p, .contact-grid p { color: var(--text-secondary); max-width: 620px; font-size: 1rem; }
.contact-form { display: grid; gap: 14px; min-width: min(420px, 100%); }
.contact-form input, .contact-form textarea { width: 100%; background: rgba(255,255,255,0.026); border: 1px solid var(--border-soft); color: var(--text-primary); border-radius: var(--radius-sm); padding: 13px 14px; resize: vertical; }
.contact-form small { color: var(--text-muted); font-size: 0.75rem; }
.footer { padding: 24px 0; border-top: 1px solid var(--border-soft); }
.footer-panel { text-align: center; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.9; }

@media (max-width: 920px) {
  .nav-inner.nav-v2 {
    grid-template-columns: 1fr auto auto !important;
  }
}

.ambient-controls {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 185px;
  padding: 10px 18px;
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  background: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.ambient-toggle-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  user-select: none;
}
.ambient-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50% !important;
  width: 38px !important;
  height: 38px !important;
  position: relative;
  cursor: pointer;
  padding: 0;
  outline: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.ambient-toggle-btn:hover {
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.ambient-toggle-btn svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 17px;
  height: 17px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.ambient-toggle-btn[aria-pressed="false"] .icon-moon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}
.ambient-toggle-btn[aria-pressed="false"] .icon-sun {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6) rotate(-45deg);
  pointer-events: none;
}
.ambient-toggle-btn[aria-pressed="true"] .icon-moon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6) rotate(45deg);
  pointer-events: none;
}
.ambient-toggle-btn[aria-pressed="true"] .icon-sun {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}
.ambient-toggle-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}

@media (max-width: 640px) {
  .ambient-controls {
    right: 50%;
    transform: translateX(50%);
    bottom: 16px;
    width: 185px;
  }
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 920px) {
  .nav-inner { grid-template-columns: auto auto; }
  .nav-links { position: fixed; top: 64px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: 0; padding: 16px; background: rgba(5,7,11,0.96); border: 1px solid var(--border-soft); border-radius: var(--radius-md); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity var(--transition-fast), transform var(--transition-fast); max-height: calc(100vh - 80px); overflow-y: auto; }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-links a, .nav-projects-toggle { display: block; padding: 12px; width: 100%; text-align: left; }
  .nav-toggle { justify-self: end; display: flex; }
  .nav-projects-menu { position: static; transform: none; width: 100%; opacity: 1; pointer-events: auto; display: none; margin-top: 4px; box-shadow: none; }
  .nav-projects:hover .nav-projects-menu, .nav-projects:focus-within .nav-projects-menu { display: block; transform: none; }
  .about-grid, .split-section, .outside-grid, .contact-grid, .leadership-grid { grid-template-columns: 1fr; gap: 32px; }
  .projects-grid, .tech-panel { grid-template-columns: 1fr; }
  .hero { padding-top: 96px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  section { padding: 78px 0; }
  .hero-headshot-frame { margin-top: 32px; margin-bottom: 34px; width: 168px; }
  .portrait-flank { width: 28px; }
  .hero-actions, .focus-strip { grid-template-columns: 1fr; }
  .focus-strip { gap: 18px; }
  .hero-actions .btn { width: 100%; }
  .tech-tabs { display: grid; width: 100%; }
}


/* Remediation overrides for deploy/midnight-space. */
:root {
  --accent-rose: #F05D7A;
  --accent-cyan: #35D0E6;
  --accent-gold: #D7AC5F;
  --accent-green: #6EE7A8;
}

/* Restrict center alignment of the "About" section content to tablet/mobile */
@media (max-width: 1100px) {
  .about-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }
  .about-copy p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .about-pill-strip {
    justify-content: center !important;
    width: 100% !important;
  }
}

/* Desktop-specific navigation layout overrides */
@media (min-width: 921px) {
  .nav-inner.nav-v2 {
    grid-template-columns: auto 1fr auto auto !important;
    max-width: 1240px;
    column-gap: 24px !important;
    align-items: center;
  }
  .nav-links {
    justify-content: center !important;
    gap: 28px !important;
  }
  .nav-links li:last-child {
    margin-left: 0 !important;
  }
  .nav-action {
    justify-self: end;
    background: var(--accent-primary) !important;
    color: #0b0b0d !important;
    opacity: 1 !important;
    filter: none !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-weight: 700;
    font-size: 0.84rem !important;
    margin-left: 12px !important;
  }
  .nav-action:hover {
    background: var(--accent-secondary) !important;
    color: #050505 !important;
    box-shadow: 0 0 28px rgba(201, 160, 99, 0.24);
  }
  .nav-cta {
    background: var(--accent-primary) !important;
    color: #0b0b0d !important;
    opacity: 1 !important;
    filter: none !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-size: 0.84rem !important;
  }
}

/* Insignia rotate interactions */
.logo-imperfeqt {
  transform: rotate(var(--insignia-rotation, 0deg));
  transform-origin: 50% 50%;
  transition: transform .42s cubic-bezier(.2,.85,.2,1.15), filter .28s ease;
}
.nav-logo.unlock-step-1 .logo-imperfeqt {
  filter: drop-shadow(0 0 8px rgba(53, 208, 230, .38));
}
.nav-logo.unlock-step-2 .logo-imperfeqt {
  filter: drop-shadow(0 0 11px rgba(110, 231, 168, .42));
}
.nav-logo.unlock-armed .logo-imperfeqt {
  animation: insigniaPulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(215, 172, 95, .58));
}
.nav-logo.over-rotated .logo-imperfeqt {
  animation: insigniaReject .24s ease both;
}

@keyframes insigniaPulse {
  0%, 100% { transform: rotate(var(--insignia-rotation, 0deg)) scale(1); }
  50% { transform: rotate(var(--insignia-rotation, 0deg)) scale(1.08); }
}
@keyframes insigniaReject {
  0%, 100% { transform: rotate(var(--insignia-rotation, 0deg)) translateX(0); }
  35% { transform: rotate(var(--insignia-rotation, 0deg)) translateX(-3px); }
  70% { transform: rotate(var(--insignia-rotation, 0deg)) translateX(3px); }
}

/* Headshot authentication styles */
.hero-headshot-frame .portrait-box {
  position: relative;
  border-color: rgba(201, 160, 99, .72);
}
.hero-headshot-frame .portrait-box:after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 1px rgba(240, 207, 142, .85), 0 0 34px rgba(201, 160, 99, .36);
  transition: opacity .28s ease, box-shadow .28s ease;
}
.hero-headshot-frame.holding .portrait-box:after {
  opacity: 1;
}
.hero-headshot-frame.hold-complete .portrait-box:after {
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 160, .98), 0 0 58px rgba(215, 172, 95, .55), 0 0 110px rgba(215, 172, 95, .18);
}
.hero-headshot-frame.unlock-ready .portrait-box:after {
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 160, 1), 0 0 72px rgba(215, 172, 95, .68), 0 0 130px rgba(215, 172, 95, .22);
}
.hero-headshot-frame.holding .portrait-box {
  border-color: #f0cf8e;
  box-shadow: 0 0 0 1px rgba(240, 207, 142, .28), 0 0 44px rgba(201, 160, 99, .26), 0 32px 90px rgba(0, 0, 0, .52);
}
.hero-headshot-frame.hold-complete .portrait-box,
.hero-headshot-frame.unlock-ready .portrait-box {
  border-color: #ffe2a0;
  box-shadow: 0 0 0 1px rgba(255, 226, 160, .38), 0 0 60px rgba(215, 172, 95, .36), 0 34px 96px rgba(0, 0, 0, .54);
}

/* Timeline animations */
.timeline-dot.current,
.timeline-item:first-child .timeline-dot {
  background: var(--accent-primary);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 18px rgba(201, 160, 99, .5), 0 0 2px rgba(255, 255, 255, .5);
  animation: scintillateDot 2s infinite ease-in-out;
}

@keyframes scintillateDot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 18px rgba(201, 160, 99, .5), 0 0 2px rgba(255, 255, 255, .5); }
  50% { transform: scale(1.22); box-shadow: 0 0 28px rgba(201, 160, 99, .92), 0 0 6px rgba(255, 255, 255, .9); }
}

/* About editorial typography & default about styles */
.about-editorial {
  padding-top: 72px;
  padding-bottom: 88px;
}
.about-layout-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 72px;
  align-items: start;
}
.about-editorial .section-title {
  margin-bottom: 34px;
  max-width: none;
  text-wrap: balance;
}
.about-copy p {
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 24px;
}
.about-layout-v2 .about-card {
  margin-top: 96px; /* Align elegantly on desktop */
}
.about-pill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.about-pill-strip span {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid rgba(201, 160, 99, .18);
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(5, 7, 11, .24);
}

.section-title, .hero-name, .contact-head h2, .personal-heading {
  text-wrap: balance;
}

/* Projects & card features */
.project-card {
  position: relative;
}
.nda-badge {
  position: absolute;
  right: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff3b30;
  transition: transform var(--transition-fast), color var(--transition-fast);
  filter: drop-shadow(0 0 4px rgba(255, 59, 48, .22));
}
.project-card:hover .nda-badge {
  color: #ff453a;
  transform: scale(1.12);
  filter: drop-shadow(0 0 8px rgba(255, 59, 48, .55));
}
.flagship {
  border-color: rgba(215, 172, 95, .24) !important;
}
.project-card:hover {
  border-color: rgba(215, 172, 95, .46) !important;
  box-shadow: 0 0 36px rgba(215, 172, 95, .12);
}
.flagship-badge {
  position: absolute;
  right: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  transition: transform var(--transition-fast), color var(--transition-fast);
  filter: drop-shadow(0 0 4px rgba(215, 172, 95, .18));
}
.project-card:hover .flagship-badge {
  color: #ffe2a0;
  transform: scale(1.12);
  filter: drop-shadow(0 0 8px rgba(215, 172, 95, .45));
}
.project-card.flagship .project-tier {
  margin-right: 100px;
}

/* Theme accent tags */
.tag-cyan {
  color: var(--accent-cyan) !important;
  border-color: rgba(53, 208, 230, .3) !important;
  background: rgba(53, 208, 230, .055) !important;
}
.tag-green {
  color: var(--accent-green) !important;
  border-color: rgba(110, 231, 168, .3) !important;
  background: rgba(110, 231, 168, .055) !important;
}
.tag-gold {
  color: var(--accent-gold) !important;
  border-color: rgba(215, 172, 95, .3) !important;
  background: rgba(215, 172, 95, .055) !important;
}
.tag-rose {
  color: var(--accent-rose) !important;
  border-color: rgba(240, 93, 122, .32) !important;
  background: rgba(240, 93, 122, .055) !important;
}

/* Focus and editorial split layout sections */
.focus-restore {
  padding: 108px 0;
}
.focus-split-container {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 88px;
  align-items: start;
}
.focus-left-col {
  position: sticky;
  top: 108px;
}
.focus-restrained-title {
  font-size: 2.1rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.focus-intro {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.8;
  max-width: 400px;
}

/* Right-hand editorial grid */
.focus-editorial-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.focus-theme-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border-soft);
  transition: background var(--transition-smooth);
}
.focus-theme-item:last-child {
  border-bottom: 1px solid var(--border-soft);
}
.focus-theme-num {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-primary);
  font-weight: 500;
  padding-top: 3px;
}
.focus-theme-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}
.focus-theme-content p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.focus-theme-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Label Colors */
.text-green { color: #6EE7A8; }
.text-gold { color: #E1BE7A; }
.text-cyan { color: #35D0E6; }
.text-rose { color: #F05D7A; }

/* Stack / Tools Area */
.focus-stack-area {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}
.focus-stack-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.focus-stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.focus-stack-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 5px 12px;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.focus-stack-tags span:hover {
  border-color: rgba(201, 160, 99, 0.35);
  color: var(--accent-secondary);
  background: rgba(201, 160, 99, 0.04);
}

/* Tablet & Mobile Focus Layout Overrides */
@media (max-width: 920px) {
  .focus-split-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .focus-left-col {
    position: static;
  }
  .focus-left-col .section-title,
  .focus-left-col .focus-restrained-title {
    text-align: left;
  }
  .focus-intro {
    max-width: 100%;
  }
}

.adjacent-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}
.adjacent-list article {
  border: 1px solid rgba(215, 172, 95, .24) !important;
  border-radius: var(--radius-lg);
  background: rgba(16, 20, 26, .36);
  padding: 24px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.adjacent-list article:hover {
  border-color: rgba(215, 172, 95, .46) !important;
  box-shadow: 0 0 30px rgba(215, 172, 95, .08);
  transform: translateY(-2px);
}
.adjacent-list h3 {
  margin-bottom: 8px;
}
.adjacent-list p {
  color: var(--text-secondary);
  font-size: .94rem;
  text-align: left !important;
}

.outside-grid {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding-top: 48px;
  padding-bottom: 48px;
}

/* Contact structures */
.contact-classic {
  padding-top: 110px;
  padding-bottom: 130px;
}
.contact-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 58px;
}
.contact-head .section-kicker {
  justify-content: center;
}
.section-kicker.no-rule:before {
  display: none;
}
.contact-head h2 {
  font-size: clamp(2.45rem, 4vw, 3.65rem);
  line-height: 1.05;
  letter-spacing: -.06em;
  margin-bottom: 20px;
}
.contact-head p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 760px;
  margin: 0 auto;
}

.contact-classic-grid {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.08fr);
  gap: 56px;
  align-items: stretch;
}
.contact-info {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(201, 160, 99, .24);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: rgba(16, 20, 26, .58);
  box-shadow: 0 -1px 0 rgba(215, 172, 95, .35), 0 24px 80px rgba(0, 0, 0, .28);
}
.contact-info h3 {
  font-size: 1.55rem;
  margin-bottom: 20px;
}
.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.contact-tile {
  display: block;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 0 !important;
  background: rgba(16, 20, 26, .42);
}
.contact-tile:last-child {
  margin-bottom: 0;
}
.contact-tile span {
  display: block;
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.contact-tile strong {
  font-size: .95rem;
}

.contact-form {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(201, 160, 99, .24);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: rgba(16, 20, 26, .58);
  box-shadow: 0 -1px 0 rgba(215, 172, 95, .35), 0 24px 80px rgba(0, 0, 0, .28);
}
.contact-form .btn-primary {
  padding: 10px 28px !important;
}
.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
}

/* Dev panels and utilities */
.dev-theme-list {
  display: none;
  gap: 6px;
  flex-direction: column;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
}
.dev-theme-list.open {
  display: flex;
}
.dev-theme-list a {
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 7px 8px;
}
.dev-theme-list a:hover {
  color: var(--accent-secondary);
  border-color: rgba(201, 160, 99, .35);
}

.inline-editing-active [contenteditable="true"] {
  outline: 1px dashed rgba(215, 172, 95, .28);
  outline-offset: 3px;
  border-radius: 4px;
}
.inline-editing-active [contenteditable="true"]:focus {
  outline-color: rgba(215, 172, 95, .72);
  background: rgba(215, 172, 95, .05);
}
#export-edited-html,
#clear-local-edits {
  border: 1px solid rgba(215, 172, 95, .28);
  background: rgba(215, 172, 95, .08);
  color: var(--accent-secondary);
  border-radius: 8px;
  padding: 7px 8px;
}

/* Project detail navigation */
.project-detail-nav {
  align-items: center;
}
.project-detail-nav > div {
  flex: 1;
  display: flex;
}
.project-detail-nav > div:last-child {
  justify-content: flex-end;
}
.project-nav-link {
  display: flex;
  flex-direction: column;
  width: auto;
  max-width: none !important;
  border: none !important;
  background: none !important;
  padding: 4px 0 !important;
  box-shadow: none !important;
  color: var(--accent-primary) !important;
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.project-nav-link.next {
  text-align: right;
  align-items: flex-end;
}
.project-nav-link:hover {
  color: var(--accent-secondary) !important;
  transform: translateY(-1px);
}
.project-nav-link:hover .project-nav-title {
  color: var(--accent-secondary) !important;
}
.project-nav-dir {
  color: var(--accent-primary) !important;
  font-size: 0.75rem !important;
  font-weight: 600;
}
.project-nav-title {
  color: var(--text-primary) !important;
  transition: color var(--transition-fast);
}

.confidential-notice {
  border-color: rgba(255, 69, 58, 0.28) !important;
  color: #ff453a !important;
  background: rgba(255, 69, 58, 0.06) !important;
}

/* Personal features */
.personal-hero {
  min-height: 72vh;
}
.personal-heading {
  max-width: 880px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 24px;
}
.personal-intro {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 760px;
}
.muted-note {
  color: var(--text-muted) !important;
  font-size: 1rem !important;
}

/* Standardized responsive layout breakpoints */
@media (max-width: 1100px) {
  .focus-rail,
  .focus-rail-three {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-classic-grid {
    grid-template-columns: 1fr;
  }
  .about-layout-v2 {
    grid-template-columns: 1fr;
  }
  .about-copy .section-title {
    margin-bottom: 34px;
  }
  .about-layout-v2 .about-card {
    margin-top: 0;
  }
  .adjacent-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .nav-links {
    gap: 18px !important;
  }
  .nav-inner.nav-v2, .nav-v2 {
    grid-template-columns: 1fr auto auto !important;
    column-gap: 16px !important;
    align-items: center;
  }
  .nav-action {
    display: none;
  }
}

@media (max-width: 780px) {
  .adjacent-list,
  .focus-rail,
  .focus-rail-three {
    grid-template-columns: 1fr;
  }
  .contact-classic-grid {
    gap: 28px;
  }
  .contact-info,
  .contact-form,
  .roast-card-mini {
    padding: 22px;
  }
  .project-card.flagship .project-tier {
    margin-right: 36px;
  }
}

/* Center section headers and add separators between sections */
.container > .section-kicker,
.contact-head .section-kicker {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
.container > .section-kicker::before,
.contact-head .section-kicker::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent-primary);
  opacity: 0.85;
}
.container > .section-kicker::after,
.contact-head .section-kicker::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent-primary);
  opacity: 0.85;
}
.container > .section-title {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.container > .section-subtitle {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Subtle section separators with smooth fade-out */
section:not(:last-of-type)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 172, 95, 0.22), transparent);
  pointer-events: none;
}

/* Center tech tabs and add elegant separators */
.tech-tabs {
  display: flex !important;
  width: fit-content;
  margin: 32px auto 40px !important;
  gap: 8px !important;
  padding: 5px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.025);
  border-radius: var(--radius-md);
  justify-content: center;
  align-items: center;
}
.tech-tab {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 9px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.tech-tab:not(:last-child) {
  position: relative;
}
.tech-tab:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 25%;
  height: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

/* Responsive adjustment for tech tabs */
@media (max-width: 640px) {
  .tech-tabs {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: 1fr;
    gap: 8px !important;
    margin: 24px auto 30px !important;
  }
  .tech-tab {
    border: none !important;
  }
  .tech-tab:not(:last-child)::after {
    display: block !important;
    position: absolute;
    bottom: -4px;
    left: 20%;
    right: 20%;
    width: 60%;
    height: 1px;
    top: auto;
    background: linear-gradient(90deg, transparent, rgba(201,160,99,0.3), transparent);
  }
}

/* Keep personal page hero kicker left-aligned */
.personal-hero .section-kicker {
  justify-content: flex-start !important;
}
.personal-hero .section-kicker::after {
  display: none !important;
}

/* Remove partial section dividers around the personal teaser (#outside) */
#leadership::after,
#outside::after {
  display: none !important;
}

/* Contact Tile Refinements with SVG Logos */
.contact-tile {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast) !important;
}
.contact-tile:hover {
  border-color: rgba(215, 172, 95, 0.46) !important;
  box-shadow: 0 0 24px rgba(215, 172, 95, 0.08) !important;
  transform: translateY(-1px) !important;
}
.contact-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}
.contact-tile:hover .contact-tile-icon {
  color: var(--accent-secondary) !important;
}
.contact-tile-text {
  display: flex;
  flex-direction: column;
}
.contact-tile-text span {
  margin-bottom: 2px !important;
}

/* Align Focus Rail card headings perfectly when numbering spans are omitted */
.focus-rail h3 {
  margin-top: 0 !important;
}

/* Revamped Outside Teaser Section & Premium Card Layout */
.personal-teaser {
  padding: 80px 0 !important;
  background: transparent !important;
}

.outside-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: center;
  background: transparent !important;
  border-top: 1px solid rgba(215, 172, 95, 0.35) !important;
  border-bottom: 1px solid rgba(215, 172, 95, 0.35) !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  padding: 44px 0px !important;
  overflow: hidden;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: outside-line-glow 8s ease-in-out infinite;
}

@keyframes outside-line-glow {
  0%, 100% {
    border-top-color: rgba(215, 172, 95, 0.35) !important;
    border-bottom-color: rgba(215, 172, 95, 0.35) !important;
  }
  50% {
    border-top-color: rgba(215, 172, 95, 0.65) !important;
    border-bottom-color: rgba(215, 172, 95, 0.65) !important;
  }
}

.outside-card::before {
  display: none;
}

.outside-card:hover {
  border-top-color: rgba(215, 172, 95, 0.85) !important;
  border-bottom-color: rgba(215, 172, 95, 0.85) !important;
  box-shadow: none !important;
  transform: translateY(-2px);
  animation-play-state: paused;
}

.outside-card .section-kicker {
  justify-content: flex-start !important;
  margin-bottom: 8px !important;
}

.outside-card .section-kicker::after {
  display: none !important;
}

.outside-card .section-kicker::before {
  display: inline-block !important;
}

.outside-content h2 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  letter-spacing: -0.04em;
  margin: 12px 0 16px;
  text-wrap: balance;
  color: #e3dac9;
  text-shadow: none;
}

.outside-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 24px;
}

.outside-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.outside-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(215, 172, 95, 0.85);
  background: rgba(215, 172, 95, 0.05);
  border: 1px solid rgba(215, 172, 95, 0.16) !important;
  border-radius: 99px;
  padding: 5px 12px;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.outside-card:hover .outside-tags span {
  border-color: rgba(215, 172, 95, 0.3) !important;
  color: var(--accent-secondary);
  background: rgba(215, 172, 95, 0.08);
}

.outside-cta-zone {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.outside-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(215, 172, 95, 0.07);
  border: 1px solid rgba(215, 172, 95, 0.34) !important;
  color: var(--accent-secondary) !important;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.outside-cta-btn .cta-arrow {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.outside-cta-btn:hover {
  background: var(--accent-primary) !important;
  color: #0b0b0d !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 24px rgba(215, 172, 95, 0.3);
  transform: translateX(4px);
}

.outside-cta-btn:hover .cta-arrow {
  transform: translateX(3px);
}

/* Responsive Overrides for Outside card */
@media (max-width: 900px) {
  .outside-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 0px !important;
  }
  
  .outside-cta-zone {
    justify-content: flex-start;
  }
}

/* Ensure absolute visual alignment and elegant centering inside #about section when collapsed */
@media (max-width: 1100px) {
  .about-layout-v2 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  .about-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }
  .about-copy p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .about-pill-strip {
    justify-content: center !important;
    width: 100% !important;
  }
  .about-layout-v2 .about-card {
    width: 100% !important;
    max-width: 600px !important;
    text-align: center !important;
    margin-top: 24px !important;
  }
  .education-item {
    text-align: center !important;
  }
}

/* Contact Title Flanks */
.contact-head {
  text-align: center;
}
.contact-head h2 {
  position: relative;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}
.contact-head h2::before,
.contact-head h2::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 160, 99, 0.72));
  opacity: 0.7;
  display: none !important; /* Disabled flanks around contact title */
}
.contact-head h2::before {
  right: calc(100% + 22px);
}
.contact-head h2::after {
  left: calc(100% + 22px);
  background: linear-gradient(90deg, rgba(201, 160, 99, 0.72), transparent);
}

@media (max-width: 640px) {
  .contact-head h2::before {
    width: 28px;
    right: calc(100% + 14px);
  }
  .contact-head h2::after {
    width: 28px;
    left: calc(100% + 14px);
  }
}

/* Restructured Skills Grid (Open Column Layout) */
.skills-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 28px !important;
  margin-top: 48px !important;
}
.skills-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  background: rgba(16, 20, 26, 0.24) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-radius: var(--radius-lg) !important;
  padding: 28px !important;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast) !important;
}
.skills-column:hover {
  border-color: rgba(215, 172, 95, 0.28) !important;
  background: rgba(18, 22, 29, 0.38) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25) !important;
}
.skills-column-header {
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 16px !important;
}
.skills-column-kicker {
  font-family: var(--font-mono) !important;
  font-size: 0.68rem !important;
  color: var(--accent-primary) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  display: block !important;
  margin-bottom: 4px !important;
}
.skills-column-header h3 {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  margin: 0 !important;
}
.skills-column .skill-card {
  min-height: auto !important;
  padding: 20px !important;
  background: rgba(255, 255, 255, 0.015) !important;
  border: 1px solid rgba(255, 255, 255, 0.03) !important;
  border-radius: var(--radius-md) !important;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast) !important;
}
.skills-column .skill-card:hover {
  border-color: rgba(215, 172, 95, 0.24) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

/* Adjacent build tools centered box in personal context page */
.adjacent-tools-box {
  max-width: 840px !important;
  margin: 40px auto 0 !important;
  text-align: center !important;
  padding: 44px 36px !important;
  background: rgba(16, 20, 26, 0.35) !important;
  border: 1px solid rgba(215, 172, 95, 0.18) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.adjacent-tools-box:hover {
  border-color: rgba(215, 172, 95, 0.42) !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 0 0 40px rgba(215, 172, 95, 0.05) !important;
  transform: translateY(-2px) !important;
}
.adjacent-tools-box .section-kicker {
  justify-content: center !important;
  margin-bottom: 8px !important;
}
.adjacent-tools-box .section-kicker::before {
  display: inline-block !important;
}
.adjacent-tools-box .section-kicker::after {
  display: none !important;
}
.adjacent-title {
  font-size: clamp(1.8rem, 3vw, 2.3rem) !important;
  letter-spacing: -0.04em !important;
  margin: 12px 0 24px !important;
  color: var(--text-primary) !important;
}
.adjacent-tags {
  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-bottom: 28px !important;
}
.adj-tag {
  font-family: var(--font-mono) !important;
  font-size: 0.72rem !important;
  padding: 6px 14px !important;
  background: rgba(215, 172, 95, 0.05) !important;
  border: 1px solid rgba(215, 172, 95, 0.16) !important;
  border-radius: 99px !important;
  color: rgba(215, 172, 95, 0.85) !important;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease !important;
}
.adjacent-tools-box:hover .adj-tag {
  border-color: rgba(215, 172, 95, 0.3) !important;
  color: var(--accent-secondary) !important;
  background: rgba(215, 172, 95, 0.08) !important;
}
.adj-tag:hover {
  transform: translateY(-1px) !important;
  border-color: var(--accent-secondary) !important;
  color: var(--text-primary) !important;
}

/* Responsive styles for restructured skills grid */
@media (max-width: 960px) {
  .skills-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* Personal page: Exam cards */
.personal-exam-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 42px;
}

.exam-card {
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  background: rgba(16, 20, 26, 0.32);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.exam-card:hover {
  border-color: rgba(215, 172, 95, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
}

.exam-card-highlight {
  border-color: rgba(215, 172, 95, 0.28) !important;
  background: rgba(201, 160, 99, 0.04) !important;
}

.exam-card-highlight:hover {
  border-color: rgba(215, 172, 95, 0.52) !important;
  box-shadow: 0 16px 48px rgba(201, 160, 99, 0.1) !important;
}

.exam-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 18px;
  border: 1px solid currentColor;
  opacity: 0.85;
}

.exam-score {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.exam-card-highlight .exam-score {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.exam-score-unit {
  font-size: 0.45em;
  font-weight: 600;
  opacity: 0.7;
  letter-spacing: 0;
  vertical-align: middle;
  margin-left: 3px;
}
.exam-card-highlight .exam-score .exam-score-unit {
  -webkit-text-fill-color: var(--text-muted);
  color: var(--text-muted);
  opacity: 0.8;
}
.exam-cat-label {
  font-size: 0.52em;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 6px;
  -webkit-text-fill-color: var(--accent-primary);
  color: var(--accent-primary);
}

.exam-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .personal-exam-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .exam-score {
    font-size: 2.4rem;
  }
}

/* ── PORTRAIT & CANVAS TELEPORTATION STYLES ── */
.portrait-box {
  border: 1px solid rgba(201, 160, 99, 0.72);
  border-radius: 18px;
  padding: 9px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035), 0 28px 80px rgba(0, 0, 0, 0.36);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease,
              border-color var(--transition-smooth),
              box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 5;
}

.portrait-box::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 1px rgba(240, 207, 142, 0.85), 0 0 34px rgba(201, 160, 99, 0.36);
  transition: opacity 0.28s ease, box-shadow 0.28s ease;
}
@media (hover: hover) {
  .hero-headshot-frame:hover .portrait-box::after {
    opacity: 0.5;
  }
}

.hero-headshot-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  filter: grayscale(100%) contrast(1.08);
  transform: scale(1.12);
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Flanks (Horizontal Wires) */
.portrait-flank {
  position: absolute;
  top: 50%;
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 160, 99, 0.72));
  opacity: 0.7;
  transform: scaleY(1);
  transition: width 0.3s ease, right 0.3s ease, left 0.3s ease, opacity 0.3s ease;
  z-index: 10;
}

.portrait-flank-left {
  right: calc(100% + 22px);
  transform-origin: right;
}

.portrait-flank-right {
  left: calc(100% + 22px);
  transform-origin: left;
  background: linear-gradient(90deg, rgba(201, 160, 99, 0.72), transparent);
}

/* Circuit Overlay Container */
.circuit-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 90vw);
  height: 180px;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
  transition: opacity 0.5s ease 0.3s;
}

#circuit-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.circuit-text {
  position: absolute;
  top: -22px;
  width: 100%;
  text-align: center;
  color: #E1BE7A; /* brand off-gold */
  font-family: 'STIX Two Math', 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0.03em;
  opacity: 0.95;
}

/* ── TELEPORTING TRANSITION STATE ── */
.hero-headshot-frame.teleporting .portrait-box {
  transform: scale(0.85);
  opacity: 0;
}

.hero-headshot-frame.teleporting .circuit-container {
  opacity: 1;
}

/* 1. Retracting State: first retract (and shrink) without moving closer */
.hero-headshot-frame.retracting .portrait-flank {
  opacity: 1;
  width: 14px; /* shrink to tiny stub */
  transition: width 0.25s cubic-bezier(0.25, 1, 0.5, 1),
              right 0.25s cubic-bezier(0.25, 1, 0.5, 1),
              left 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-headshot-frame.retracting .portrait-flank-left {
  right: calc(100% + 40px); /* pull outwards slightly */
}

.hero-headshot-frame.retracting .portrait-flank-right {
  left: calc(100% + 40px); /* pull outwards slightly */
}

/* 2. Teleporting State: expand and move closer to collide violently */
.hero-headshot-frame.teleporting .portrait-flank {
  opacity: 1;
  height: 1.5px;
  width: min(315px, 40vw); /* expand */
  transition: width 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335),
              right 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335),
              left 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335);
}

.hero-headshot-frame.teleporting .portrait-flank-left {
  right: 38%;
  background: #D7AC5F;
  box-shadow: 0 0 10px rgba(215, 172, 95, 0.92), 0 0 20px rgba(215, 172, 95, 0.5);
}

.hero-headshot-frame.teleporting .portrait-flank-right {
  left: 38%;
  background: #D7AC5F;
  box-shadow: 0 0 10px rgba(215, 172, 95, 0.92), 0 0 20px rgba(215, 172, 95, 0.5);
}

/* Clean fade out of flanks once canvas sweep starts */
.hero-headshot-frame.canvas-active .portrait-flank {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.6s ease-in-out !important;
}

/* Screen shake keyframes for high-energy kinetic impact */
@keyframes screen-shake {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-3px, 2px); }
  20% { transform: translate(3px, -2px); }
  30% { transform: translate(-2px, -3px); }
  40% { transform: translate(2px, 3px); }
  50% { transform: translate(-3px, 1px); }
  60% { transform: translate(3px, -1px); }
  70% { transform: translate(-1px, 2px); }
  80% { transform: translate(2px, -2px); }
  90% { transform: translate(-2px, 1px); }
  100% { transform: translate(0, 0); }
}

.hero-headshot-frame.shake-active {
  animation: screen-shake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

/* ── Glowing vibration (ringtone style) and ripple animations on the headshot portrait ── */
.hero-headshot-frame .portrait-box {
  animation: portrait-glow-vibrate 5s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
  transform-origin: center;
}

.hero-headshot-frame::before,
.hero-headshot-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201, 160, 99, 0.72);
  border-radius: 18px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transform: scale(1);
}

.hero-headshot-frame::before {
  animation: portrait-ripple 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.hero-headshot-frame::after {
  animation: portrait-ripple 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  animation-delay: 0.65s;
}

/* Disable animations during teleportation states to prevent conflict */
.hero-headshot-frame.teleporting .portrait-box,
.hero-headshot-frame.retracting .portrait-box,
.hero-headshot-frame.canvas-active .portrait-box {
  animation: none !important;
}

.hero-headshot-frame.teleporting::before,
.hero-headshot-frame.teleporting::after,
.hero-headshot-frame.retracting::before,
.hero-headshot-frame.retracting::after,
.hero-headshot-frame.canvas-active::before,
.hero-headshot-frame.canvas-active::after {
  animation: none !important;
  display: none !important;
}

@keyframes portrait-glow-vibrate {
  0%, 100% {
    box-shadow: 0 0 8px rgba(201, 160, 99, 0.12), inset 0 0 4px rgba(201, 160, 99, 0.06);
    border-color: rgba(201, 160, 99, 0.45);
  }
  2% {
    box-shadow: 0 0 16px rgba(201, 160, 99, 0.35), inset 0 0 8px rgba(201, 160, 99, 0.18);
    border-color: rgba(201, 160, 99, 0.75);
  }
  4% {
    box-shadow: 0 0 12px rgba(201, 160, 99, 0.22), inset 0 0 6px rgba(201, 160, 99, 0.1);
    border-color: rgba(201, 160, 99, 0.6);
  }
  6% {
    box-shadow: 0 0 20px rgba(201, 160, 99, 0.42), inset 0 0 10px rgba(201, 160, 99, 0.22);
    border-color: rgba(201, 160, 99, 0.85);
  }
  8% {
    box-shadow: 0 0 10px rgba(201, 160, 99, 0.18), inset 0 0 5px rgba(201, 160, 99, 0.08);
    border-color: rgba(201, 160, 99, 0.5);
  }
  
  /* pause */
  14% {
    box-shadow: 0 0 8px rgba(201, 160, 99, 0.12), inset 0 0 4px rgba(201, 160, 99, 0.06);
    border-color: rgba(201, 160, 99, 0.45);
  }
  
  /* second burst */
  16% {
    box-shadow: 0 0 16px rgba(201, 160, 99, 0.35), inset 0 0 8px rgba(201, 160, 99, 0.18);
    border-color: rgba(201, 160, 99, 0.75);
  }
  18% {
    box-shadow: 0 0 12px rgba(201, 160, 99, 0.22), inset 0 0 6px rgba(201, 160, 99, 0.1);
    border-color: rgba(201, 160, 99, 0.6);
  }
  20% {
    box-shadow: 0 0 20px rgba(201, 160, 99, 0.42), inset 0 0 10px rgba(201, 160, 99, 0.22);
    border-color: rgba(201, 160, 99, 0.85);
  }
  22%, 100% {
    box-shadow: 0 0 8px rgba(201, 160, 99, 0.12), inset 0 0 4px rgba(201, 160, 99, 0.06);
    border-color: rgba(201, 160, 99, 0.45);
  }
}

@keyframes portrait-ripple {
  0% {
    transform: scale(1);
    opacity: 0.35;
    box-shadow: 0 0 6px rgba(201, 160, 99, 0.15), inset 0 0 4px rgba(201, 160, 99, 0.08);
    border-color: rgba(201, 160, 99, 0.3);
  }
  15% {
    opacity: 0.15;
  }
  30% {
    transform: scale(1.12);
    opacity: 0;
    box-shadow: 0 0 12px rgba(201, 160, 99, 0), inset 0 0 6px rgba(201, 160, 99, 0);
    border-color: rgba(201, 160, 99, 0);
  }
  31%, 100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* Premium Feedback Section / Roast Form */
.feedback-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-soft);
  position: relative;
}
.feedback-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.feedback-card:hover {
  border-color: rgba(201, 160, 99, 0.38);
  box-shadow: 0 0 40px rgba(201, 160, 99, 0.08);
}
.feedback-header {
  margin-bottom: 32px;
}
.feedback-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-top: 8px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.feedback-hook {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 0.98rem;
  max-width: 600px;
}
.feedback-form {
  display: grid;
  gap: 24px;
}
.feedback-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feedback-form .form-group.full-width {
  grid-column: 1 / -1;
}
.feedback-form label {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.feedback-form textarea, .feedback-form input {
  width: 100%;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.94rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}
.feedback-form textarea:focus, .feedback-form input:focus {
  border-color: var(--accent-primary);
  background-color: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 12px var(--accent-glow);
  outline: none;
}
.feedback-form textarea {
  resize: vertical;
  line-height: 1.6;
}
.feedback-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.feedback-form .subtext {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-style: italic;
  margin-top: 2px;
  line-height: 1.45;
}
.feedback-form .required {
  color: var(--accent-primary);
}
.feedback-form .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.feedback-form .btn-primary {
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--accent-primary);
  color: #000;
  border: 1px solid var(--accent-primary);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.feedback-form .btn-primary:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}
.feedback-form .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .feedback-section {
    padding: 60px 0;
  }
  .feedback-card {
    padding: 32px 24px;
  }
  .feedback-form .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Toast animation */
@keyframes devToastIn {
  from {
    transform: translate(-50%, 24px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Mini Roast Card styling */
.roast-card-mini {
  margin-top: 0;
  background: rgba(16, 20, 26, 0.58);
  border: 1px solid rgba(201, 160, 99, 0.24);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -1px 0 rgba(215, 172, 95, .35), 0 24px 80px rgba(0, 0, 0, .28);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.roast-card-mini:hover {
  border-color: rgba(201, 160, 99, 0.48);
  box-shadow: 0 0 24px rgba(201, 160, 99, 0.05);
}

.roast-card-mini h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.roast-card-mini p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 16px;
}

.roast-card-mini .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.roast-card-mini .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.roast-card-mini label {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  display: block;
}

.roast-card-mini label .required {
  color: var(--accent-primary);
}

.roast-card-mini label .opt-label {
  color: var(--text-muted);
  font-size: 0.64rem;
  text-transform: none;
  font-style: italic;
  font-weight: normal;
}

.roast-card-mini textarea,
.roast-card-mini input {
  width: 100%;
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.84rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.roast-card-mini textarea:focus,
.roast-card-mini input:focus {
  border-color: var(--accent-primary);
  background-color: rgba(255, 255, 255, 0.024);
  box-shadow: 0 0 10px var(--accent-glow);
  outline: none;
}

.roast-card-mini textarea {
  resize: vertical;
  line-height: 1.45;
}

.roast-card-mini .btn-submit-roast {
  width: 100%;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.roast-card-mini .btn-submit-roast:hover {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 16px var(--accent-glow);
}

@media (max-width: 480px) {
  .roast-card-mini .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

#roast-feedback::placeholder,
#roast-company::placeholder {
  font-style: italic;
}

/* UI/UX Polish - Hardening */
.section-kicker.no-rule::after {
  display: none !important;
}
.section-kicker.center-flanked {
  width: 100%;
  justify-content: center;
}
.section-kicker.center-flanked::before,
.section-kicker.center-flanked::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent-primary);
  opacity: 0.85;
}

.tech-tab.active {
  background: rgba(201, 160, 99, 0.15) !important;
  color: var(--accent-primary) !important;
  font-weight: 700 !important;
  border-color: var(--accent-primary) !important;
}

.click-signal-teleport {
  bottom: -25px !important;
}
.hero-headshot-frame {
  margin-bottom: 25px;
}

#projects .project-card .project-tier {
  display: none !important;
}
#projects .project-card::after {
  content: 'VIEW PROJECT \2192';
  position: absolute;
  top: 22px;
  left: 34px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: silver;
  border-bottom: 1px dotted silver;
  padding-bottom: 2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.project-card:hover::after {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.project-card h3 {
  margin-top: 32px;
}



/* Fixes from review */
.btn-silver {
    color: silver !important;
    border-color: rgba(192, 192, 192, 0.4) !important;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.2);
}
.btn-silver:hover {
    color: #fff !important;
    border-color: silver !important;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
    background: rgba(192, 192, 192, 0.1) !important;
}

.project-card .project-tier {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px !important;
}

.adjacent-list article {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.adjacent-list article p {
    flex-grow: 1;
}

@media (max-width: 640px) {
  .focus-strip .stat-item {
    border-bottom: none;
    padding-bottom: 14px;
    margin-bottom: 4px;
  }
  .focus-strip .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* Responsive tech tabs (img1) */
@media (max-width: 640px) {
  .tech-tabs {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .tech-tab {
    white-space: normal !important;
    line-height: 1.3 !important;
    align-items: center !important;
    flex-direction: column !important;
    text-align: center !important;
    padding: 10px 4px !important;
    font-size: 0.65rem !important;
  }
}

/* Fix Focus section misalignment (img2) */
.focus-theme-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
}
.focus-theme-num {
  margin-top: 4px !important;
}
.focus-theme-content h3 {
  margin-top: 0 !important;
}

/* Reduce hamburger menu width on mobile */
@media (max-width: 920px) {
  .nav-links {
    width: 260px !important;
  }
}

/* Fix section cutoff when scrolling from menu */
section[id] {
  scroll-margin-top: 100px;
}

/* Disable project dropdown on hover, require click */
.nav-projects:hover .nav-projects-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(10px) !important;
  pointer-events: none !important;
}
.nav-projects.open .nav-projects-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

