:root {
  color-scheme: dark;
  --bg: #050915;
  --bg-2: #08111f;
  --surface: rgba(12, 20, 34, 0.70);
  --surface-strong: rgba(16, 27, 45, 0.92);
  --ink: #f5f7fb;
  --muted: #aeb9ca;
  --soft: #718096;
  --line: rgba(255,255,255,.13);
  --primary: #68e5d6;
  --primary-2: #2ea7ff;
  --gold: #ffd27a;
  --violet: #9d7cff;
  --pink: #ff7eb6;
  --shadow: 0 28px 90px rgba(0, 0, 0, .42);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Noto Sans Thai", system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(104, 229, 214, .16), transparent 34rem),
    radial-gradient(circle at 82% 6%, rgba(157, 124, 255, .13), transparent 32rem),
    linear-gradient(145deg, var(--bg) 0%, #08111f 54%, #03050d 100%);
  overflow-x: hidden;
}
body, button, input { font-family: Inter, "Noto Sans Thai", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }

#starGraph {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  background: radial-gradient(circle at 50% 50%, rgba(12, 28, 52, .15), transparent 60%);
}
.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.24'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}
.orb {
  position: fixed;
  z-index: -1;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(28px);
  opacity: .22;
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}
.orb-one { left: -130px; top: 170px; background: var(--primary); }
.orb-two { right: -120px; bottom: 70px; background: var(--violet); animation-delay: -3s; }
@keyframes float { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(20px,-24px,0); } }

.glass {
  background: linear-gradient(145deg, rgba(16, 28, 48, .78), rgba(7, 13, 25, .64));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), var(--max));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px;
  border-radius: 999px;
  transition: opacity .42s ease, transform .42s ease, visibility .42s ease;
}
.topbar.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-18px) scale(.98);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #031018;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  letter-spacing: -.04em;
}
.brand-text { white-space: nowrap; color: #fff; }
.brand-greeting {
  white-space: nowrap;
  color: #fff;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
}
.nav { display: flex; gap: 8px; align-items: center; }
.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: .25s ease;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.lang-toggle {
  display: flex;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 4px;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}
.toggle-pill {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 32px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  color: var(--muted);
}
.toggle-pill.active { background: #fff; color: #08111f; }

main { position: relative; }
.section-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 110px 0 70px;
}
.snap-panel {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero {
  display: grid;
  grid-template-columns: minmax(500px, 1.18fr) minmax(390px, .82fr);
  gap: clamp(22px, 3vw, 46px);
  align-items: center;
  height: 100vh;
  min-height: 720px;
  padding-top: 86px;
  padding-bottom: 18px;
  overflow: hidden;
}
.hero-profile { align-self: stretch; display: grid; place-items: center; min-width: 0; }
.portrait-stage {
  position: relative;
  width: min(100%, 610px);
  min-height: min(650px, calc(100vh - 128px));
  display: grid;
  place-items: end center;
  transform-style: preserve-3d;
}
.portrait-glow {
  position: absolute;
  width: 78%;
  height: 70%;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%) perspective(900px) rotateY(-5deg) rotateX(2deg);
  border-radius: 46% 54% 42% 58% / 58% 46% 54% 42%;
  background:
    radial-gradient(circle at 52% 24%, rgba(255,255,255,.18), transparent 26%),
    radial-gradient(circle at 48% 52%, rgba(104,229,214,.34), rgba(157,124,255,.12) 52%, transparent 72%);
  filter: blur(22px);
  opacity: .92;
  box-shadow: 0 46px 150px rgba(104, 229, 214, .20);
  animation: profileAura 5.8s ease-in-out infinite alternate;
}
.portrait-stage::before,
.portrait-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  z-index: 1;
}
.portrait-stage::before {
  width: 78%;
  height: 88%;
  inset: auto 8% 0;
  background: conic-gradient(from 120deg, transparent, rgba(104,229,214,.34), transparent 32%, rgba(255,210,122,.24), transparent 68%, rgba(157,124,255,.28), transparent);
  filter: blur(26px);
  opacity: .54;
  animation: auraOrbit 8s linear infinite;
}
.portrait-stage::after {
  width: 58%;
  height: 72%;
  left: 20%;
  bottom: 7%;
  border: 1px solid rgba(104,229,214,.16);
  box-shadow: 0 0 42px rgba(104,229,214,.18), inset 0 0 52px rgba(157,124,255,.10);
  animation: auraBreath 3.8s ease-in-out infinite;
}
.portrait {
  position: relative;
  z-index: 2;
  width: min(100%, 600px);
  max-height: min(700px, calc(100vh - 120px));
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 42px 62px rgba(0,0,0,.62)) drop-shadow(0 0 34px rgba(104,229,214,.14));
  transform: translateY(8px);
}
.portrait-badge {
  position: absolute;
  z-index: 3;
  left: 7%;
  right: 7%;
  bottom: clamp(14px, 3vh, 28px);
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 22px;
}
.portrait-badge.glass {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(8, 17, 31, .18) 9%,
    rgba(12, 24, 42, .70) 22%,
    rgba(12, 24, 42, .76) 50%,
    rgba(12, 24, 42, .70) 78%,
    rgba(8, 17, 31, .18) 91%,
    transparent 100%
  );
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: blur(18px);
}
.portrait-badge span { color: var(--primary); font-weight: 900; }
.portrait-badge strong { font-size: 28px; line-height: 1; }
.portrait-badge small { color: var(--muted); font-size: 15px; }
.hero-info { display: grid; gap: 18px; min-width: 0; }
.identity-panel, .hero-copy {
  border-radius: var(--radius-xl);
  padding: clamp(20px, 2.4vw, 30px);
}
.hero-copy { background: linear-gradient(145deg, rgba(13, 23, 39, .62), rgba(7, 13, 25, .50)); }
.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 950;
  overflow-wrap: anywhere;
  word-break: break-word;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 18px;
  font-size: clamp(28px, 2.7vw, 40px);
  line-height: 1.02;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}
h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -.045em;
}
h3 { font-size: 20px; letter-spacing: -.02em; }
.hero-sub {
  max-width: 720px;
  color: #d6deec;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.62;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn.primary { color: #031018; background: linear-gradient(135deg, var(--primary), var(--gold)); box-shadow: 0 18px 40px rgba(104, 229, 214, .18); }
.btn.secondary { color: #fff; background: rgba(255,255,255,.06); border: 1px solid var(--line); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.metric-grid div {
  min-width: 0;
  padding: 14px 13px;
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.11);
}
.metric-grid span, .contact-grid span { display: block; color: var(--soft); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.metric-grid strong { display: block; margin-top: 6px; font-size: clamp(14px, 1.1vw, 16px); line-height: 1.18; color: #fff; overflow-wrap: anywhere; }

.section-title { max-width: 820px; margin-bottom: clamp(26px, 4vh, 44px); }
.value-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.value-card {
  position: relative;
  min-height: 240px;
  padding: clamp(22px, 2.5vw, 30px);
  border-radius: var(--radius-lg);
  background: rgba(16, 28, 48, .70);
  border: 1px solid var(--line);
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
}
.value-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: var(--shadow); background: rgba(20, 37, 62, .92); }
.card-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: #031018; background: linear-gradient(135deg, var(--primary), var(--gold)); font-size: 22px; font-weight: 950; margin-bottom: 28px; }
.value-card p, .timeline-item p, .capability-panel p, .education-card p, .education-note span { color: var(--muted); line-height: 1.7; }

.timeline { position: relative; display: grid; gap: 16px; max-height: none; overflow: visible; padding-right: 8px; }
.timeline::before { content: ""; position: absolute; left: 170px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--primary), rgba(157,124,255,.2)); }
.timeline-item { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 44px; align-items: start; }
.timeline-year { position: sticky; top: 0; padding-top: 62px; color: var(--primary); font-size: 18px; font-weight: 950; transition: color .25s ease, text-shadow .25s ease, transform .25s ease, opacity .25s ease; transform-origin: left center; }
.timeline-card { padding: 24px; border-radius: var(--radius-lg); background: rgba(16, 28, 48, .76); border: 1px solid var(--line); transition: transform .25s ease, background .25s ease; }
.timeline-card:hover { transform: translateX(8px); background: rgba(25, 42, 70, .92); }
.timeline-item:has(.timeline-card:hover) .timeline-year,
.timeline-item:has(.timeline-card:focus-within) .timeline-year {
  color: #fff;
  opacity: 1;
  transform: scale(1.08);
  text-shadow:
    0 0 8px rgba(104, 229, 214, .70),
    0 0 18px rgba(104, 229, 214, .48),
    0 0 34px rgba(104, 229, 214, .30);
}
.timeline-card::before { content: ""; position: absolute; left: 164px; width: 14px; height: 14px; margin-top: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 7px rgba(255,210,122,.13); }
.role { color: var(--primary); font-weight: 950; margin-bottom: 10px; text-shadow: 0 0 14px rgba(104,229,214,.22); }
.bullet-list { padding-left: 18px; color: var(--muted); line-height: 1.75; }

.capability-board { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.capability-tab { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted); font-weight: 950; cursor: pointer; }
.capability-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #031018; }
.capability-panel { min-height: 260px; padding: 30px; border-radius: var(--radius-xl); display: grid; grid-template-columns: .85fr 1.15fr; gap: 28px; align-items: start; }
.capability-panel h3 { font-size: 30px; margin-bottom: 10px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.skill-tags span { padding: 8px 10px; border-radius: 999px; background: rgba(104,229,214,.1); color: var(--primary); font-size: 13px; font-weight: 900; }

.education-card { display: grid; grid-template-columns: 1fr .9fr; gap: 24px; align-items: stretch; padding: 34px; border-radius: var(--radius-xl); }
.education-card h2 { color: var(--primary); }
.education-insight { display: grid; grid-template-rows: auto minmax(174px, 1fr); gap: 14px; }
.education-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.education-tab { position: relative; min-height: 48px; display: flex; align-items: center; padding: 0 38px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted); font-weight: 950; cursor: default; transition: .22s ease; }
.education-tab::after { content: ""; position: absolute; right: 14px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 16px rgba(255,210,122,.8); transform: translateY(-50%) scale(0); opacity: 0; transition: .22s ease; }
.education-tab:hover, .education-tab:focus, .education-tab.active { color: #f8fbff; border-color: rgba(255,210,122,.58); background: linear-gradient(135deg, rgba(104,229,214,.16), rgba(255,210,122,.12)); outline: none; }
.education-tab:hover::after, .education-tab:focus::after, .education-tab.active::after { transform: translateY(-50%) scale(1); opacity: 1; }
.education-note { min-height: 174px; padding: 22px; border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(104,229,214,.12), rgba(157,124,255,.14)); display: flex; flex-direction: column; justify-content: flex-start; }
.education-note strong { display: block; margin-bottom: 8px; color: var(--primary); }

.contact-card { padding: clamp(28px, 5vw, 58px); border-radius: 40px; color: #fff; background: radial-gradient(circle at 90% 10%, rgba(104,229,214,.28), transparent 22rem), linear-gradient(135deg, #091527, #132545 55%, #070c17); box-shadow: var(--shadow); border: 1px solid var(--line); }
.contact-card .eyebrow, .contact-card p { color: rgba(255,255,255,.72); }
.contact-card .eyebrow { color: var(--primary); }
.contact-card h2 { max-width: 890px; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.contact-grid > * { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); }
.contact-grid span { color: rgba(255,255,255,.62); }
.contact-grid strong { display: block; margin-top: 7px; }
.footer { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; padding: 0 0 42px; color: var(--muted); font-size: 14px; scroll-snap-align: end; }

.reveal { opacity: 1; transform: translateY(0); animation: revealUp .72s ease both; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
@keyframes revealUp { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes profileAura { from { opacity: .70; transform: translateX(-50%) scale(.98) rotate(-2deg); } to { opacity: 1; transform: translateX(-50%) scale(1.04) rotate(2deg); } }
@keyframes auraOrbit { to { transform: rotate(360deg); } }
@keyframes auraBreath { 0%,100% { transform: scale(.96); opacity: .45; } 50% { transform: scale(1.05); opacity: .80; } }
.reveal.in-view { animation: slideFocus .85s cubic-bezier(.2,.8,.2,1) both; }
@keyframes slideFocus { from { opacity: .25; transform: translateY(46px) scale(.98); filter: blur(5px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }

html[data-lang="th"] body { font-family: "Noto Sans Thai", Inter, system-ui, sans-serif; }
html[data-lang="th"] h1 { letter-spacing: -.045em; line-height: 1.08; }
html[data-lang="th"] h2 { letter-spacing: -.035em; line-height: 1.15; }

@media (max-width: 1080px) {
  :root { --max: 920px; }
  html { scroll-snap-type: y proximity; }
  .nav { display: none; }
  .topbar { width: min(calc(100vw - 36px), 354px); max-width: 354px; left: 18px; right: auto; transform: none; top: 10px; padding: 8px 10px; overflow: hidden; }
  .section-shell { width: min(calc(100% - 28px), var(--max)); padding: 96px 0 62px; }
  .hero { grid-template-columns: 1fr; height: auto; min-height: auto; gap: 18px; overflow: visible; padding-top: 88px; }
  .hero-profile { order: 0; }
  .hero-info { order: 1; }
  .portrait-stage { width: min(100%, 560px); min-height: min(540px, 64vh); }
  .portrait { max-height: min(560px, 64vh); }
  .portrait-badge { left: 8%; right: 8%; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-panel, .education-card { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .snap-panel { min-height: auto; }
}
@media (max-width: 680px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body { overflow-x: hidden; }
  .brand-text { display: none; }
  .topbar { gap: 8px; }
  .brand { gap: 7px; }
  .brand-mark { width: 38px; height: 38px; font-size: 13px; }
  .lang-toggle { width: 78px; padding: 3px; gap: 2px; flex: 0 0 auto; transform: none; }
  .toggle-pill { min-width: 34px; width: 34px; min-height: 32px; font-size: 12px; }
  .section-shell { width: min(calc(100vw - 36px), 354px) !important; max-width: 354px; margin-left: 18px; margin-right: 0; padding: 84px 0 48px; }
  .hero { padding-top: 78px; gap: 14px; display: block; width: 100%; max-width: 100%; min-width: 0; }
  .hero-info, .identity-panel, .hero-copy, .metric-grid, .value-grid, .timeline, .capability-board, .capability-panel, .education-card, .contact-card, .contact-grid { width: 100%; max-width: 100%; min-width: 0; }
  .hero-profile { margin-bottom: 14px; }
  .portrait-stage { width: min(100%, 360px); min-height: min(350px, 48vh); }
  .portrait { width: min(100%, 360px); max-height: min(360px, 48vh); }
  .portrait-badge { left: 8%; right: 8%; bottom: 10px; padding: 13px 14px; }
  .portrait-badge strong { font-size: 22px; overflow-wrap: anywhere; }
  .portrait-badge small { font-size: 13px; }
  h1 { font-size: clamp(26px, 7.2vw, 32px); line-height: 1.12; word-break: break-word; }
  h2 { font-size: clamp(28px, 9vw, 38px); }
  .eyebrow { font-size: 10px; letter-spacing: .055em; line-height: 1.45; }
  .hero-sub { font-size: 15px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; margin-top: 20px; }
  .metric-grid, .value-grid, .contact-grid, .education-tabs { grid-template-columns: 1fr; }
  .identity-panel, .hero-copy, .timeline-card, .education-card, .contact-card, .capability-panel { padding: 18px; border-radius: 22px; }
  .value-card { min-height: auto; }
  .timeline { max-height: none; overflow: visible; }
  .timeline::before { left: 10px; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; padding-left: 34px; }
  .timeline-year { position: static; padding-top: 0; font-size: 15px; }
  .timeline-card::before { left: 4px; }
  .capability-board { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; }
  .capability-tab { padding: 0 10px; font-size: 12px; }
  .capability-panel { grid-template-columns: 1fr; }
  .capability-panel h3 { font-size: 24px; }
  .contact-grid strong { overflow-wrap: anywhere; }
}


/* v6 refinements: intro animation, centered mobile layout, matrix profile field, calmer section pacing */
.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(104,229,214,.22), transparent 22rem),
    linear-gradient(145deg, #030711 0%, #08111f 58%, #02040a 100%);
  transition: opacity .58s ease, visibility .58s ease;
}
.intro-core {
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--primary);
  animation: introPulse 1.15s ease both;
}
.intro-core span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #031018;
  font-weight: 950;
  letter-spacing: -.05em;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  box-shadow: 0 0 44px rgba(104,229,214,.32), 0 0 110px rgba(104,229,214,.18);
}
.intro-core small { color: rgba(245,247,251,.68); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
body.intro-done .intro-loader { opacity: 0; visibility: hidden; pointer-events: none; }
body:not(.intro-done) main, body:not(.intro-done) .topbar, body:not(.intro-done) .footer { filter: blur(10px); transform: scale(.992); }
@keyframes introPulse {
  0% { opacity: 0; transform: translateY(18px) scale(.92); filter: blur(8px); }
  55% { opacity: 1; transform: translateY(0) scale(1.04); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); }
}

.portrait-glow {
  background: radial-gradient(ellipse at 50% 54%, rgba(104,229,214,.26), rgba(104,229,214,.10) 36%, rgba(157,124,255,.08) 58%, transparent 74%);
  filter: blur(24px);
  opacity: .72;
  animation: matrixBreath 4.8s ease-in-out infinite alternate;
  box-shadow: none;
}
.portrait-stage::before, .portrait-stage::after { display: none; }
.matrix-field {
  position: absolute;
  z-index: 1;
  width: 104%;
  height: 92%;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  opacity: .58;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse at 50% 58%, rgba(0,0,0,1) 0%, rgba(0,0,0,.76) 32%, rgba(0,0,0,.28) 55%, transparent 76%);
  mask-image: radial-gradient(ellipse at 50% 58%, rgba(0,0,0,1) 0%, rgba(0,0,0,.76) 32%, rgba(0,0,0,.28) 55%, transparent 76%);
}
.matrix-field span {
  position: absolute;
  top: -28%;
  color: rgba(104,229,214,.33);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(10px, 1.2vw, 14px);
  line-height: 1.15;
  white-space: pre;
  text-shadow: 0 0 12px rgba(104,229,214,.35);
  animation: matrixFall var(--speed, 7s) linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes matrixFall { to { transform: translateY(142%); opacity: .06; } }
@keyframes matrixBreath { from { opacity: .46; transform: translateX(-50%) scale(.98); } to { opacity: .78; transform: translateX(-50%) scale(1.025); } }

.education-degree-line { display: block; }
.education-degree-line + .education-degree-line { margin-top: .18em; }

@media (max-width: 680px) {
  .topbar { left: 50%; right: auto; transform: translateX(-50%); width: min(calc(100vw - 36px), 354px); max-width: 354px; }
  .section-shell { margin-left: auto !important; margin-right: auto !important; }
  .hero-profile, .portrait-stage { margin-left: auto; margin-right: auto; justify-items: center; }
  .hero-info { text-align: left; }
  .portrait-stage { width: min(100%, 354px); }
  .portrait-badge { left: 7%; right: 7%; }
  .matrix-field { left: 0; right: 0; transform: none; width: 100%; height: 96%; opacity: .50; }
  .matrix-field span { font-size: 10px; }
}


/* v7 requested updates: new portrait, intro avatar, resume headline brand, no duplicate OD/name */
.brand {
  min-width: 0;
}
.brand-headline {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 4px;
  color: var(--primary);
  font-size: clamp(13px, 1.18vw, 16px);
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(104,229,214,.36);
  white-space: nowrap;
}
.intro-core span {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255,255,255,.16), transparent 58%),
    linear-gradient(135deg, rgba(104,229,214,.90), rgba(255,210,122,.82));
  border: 1px solid rgba(255,255,255,.34);
}
.intro-core span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  display: block;
  filter: drop-shadow(0 8px 15px rgba(0,0,0,.26));
}
.intro-core small {
  color: var(--primary);
  text-shadow: 0 0 18px rgba(104,229,214,.46);
}
.portrait {
  width: min(100%, 520px);
  max-height: min(690px, calc(100vh - 120px));
}
.portrait-stage {
  place-items: end center;
}
@media (max-width: 680px) {
  .brand-headline {
    max-width: 220px;
    min-height: 38px;
    font-size: 11px;
    line-height: 1.18;
    letter-spacing: .045em;
    white-space: normal;
  }
  .portrait { width: min(100%, 322px); max-height: min(386px, 49vh); }
  .portrait-stage { min-height: min(374px, 50vh); }
  .intro-core span { width: 78px; height: 78px; }
  .intro-core small { font-size: 10px; letter-spacing: .11em; }
}


/* v9 requested fixes */
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}
.snap-panel {
  scroll-snap-stop: always;
}
.brand-resume-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.34) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--primary), var(--gold));
  box-shadow:
    0 0 24px rgba(104,229,214,.25),
    inset 0 0 0 1px rgba(255,255,255,.42),
    inset 0 -7px 16px rgba(3, 16, 24, .14);
}
.brand-resume-icon::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.20);
  opacity: .55;
}
.brand-hand {
  display: block;
  position: relative;
  z-index: 1;
  width: 31px;
  height: 31px;
  object-fit: contain;
  transform-origin: 70% 70%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.22));
}
.brand:hover .brand-hand {
  animation: waveHand .72s ease-in-out both;
}
.brand-greeting {
  color: var(--primary);
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 950;
  letter-spacing: .01em;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(104,229,214,.36);
}
@keyframes waveHand {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(16deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(12deg); }
  80% { transform: rotate(-6deg); }
}
.brand-headline { display: none !important; }
.card-icon.lightning-s {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 31px;
  line-height: 1;
  color: #031018;
  background: linear-gradient(135deg, #bdf0bd 0%, #e9f0a1 100%);
  border-radius: 15px;
  box-shadow: 0 0 22px rgba(189, 240, 189, .26), inset 0 0 0 1px rgba(255,255,255,.34);
}
.timeline-card {
  position: relative;
  overflow: visible;
  padding-right: 48px;
}
.timeline-card::before {
  left: -31px;
  right: auto;
  top: 64px;
  margin-top: 0;
  transform: scale(1);
  opacity: 1;
  transition: left .32s cubic-bezier(.2,.8,.2,1), top .32s cubic-bezier(.2,.8,.2,1), transform .22s ease, opacity .22s ease, box-shadow .22s ease;
}
.timeline-card:hover::before,
.timeline-card:focus-within::before {
  left: calc(100% - 34px);
  top: 58px;
  transform: scale(1.08);
  opacity: 1;
}
.contact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.contact-grid span,
.contact-card .contact-grid span {
  color: var(--primary);
  text-shadow: 0 0 14px rgba(104,229,214,.22);
}
.portrait {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, rgba(0,0,0,.72) 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 82%, rgba(0,0,0,.72) 90%, transparent 100%);
}
@media (max-width: 1080px) {
  html { scroll-snap-type: y mandatory; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  html { scroll-snap-type: none; }
  .brand-resume-icon { width: 40px; height: 40px; }
  .topbar.is-hidden { transform: translateX(-50%) translateY(-14px) scale(.98); }
  .brand-hand { width: 23px; height: 23px; }
  .brand-greeting { font-size: 14px; }
  .timeline-card { padding-right: 42px; }
  .timeline-card::before { left: -31px; right: auto; top: 62px; }
  .timeline-card:hover::before,
  .timeline-card:focus-within::before { left: calc(100% - 32px); top: 56px; }
  .contact-grid { grid-template-columns: 1fr; }
}

.card-icon.lightning-s svg {
  width: 30px;
  height: 30px;
  fill: #031018;
  stroke: none;
  display: block;
}
