/* Luca Pishos — Personal Site
   Dark editorial theme. Fraunces (display) + Inter (text). */

:root{
  --bg:         #0c0b09;
  --bg-alt:     #131110;
  --card:       #18160f;
  --ink:        #f3efe4;
  --ink-soft:   #b3ab99;
  --ink-faint:  #746c5c;
  --line:       #2a271e;
  --line-soft:  #221f18;
  --gold:       #d8b273;
  --sage:       #93ac83;
  --warn:       #c9836b;

  --footer-bg:  #060605;
  --footer-line:#211e17;
  --footer-ink: #f3efe4;
  --footer-label:#847c67;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1120px;
  --radius: 10px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* subtle film-grain texture, kept very low-opacity so it reads as depth, not noise */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4{
  font-family: var(--serif);
  font-weight: 560;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

p{ margin: 0 0 1em; }
p:last-child{ margin-bottom: 0; }

.amp{ font-family: var(--sans); font-style: normal; }

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

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

ul{ margin: 0; padding: 0; list-style: none; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

.skip-link{
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; z-index: 200; border-radius: 0 0 6px 0;
}
.skip-link:focus{ left: 0; }

/* ---------- section rhythm ---------- */

.section{ padding: 100px 0; position: relative; z-index: 1; }
.section-alt{ background: var(--bg-alt); }

.section-label{
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
.section-label-light{ color: var(--gold); }

.section-title{
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
  margin-bottom: 44px;
}

/* ---------- reveal on scroll ---------- */

.reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible{ opacity: 1; transform: none; }

/* ---------- buttons ---------- */

.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-primary{
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover{ background: var(--gold); transform: translateY(-1px); }

.btn-outline{
  background: transparent;
  border-color: rgba(243, 239, 228, 0.3);
  color: var(--ink);
}
.btn-outline:hover{ background: var(--ink); color: var(--bg); border-color: var(--ink); }

.btn-small{ padding: 8px 18px; font-size: 0.85rem; }

/* ---------- header / nav ---------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 11, 9, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}

.brand{
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.25rem;
  color: var(--ink);
}

.nav-bar nav{ display: contents; }

.nav-links{
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a{
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.nav-links a:hover{ color: var(--ink); }

/* The Resume link is styled as an outline button, but .nav-links a's own
   color rule and its :hover rule both out-specificity .btn-outline's —
   without these, the base text is dimmed to --ink-soft instead of white,
   and on hover the background flips to white while .nav-links a:hover keeps
   forcing the text to --ink too, so the whole button goes white-on-white. */
.nav-links a.nav-resume{ color: var(--ink); }
.nav-links a.nav-resume:hover{ color: var(--bg); }

.spade-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--gold);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.4) rotate(-14deg);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.spade-btn.is-revealed{
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.spade-btn.is-revealed:hover{
  color: #f2c766;
  transform: scale(1.1);
}

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span{
  display: block; height: 2px; width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2){ opacity: 0; }
.nav-toggle.is-active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero{
  padding-top: 76px;
  position: relative;
  overflow: hidden;
}

/* soft, low-opacity color bloom behind the portrait — depth without a glow gimmick */
.hero::before{
  content: "";
  position: absolute;
  top: -10%;
  right: -6%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(216, 178, 115, 0.14) 0%, rgba(216, 178, 115, 0) 68%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid{
  display: grid;
  grid-template-columns: 1.25fr 0.8fr;
  gap: 60px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 70px;
}

.hero-copy h1{
  font-size: clamp(2.6rem, 1.9rem + 3vw, 4.3rem);
  line-height: 1.04;
}

.hero-role{
  font-family: var(--serif);
  font-style: normal;
  font-weight: 560;
  letter-spacing: -0.01em;
  font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem);
  color: var(--gold);
  margin-top: 12px;
  margin-bottom: 8px;
}

.hero-subrole{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 440;
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin-bottom: 22px;
}

.hero-typed-cursor{
  display: inline-block;
  width: 2px;
  margin-left: 2px;
  background: var(--gold);
  animation: hero-typed-blink 0.85s step-end infinite;
}

@keyframes hero-typed-blink{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0; }
}

@media (prefers-reduced-motion: reduce){
  .hero-typed-cursor{ animation: none; }
}

.hero-cta{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 32px 0 0;
}

.icon{
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-fill{
  fill: currentColor;
  stroke: none;
}

.hero-photo{
  justify-self: center;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 1;
}
.hero-photo img{
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ---------- timeline / experience ---------- */

.timeline{
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.timeline-item{
  padding: 36px 20px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.timeline-item:hover{
  background-color: rgba(255, 255, 255, 0.025);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -20px rgba(0, 0, 0, 0.45);
}

.timeline-item--jet{
  position: relative;
  overflow: hidden;
}

.timeline-jet{
  position: absolute;
  top: 50%;
  right: 24px;
  width: 220px;
  height: auto;
  fill: var(--gold);
  opacity: 0;
  transform: translate(-24px, calc(-50% + 14px));
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.timeline-item--jet:hover .timeline-jet{
  opacity: 0.4;
  transform: translate(0, calc(-50% + 14px));
}

.timeline-item--jet .timeline-head,
.timeline-item--jet ul,
.timeline-item--jet .tag-row{
  position: relative;
  z-index: 1;
}

@media (max-width: 880px){
  .timeline-jet{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  .timeline-jet{ transition: opacity 0.4s ease; transform: translate(0, calc(-50% + 14px)); }
}

.timeline-item--neuron{
  position: relative;
  overflow: hidden;
}

.timeline-neuron{
  position: absolute;
  top: 50%;
  right: 68px;
  width: 119px;
  height: auto;
  fill: var(--gold);
  opacity: 0;
  transform: translate(-24px, -50%) rotate(45deg);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.timeline-item--neuron:hover .timeline-neuron{
  opacity: 0.4;
  transform: translate(0, -50%) rotate(45deg);
}

.timeline-item--neuron .timeline-head,
.timeline-item--neuron ul,
.timeline-item--neuron .tag-row{
  position: relative;
  z-index: 1;
}

@media (max-width: 880px){
  .timeline-neuron{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  .timeline-neuron{ transition: opacity 0.4s ease; transform: translate(0, -50%) rotate(45deg); }
}

.timeline-item--globe{
  position: relative;
  overflow: hidden;
}

.timeline-globe{
  position: absolute;
  top: 50%;
  right: 56px;
  width: 184px;
  height: auto;
  fill: var(--gold);
  opacity: 0;
  transform: translate(-24px, -50%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.timeline-item--globe:hover .timeline-globe{
  opacity: 0.4;
  transform: translate(0, -50%);
}

.timeline-item--globe .timeline-head,
.timeline-item--globe ul,
.timeline-item--globe .tag-row{
  position: relative;
  z-index: 1;
}

@media (max-width: 880px){
  .timeline-globe{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  .timeline-globe{ transition: opacity 0.4s ease; transform: translate(0, -50%); }
}

.timeline-item--road{
  position: relative;
  overflow: hidden;
}

.timeline-road{
  position: absolute;
  top: 50%;
  right: 81px;
  width: 135px;
  height: auto;
  fill: var(--gold);
  opacity: 0;
  transform: translate(-24px, calc(-50% + 10px));
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.timeline-item--road:hover .timeline-road{
  opacity: 0.4;
  transform: translate(0, calc(-50% + 10px));
}

.timeline-item--road .timeline-head,
.timeline-item--road ul,
.timeline-item--road .tag-row{
  position: relative;
  z-index: 1;
}

@media (max-width: 880px){
  .timeline-road{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  .timeline-road{ transition: opacity 0.4s ease; transform: translate(0, calc(-50% + 10px)); }
}

.timeline-item--robot{
  position: relative;
  overflow: hidden;
}

.timeline-robot{
  position: absolute;
  top: 50%;
  right: 54px;
  width: 164px;
  height: auto;
  fill: var(--gold);
  opacity: 0;
  transform: translate(-24px, calc(-50% + 12px));
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.timeline-item--robot:hover .timeline-robot{
  opacity: 0.4;
  transform: translate(0, calc(-50% + 12px));
}

.timeline-item--robot .timeline-head,
.timeline-item--robot ul,
.timeline-item--robot .tag-row{
  position: relative;
  z-index: 1;
}

@media (max-width: 880px){
  .timeline-robot{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  .timeline-robot{ transition: opacity 0.4s ease; transform: translate(0, calc(-50% + 12px)); }
}

.timeline-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 14px;
}
.timeline-head-main{
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.org-logo{
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
  background: #fff;
}
.timeline-head h3{
  font-size: 1.3rem;
}
.timeline-org{
  color: var(--gold);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 4px 0 0;
}
.timeline-date{
  font-size: 0.85rem;
  color: var(--ink-faint);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-item ul{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.timeline-item li{
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  max-width: 78ch;
}
.timeline-item li::before{
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
}

/* shared bullet style — used for project and leadership bullet lists too */
.bullet-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullet-list li{
  position: relative;
  padding-left: 20px;
}
.bullet-list li::before{
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.tag-row{ display: flex; flex-wrap: wrap; gap: 8px; }
.skill-group .tag-row{ max-width: 230px; }
.tag{
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
}
.section-alt .tag{ background: var(--bg); }

/* ---------- projects ---------- */

.project-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover{
  border-color: var(--line-soft);
  transform: translateY(-3px);
}

.project-media{
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-alt);
}
.project-media img{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.96);
}
.project-body{
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.project-body h3{
  font-size: 1.08rem;
  line-height: 1.35;
}
.project-body p,
.project-body .bullet-list{
  color: var(--ink-soft);
  font-size: 0.94rem;
}
.project-body .bullet-list{ margin-bottom: 2px; }

.pill{
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sage);
  background: rgba(147, 172, 131, 0.12);
  padding: 5px 11px;
  border-radius: 999px;
}
.project-link{
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gold);
  padding-top: 4px;
}
.project-link:hover{ text-decoration: underline; }

/* ---------- skills ---------- */

.skills-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 54px;
}
.skill-group h3{
  font-size: 0.9rem;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

/* ---------- blackjack easter egg ----------
   Revealed by the hidden spade button (type answer(21) in devtools — see
   js/main.js / js/blackjack.js). The game is stacked on top of the skills
   copy inside the same box, so the section's height never changes whether
   the tags or the table are showing. */

.skills-stage{ position: relative; }

.skills-content.is-hidden{ visibility: hidden; }

#skillsContent .section-label,
#skillsContent .section-title,
#skillsContent .skill-group h3,
#skillsContent .tag{
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#skillsContent .bj-sweep-out{
  opacity: 0 !important;
  transform: translate(var(--bj-dx, 0px), var(--bj-dy, -24px)) rotate(var(--bj-rot, 0deg)) !important;
}

.blackjack{
  position: absolute;
  inset: 0;
  display: flex;
  padding: 6px;
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.blackjack.is-active{
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.bj-panel{
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 640px;
  margin: auto;
  background:
    radial-gradient(ellipse 140% 90% at 50% -12%, rgba(216, 178, 115, 0.07), transparent 55%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 24px 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.bj-close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.bj-close:hover{ color: var(--ink); border-color: var(--gold); }
.bj-close:active{ transform: scale(0.9); }

.bj-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-right: 30px;
  flex: none;
}
.bj-title{
  display: inline-flex;
  align-items: baseline;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}
.bj-title-suit{
  color: var(--gold);
  margin-right: 9px;
  font-size: 0.85em;
}
.bj-balance{
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  font-family: var(--sans);
}
.bj-balance-label{
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
#bjBalance{
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gold);
}

.bj-bet{
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  font-family: var(--sans);
}
.bj-bet[hidden]{ display: none; }
#bjBet{
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
}

.bj-body{
  flex: 1;
  display: flex;
  gap: 26px;
  min-height: 0;
}

.bj-table{
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}

.bj-seat{ position: relative; text-align: center; flex: none; }
.bj-seat-label{
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.bj-total{
  color: var(--gold);
  font-weight: 700;
  margin-left: 6px;
}
.bj-hand{
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 66px;
}

.bj-card{
  width: 47px;
  height: 66px;
  flex: none;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
}
.bj-card-rank{ font-size: 1.1rem; line-height: 1.1; }
.bj-card-suit{ font-size: 1.2rem; line-height: 1.1; margin-top: 2px; }
.bj-card-red{ color: var(--warn); }
.bj-card-back{
  background-image: repeating-linear-gradient(135deg, var(--line-soft), var(--line-soft) 4px, var(--bg-alt) 4px, var(--bg-alt) 8px);
  border-color: var(--gold);
}
.bj-card-ghost{
  border-style: dashed;
  border-color: var(--line);
  background: transparent;
  box-shadow: none;
}
.bj-card-ghost .bj-card-suit{
  font-size: 1.3rem;
  color: var(--line-soft);
  margin-top: 0;
}

@keyframes bj-card-deal{
  from{ opacity: 0; transform: translateY(-18px) scale(0.85); }
  to{ opacity: 1; transform: none; }
}
.bj-card-deal{
  animation: bj-card-deal 0.51s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bj-message{
  position: relative;
  margin: 0;
  padding: 4px 0;
  max-width: 260px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
  min-height: 1.4em;
}
.bj-message-sub{
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.bj-outcome-win,
.bj-outcome-lose{
  font-weight: 700;
  font-size: 1.4em;
}
.bj-outcome-win{ color: var(--sage); }
.bj-outcome-lose{ color: var(--warn); }

.bj-rules{
  margin: 0;
  padding: 0;
  max-width: 240px;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--ink-faint);
  opacity: 0.75;
}
.bj-rules[hidden]{ display: none; }

@keyframes bj-message-pop{
  from{ opacity: 0; transform: translateY(-4px); }
  to{ opacity: 1; transform: none; }
}
.bj-message-pop{
  animation: bj-message-pop 0.3s ease both;
}

@keyframes bj-pop-in{
  from{ opacity: 0; transform: translateY(6px); }
  to{ opacity: 1; transform: none; }
}
.bj-pop-in{
  animation: bj-pop-in 0.3s ease both;
}

.bj-controls{
  flex: 0 0 152px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
  overflow-y: auto;
}

.bj-bet-row{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.bj-chip-row{ display: flex; flex-direction: column; align-items: center; gap: 11px; }
.bj-chip{
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  border: 2px dashed var(--gold);
  background: var(--bg);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease, color 0.15s ease;
}
.bj-chip:hover:not(:disabled){ transform: translateY(-2px); }
.bj-chip:active:not(:disabled){ transform: scale(0.9); }
.bj-chip.is-selected{ background: var(--gold); color: var(--bg); border-style: solid; }
.bj-chip:disabled{ opacity: 0.35; cursor: not-allowed; transform: none; }

.bj-action-row{ display: flex; flex-direction: column; gap: 12px; }

.bj-btn{
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bj-btn-primary{ background: var(--gold); color: var(--bg); }
.bj-btn-primary:hover{ transform: translateY(-1px); }
.bj-btn-outline{ background: transparent; border-color: rgba(243, 239, 228, 0.3); color: var(--ink); }
.bj-btn-outline:hover{ background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bj-btn:active:not(:disabled){ transform: scale(0.96); }
.bj-btn:disabled{ opacity: 0.35; cursor: not-allowed; transform: none; }

.bj-controls .bj-btn{
  width: 100%;
  font-size: 0.85rem;
  padding: 11px 12px;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
}

.bj-waiting,
.bj-outof{
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--ink-faint);
}

.bj-chip-hint{
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--ink-faint);
}

@media (max-width: 560px){
  .bj-body{ flex-direction: column; gap: 16px; }
  .bj-controls{
    flex: none;
    flex-direction: row;
    justify-content: center;
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }
  .bj-bet-row{ flex-direction: row; align-items: center; }
  .bj-chip-row{ flex-direction: row; }
  .bj-action-row{ flex-direction: row; }
  .bj-controls .bj-btn{ width: auto; }
}

@media (max-width: 460px){
  .bj-panel{ padding: 16px 18px 18px; max-height: none; }
  .bj-card{ width: 38px; height: 53px; }
  .bj-card-rank{ font-size: 0.9rem; }
  .bj-card-suit{ font-size: 1rem; }
  .bj-card-ghost .bj-card-suit{ font-size: 1.05rem; }
}

/* ---------- leadership ---------- */

.leadership-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 42px 44px;
}

.leadership-card-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 16px;
}
.leadership-card-head h3{
  font-size: 1.55rem;
}
.leadership-org{
  color: var(--gold);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  margin: 6px 0 0;
}

.leadership-desc{
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 68ch;
  margin-bottom: 32px;
}

.leadership-stats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 28px;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
}
.lstat{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lstat-num{
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 560;
  color: var(--gold);
  line-height: 1;
}
.lstat-num .stat-unit{ font-size: 0.65em; opacity: 0.85; }
.lstat-label{
  font-size: 0.83rem;
  color: var(--ink-faint);
  line-height: 1.4;
}

.leadership-tags{ padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- education ---------- */

.edu-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
}
.edu-main{ padding: 38px 40px; }
.edu-degree{ font-size: 1.25rem; margin-bottom: 6px; }
.edu-school{ color: var(--gold); font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.edu-meta{ color: var(--ink-soft); font-size: 0.9rem; }
.edu-accel{ color: var(--ink-faint); font-size: 0.85em; }
.edu-dot{ color: var(--ink-faint); margin: 0 4px; }
.edu-sub{
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px;
}
.edu-courses{
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.edu-courses p:last-child{
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 64ch;
}
.edu-honors{
  padding: 38px 36px;
  border-left: 1px solid var(--line);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.edu-honors li{
  padding: 18px 0 18px 16px;
  border-left: 2px solid var(--gold);
}
.edu-honors li + li{ margin-top: 14px; }
.edu-honor-name{
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 560;
  line-height: 1.25;
  color: var(--gold);
  margin: 0 0 6px;
}
.edu-honor-note{
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---------- footer ---------- */

.site-footer{
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 90px 0 30px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--footer-line);
}
.footer-title{
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem);
  color: var(--footer-ink);
  margin: 4px 0 0;
}

/* ---------- visitor ping ---------- */

.visit-ping{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ping-intro{
  font-size: 0.88rem;
  color: var(--footer-label);
  max-width: 320px;
  text-align: center;
  margin: 0;
}

.ping-panel{
  width: 100%;
  max-width: 200px;
  animation: pingIn 0.22s ease;
}
@keyframes pingIn{
  from{ opacity: 0; transform: translateY(-6px); }
  to{ opacity: 1; transform: none; }
}

.ping-form{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ping-form input{
  width: 100%;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--footer-ink);
  background: var(--bg-alt);
  border: 1px solid var(--footer-line);
  border-radius: 7px;
  padding: 7px 10px;
  transition: border-color 0.15s ease;
}
.ping-form input::placeholder{ color: var(--footer-label); }
.ping-form input:focus{
  outline: none;
  border-color: var(--gold);
}
.ping-form input.has-error{
  border-color: var(--warn);
}

.ping-field{
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ping-field-error{
  font-size: 0.76rem;
  color: var(--warn);
  padding-left: 2px;
}

.ping-actions{
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.ping-actions .btn{
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.ping-actions .btn.is-sent,
.ping-actions .btn.is-limited{
  background: transparent;
  border-color: var(--footer-line);
  color: var(--footer-label);
  cursor: default;
  pointer-events: none;
}
.ping-actions .btn.is-sent:hover,
.ping-actions .btn.is-limited:hover{
  background: transparent;
  transform: none;
}

.contact-icons{
  display: flex;
  align-items: center;
  gap: 14px;
}
.contact-icons a{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--footer-line);
  color: var(--footer-ink);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.contact-icons a:hover{
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.contact-icons .icon{ width: 22px; height: 22px; }

.footer-bottom{
  padding-top: 26px;
  font-size: 0.85rem;
  color: var(--footer-label);
  text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 880px){
  .hero-grid{ grid-template-columns: 1fr; gap: 40px; }
  .hero-photo{ order: -1; max-width: 220px; }
  .project-grid{ grid-template-columns: 1fr; }
  .skills-grid{ grid-template-columns: repeat(2, 1fr); }
  .leadership-stats{ grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

@media (max-width: 680px){
  .nav-toggle{ display: flex; }
  .nav-links{
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.is-open{ max-height: 400px; }
  .nav-links li{ width: 100%; }
  .nav-links a{ display: block; padding: 14px 28px; }
  .nav-links a.nav-resume{ margin: 6px 28px 16px; padding: 10px 18px; width: fit-content; }

  .section{ padding: 70px 0; }
  .timeline-head{ flex-direction: column; align-items: flex-start; }
  .skills-grid{ grid-template-columns: 1fr; gap: 26px; }
  .edu-card{ grid-template-columns: 1fr; }
  .edu-main{ padding: 28px 24px; }
  .edu-honors{ padding: 26px 24px; border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
  .leadership-card{ padding: 30px 24px; }
  .leadership-card-head{ flex-direction: column; align-items: flex-start; }
}
