/* ---------- Palette ----------
   One palette used throughout: deep navy-black base, gold as the
   "private bank" accent, teal as the secondary "terminal data"
   accent, and rose as a third accent used sparingly for variety. */
:root {
  --bg: #0b0e14;
  --bg-panel: #121722;
  --bg-panel-alt: #161c29;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --gold: #cda85e;
  --gold-bright: #e8c37a;
  --teal: #45b3a0;
  --rose: #d9836f;

  --text: #eef1f5;
  --text-dim: #97a2b1;
  --text-faint: #5c6675;

  --font-serif: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 106.25%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3 {
  margin: 0 0 0.5em 0;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

h2 {
  font-size: clamp(1.5rem, 4vw + 0.6rem, 1.9rem);
  margin-bottom: 0.4rem;
}

p {
  margin: 0 0 1em 0;
  color: var(--text-dim);
}

a {
  color: var(--gold-bright);
  text-decoration: none;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem 0;
}

.section-sub {
  color: var(--text-faint);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

/* ---------- Global ambient backdrop ----------
   Fixed behind the whole page: only the drifting numbers, kept here.
   The animated stock-chart lines live only in the hero (see below). */
.global-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.numeric-row {
  white-space: nowrap;
  width: max-content;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 5rem);
}

.row-1 { color: var(--gold); opacity: 0.0363; animation: scroll-left 130s linear infinite; }
.row-2 { color: var(--teal); opacity: 0.0315; animation: scroll-right 110s linear infinite; }
.row-3 { color: var(--text); opacity: 0.0242; animation: scroll-left 160s linear infinite; }

.page {
  position: relative;
  z-index: 1;
}

/* ---------- Top scrolling ticker ---------- */
.top-ticker {
  background: rgba(5, 7, 11, 0.9);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
}

.top-ticker-track {
  display: inline-block;
  padding: 0.4rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--teal);
  animation: scroll-left 32s linear infinite;
}

.top-ticker-track span {
  margin: 0 0.6rem;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes scroll-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@keyframes pulse-fade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.navbar-inner {
  width: 100%;
  margin: 0 auto;
  padding: 1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.logo em {
  font-style: normal;
  color: var(--gold);
}

.navbar nav a {
  margin-left: 1.5rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.15s ease;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.navbar nav a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

/* ---------- Hero / About ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 1.5rem 6rem 1.5rem;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(205, 168, 94, 0.1), transparent 60%);
}

/* The one place on the page with a live, breathing stock-chart line */
.hero-chart {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 220px;
  fill: none;
  stroke-width: 3;
  pointer-events: none;
  transition: transform 0.3s ease-out;
}

.hero-chart polyline {
  fill: none;
  stroke: inherit;
  stroke-width: inherit;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-chart-teal { stroke: var(--teal); opacity: 0.266; }
.hero-chart-gold { stroke: var(--gold); opacity: 0.157; height: 190px; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--teal);
  background: rgba(69, 179, 160, 0.08);
  border: 1px solid rgba(69, 179, 160, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}

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

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(69, 179, 160, 0.6); }
  70%  { box-shadow: 0 0 0 7px rgba(69, 179, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(69, 179, 160, 0); }
}

.photo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.photo-wrap::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(205, 168, 94, 0.4), transparent 70%);
  animation: glow-pulse 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.1); }
}

.profile-photo {
  position: relative;
  z-index: 1;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(205, 168, 94, 0.1), 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* A small floating fintech-illustration cluster around the photo */
.orbit {
  position: absolute;
  z-index: 2;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  animation: orbit-float 5s ease-in-out infinite;
}

@keyframes orbit-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-8px) rotate(var(--rot, 0deg)); }
}

.orbit-card {
  --rot: 8deg;
  top: -14px;
  right: -58px;
  width: 84px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 8px;
  animation-duration: 5s;
}

.orbit-card-dots {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}

.orbit-card-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.orbit-card-dots span:nth-child(1) { background: var(--rose); }
.orbit-card-dots span:nth-child(2) { background: var(--gold); }
.orbit-card-dots span:nth-child(3) { background: var(--teal); }

.orbit-card-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}

.orbit-card-bars span {
  width: 6px;
  height: var(--h);
  border-radius: 1px;
}

.bar-gold { background: var(--gold); }
.bar-teal { background: var(--teal); }
.bar-rose { background: var(--rose); }

.orbit-coin {
  --rot: -6deg;
  width: 34px;
  height: 34px;
  bottom: 4px;
  left: -32px;
  animation-duration: 4.5s;
  animation-delay: 0.6s;
}

.orbit-lock {
  --rot: 10deg;
  width: 26px;
  height: 26px;
  bottom: -10px;
  left: -2px;
  animation-duration: 4s;
  animation-delay: 1.2s;
}

@media (max-width: 560px) {
  .orbit {
    display: none;
  }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  transition: color 0.2s ease;
}

.scroll-cue:hover {
  color: var(--gold-bright);
}

.scroll-cue-arrow {
  font-size: 1rem;
  color: var(--gold);
  animation: bounce-cue 1.8s ease-in-out infinite;
}

@keyframes bounce-cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.hero h1 {
  font-size: clamp(1.7rem, 5vw + 0.8rem, 2.4rem);
  color: var(--text);
}

.tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 2vw + 0.4rem, 0.95rem);
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  font-weight: 500;
  margin-bottom: 1.7rem;
  min-height: 1.3em;
}

.tagline-rotate {
  color: var(--gold-bright);
}

.tagline-cursor {
  color: var(--gold);
  animation: pulse-fade 0.8s steps(1) infinite;
}

.hero-columns {
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  text-align: left;
}

.hero-bio-col {
  padding-top: 0.3rem;
}

.bio {
  margin: 0 0 2rem 0;
  color: var(--text-dim);
}

.hero-buttons {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-facts {
  background: rgba(18, 23, 34, 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem 1.6rem 1.4rem 1.6rem;
}

.hero-facts-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.hero-facts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.hero-facts li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--teal);
}

.hero-facts li span {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.hero-facts li strong {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

@media (max-width: 780px) {
  .hero-columns {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-facts li {
    text-align: left;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.6rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gold);
  color: #14181f;
}

.btn-primary:hover {
  background: var(--gold-bright);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(18, 23, 34, 0.5);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 1.5rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.section-alt {
  background: rgba(18, 23, 34, 0.82);
  backdrop-filter: blur(3px);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---------- KPI ticker board ---------- */
.kpi-strip {
  padding: 2.6rem 1.5rem;
  background: rgba(18, 23, 34, 0.7);
  backdrop-filter: blur(3px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  text-align: center;
}

.kpi-strip.in-view {
  opacity: 1;
  transform: translateY(0);
}

.ticker-board {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.ticker-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 172px;
  padding: 0 1.2rem;
  border-right: 1px solid var(--border);
}

.ticker-cell:last-child {
  border-right: none;
}

.ticker-cell:nth-child(3n+1) { --accent: var(--gold-bright); }
.ticker-cell:nth-child(3n+2) { --accent: var(--teal); }
.ticker-cell:nth-child(3n+3) { --accent: var(--rose); }

.ticker-arrow {
  color: var(--accent);
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
  animation: pulse-fade 2.4s ease-in-out infinite;
}

.kpi-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.kpi-label {
  font-size: 0.74rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  margin-top: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.kpi-bar {
  display: block;
  width: 70%;
  max-width: 90px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin-top: 0.7rem;
  overflow: hidden;
}

.kpi-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
}

@media (max-width: 700px) {
  .ticker-cell {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.6rem;
  }
  .ticker-cell:last-child { border-bottom: none; }
}

/* ---------- Experience: interactive explorer (nav + single panel) ---------- */
.career-explorer {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.career-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: sticky;
  top: 5.5rem;
}

.career-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  background: none;
  border: none;
  border-left: 2px solid var(--border);
  border-radius: 0 8px 8px 0;
  padding: 0.7rem 0.9rem;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.career-nav-item:hover {
  color: var(--text);
  border-left-color: var(--border-strong);
}

.career-nav-item:nth-child(3n+1) { --accent: var(--gold); --accent-soft: rgba(205, 168, 94, 0.12); }
.career-nav-item:nth-child(3n+2) { --accent: var(--teal); --accent-soft: rgba(69, 179, 160, 0.12); }
.career-nav-item:nth-child(3n+3) { --accent: var(--rose); --accent-soft: rgba(217, 131, 111, 0.12); }

.career-nav-item.is-active {
  color: var(--text);
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.career-nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  padding: 0.4rem;
  border-radius: 8px;
  background: #f4f1ea;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.career-nav-logo.logo-dark {
  background: #0d1119;
}

.career-nav-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.career-nav-item.is-active .career-nav-logo {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.career-nav-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.career-nav-role {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.career-nav-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.career-panel {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  min-height: 260px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.career-panel-item {
  display: none;
}

.career-panel-item.is-active {
  display: block;
  animation: panel-fade 0.4s ease;
}

@keyframes panel-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.career-panel-item:nth-child(3n+1) { --accent: var(--gold); --accent-soft: rgba(205, 168, 94, 0.12); }
.career-panel-item:nth-child(3n+2) { --accent: var(--teal); --accent-soft: rgba(69, 179, 160, 0.12); }
.career-panel-item:nth-child(3n+3) { --accent: var(--rose); --accent-soft: rgba(217, 131, 111, 0.12); }

.career-panel-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.3rem;
}

.career-panel-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  padding: 0.55rem;
  border-radius: 10px;
  background: #f4f1ea;
  border: 1px solid var(--border);
}

.career-panel-logo.logo-dark {
  background: #0d1119;
}

.career-panel-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.career-panel-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
}

.career-panel-item h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.career-panel-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 1.3rem;
}

.career-panel-text {
  font-size: 0.98rem;
  color: var(--text-dim);
  min-height: 1.4em;
  margin-bottom: 0;
}

.career-panel-text.typing::after {
  content: "▍";
  color: var(--gold);
  animation: pulse-fade 0.8s steps(1) infinite;
}

@media (max-width: 820px) {
  .career-explorer {
    grid-template-columns: 1fr;
  }
  .career-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 3%, black 97%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 3%, black 97%, transparent);
  }
  .career-nav-item {
    flex: 0 0 auto;
    border-left: none;
    border-bottom: 3px solid var(--border);
    border-radius: 8px 8px 0 0;
    white-space: nowrap;
  }
  .career-nav-item.is-active {
    border-bottom-color: var(--accent);
  }
  .career-nav-meta {
    display: none;
  }
  .career-nav-role {
    font-size: 0.78rem;
  }
  .career-panel {
    padding: 1.5rem;
  }
}

.job-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  padding-top: 1rem;
}

.job-gallery:empty {
  display: none;
}

.job-gallery img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ---------- Skills: a live trading-terminal watchlist ---------- */
.trade-terminal {
  background: #0d1119;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.trade-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  background: #0a0d13;
  border-bottom: 1px solid var(--border);
}

.trade-topbar-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  flex: 1;
}

.trade-holdings {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  border: 1px solid rgba(205, 168, 94, 0.3);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.trade-ticker {
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 11, 0.6);
}

.trade-ticker-track {
  display: inline-block;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--teal);
  animation: scroll-left 40s linear infinite;
}

.trade-ticker-track span {
  margin: 0 0.9rem;
}

.trade-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.trade-tab {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.trade-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}

.trade-tab.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.trade-table {
  display: flex;
  flex-direction: column;
}

.trade-row {
  display: grid;
  grid-template-columns: 64px 1fr 130px 24px;
  align-items: center;
  gap: 1rem;
  padding: 0 1.4rem;
  border-bottom: 1px solid var(--border);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
}

.trade-row.is-visible {
  max-height: 64px;
  opacity: 1;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.trade-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.trade-symbol {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 4px;
  padding: 0.3rem 0;
  text-align: center;
}

.trade-name {
  font-size: 0.92rem;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-spark-wrap {
  overflow: hidden;
  width: 120px;
  height: 24px;
}

.trade-spark {
  width: 200%;
  height: 24px;
  animation: scroll-left 7s linear infinite;
}

.trade-row:nth-child(even) .trade-spark {
  animation-name: scroll-right;
  animation-duration: 8.5s;
}

.trade-spark polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-trend {
  color: var(--accent);
  font-size: 0.85rem;
  text-align: center;
  animation: pulse-fade 2.4s ease-in-out infinite;
}

@media (max-width: 700px) {
  .trade-row {
    grid-template-columns: 52px 1fr 20px;
  }
  .trade-spark-wrap {
    display: none;
  }
}

@media (max-width: 480px) {
  .trade-topbar-title {
    display: none;
  }
}

/* ---------- Achievements: one shared calculator, three memories ---------- */
.calc-wrap {
  display: flex;
  justify-content: center;
}

.calc-terminal {
  width: 100%;
  max-width: 440px;
  background: #0d1119;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.calc-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  background: #0a0d13;
  border-bottom: 1px solid var(--border);
}

.calc-topbar-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.calc-body {
  padding: 1.4rem 1.5rem 1.6rem 1.5rem;
}

/* Solar strip, like a real financial calculator */
.calc-strip {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.calc-strip span {
  width: 14px;
  height: 6px;
  background: #05070b;
  border-radius: 1px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* The LCD display */
.calc-screen {
  position: relative;
  min-height: 108px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid color-mix(in srgb, var(--tile-color) 35%, transparent);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.1rem;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  transition: border-color 0.3s ease;
}

.calc-screen-idle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 88px;
}

.calc-idle-text {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.calc-screen-result {
  display: none;
}

.calc-screen-result.is-active {
  display: block;
}

.calc-screen-top {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.calc-year {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--tile-color);
  text-shadow: 0 0 10px color-mix(in srgb, var(--tile-color) 60%, transparent);
}

.calc-blink {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tile-color);
  animation: pulse-fade 1s steps(1) infinite;
}

.calc-title {
  font-size: 1rem;
  margin: 0 0 0.3rem 0;
  color: var(--text);
}

.calc-meta {
  font-size: 0.82rem;
  color: var(--tile-color);
  margin: 0;
}

.calc-detail {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
}

.calc-detail.is-open {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.6rem;
}

/* The keypad: M1/M2/M3 pick the memory, "=" calculates, "C" clears */
.calc-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.calc-key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 36px;
  border-radius: 6px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.calc-key:active {
  transform: scale(0.94);
}

span.calc-key {
  cursor: default;
}

.calc-mem {
  font-weight: 700;
  color: var(--mem-color);
  border-color: color-mix(in srgb, var(--mem-color) 35%, transparent);
}

.calc-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.calc-mem.is-active {
  background: color-mix(in srgb, var(--mem-color) 18%, transparent);
}

.calc-mem.is-active .calc-led {
  background: var(--mem-color);
  box-shadow: 0 0 6px var(--mem-color);
}

.calc-key-eq {
  background: color-mix(in srgb, var(--tile-color) 16%, transparent);
  border-color: var(--tile-color);
  color: var(--tile-color);
  font-weight: 700;
}

.calc-key-eq[aria-expanded="true"] {
  background: var(--tile-color);
  color: #0b0e14;
}

.calc-legend {
  margin: 1rem 0 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- Education (small, simple by design) ---------- */
#education {
  position: relative;
  border-top: 1px solid var(--border-strong);
}

#education::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.education-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-panel-alt);
}

.education-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
}

.education-item:last-child {
  border-bottom: none;
}

.education-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  padding: 0.4rem;
  border-radius: 8px;
  background: #f4f1ea;
  border: 1px solid var(--border);
}

.education-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.education-logo-icon {
  background: rgba(205, 168, 94, 0.1);
  color: var(--gold);
}

.education-logo-icon svg {
  width: 22px;
  height: 22px;
}

.education-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.education-degree {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text);
}

.education-school {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 0.15rem;
}

.education-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 500px) {
  .education-item {
    flex-wrap: wrap;
  }
  .education-date {
    margin-left: calc(42px + 1rem);
  }
}

/* ---------- Contact ---------- */
.contact-inner {
  text-align: center;
}

.contact-inner .eyebrow,
.contact-inner h2,
.contact-inner .section-sub {
  display: none;
}

.contact-intro {
  max-width: 480px;
  margin: 0 auto 2rem auto;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2.2rem 1.5rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  background: rgba(11, 14, 20, 0.7);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero {
    padding: 3.5rem 1.5rem 4.5rem 1.5rem;
  }
  .hero-chart {
    height: 140px;
  }
  .hero-chart-gold {
    height: 120px;
  }
  .navbar nav a {
    margin-left: 0.9rem;
    font-size: 0.7rem;
  }
  .section {
    padding: 3.5rem 1.5rem;
  }
}

@media (max-width: 420px) {
  .navbar-inner {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-ticker-track,
  .numeric-row,
  .status-dot,
  .calc-blink,
  .ticker-arrow,
  .scroll-cue-arrow,
  .orbit,
  .photo-wrap::before {
    animation: none !important;
  }
}
