:root{
  --bg:#14131A;
  --panel:#1D1B25;
  --panel-2:#221F2C;
  --line: rgba(255,255,255,.09);
  --gold:#E8B04B;
  --court:#5C9DD9;
  --paper:#F4F1EA;
  --muted:#96939F;
  --radius: 4px;
}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--paper);
  font-family:'Manrope',sans-serif;
  overflow-x:hidden;
  position:relative;
}

/* ---- grain / texture overlay ---- */
#grain{
  position:fixed; inset:0; z-index:2; pointer-events:none;
  opacity:.05; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size:240px 240px;
}
@media (prefers-reduced-motion: reduce){ #grain{opacity:.035;} }

/* ---- custom cursor ---- */
@media (hover:hover) and (pointer:fine){
  body{cursor:none;}
  a, button, .work-item, .cert-card, [role="button"]{cursor:none;}
}
#cursor-dot, #cursor-ring{
  position:fixed; top:0; left:0; z-index:2000; pointer-events:none;
  border-radius:50%; transform:translate(-50%,-50%);
}
#cursor-dot{
  width:6px; height:6px; background:var(--gold);
  transition:opacity .2s ease, background .2s ease;
}
#cursor-ring{
  width:34px; height:34px; border:1px solid var(--gold); opacity:.6;
  transition:width .22s ease, height .22s ease, opacity .2s ease, border-color .2s ease, background .2s ease;
}
#cursor-ring.hover{
  width:56px; height:56px; background:rgba(232,176,75,.1); opacity:1;
}
#cursor-dot.hover{background:var(--paper);}
@media (hover:none), (pointer:coarse){
  #cursor-dot, #cursor-ring{display:none;}
}
h1,h2,h3,.display{font-family:'Fraunces',serif;}
.mono{font-family:'IBM Plex Mono',monospace;}
em{font-style:italic; color:var(--gold);}
::selection{background:var(--gold); color:#14131A;}

#scroll-progress{
  position:fixed; top:0; left:0; height:2px; width:0%; background:var(--gold);
  z-index:1100; transition:width .1s linear;
}
.nav-links a.active{color:var(--gold);}

#work, #certifications{padding-left:0; padding-right:0;}
#work .container, #certifications .container{padding:0 8vw;}

.scroll-hint{display:block; color:var(--muted); font-size:.72rem; letter-spacing:.08em; margin-top:8px;}

.gh-graph{margin-top:36px; padding-top:28px; border-top:1px solid var(--line);}
.gh-graph-label{display:block; color:var(--muted); font-size:.75rem; letter-spacing:.06em; margin-bottom:14px;}
.gh-graph img{max-width:100%; filter:saturate(.9);}

/* ---- horizontal scroll galleries ---- */
.work-scroll, .cert-scroll{
  display:flex; gap:1px; background:var(--line);
  overflow-x:auto; overflow-y:hidden; scroll-snap-type:x proximity;
  padding:0 8vw 20px; scrollbar-width:thin; scrollbar-color:var(--gold) transparent;
}
.work-scroll::-webkit-scrollbar, .cert-scroll::-webkit-scrollbar{height:5px;}
.work-scroll::-webkit-scrollbar-thumb, .cert-scroll::-webkit-scrollbar-thumb{background:var(--gold); border-radius:3px;}
.work-scroll::-webkit-scrollbar-track, .cert-scroll::-webkit-scrollbar-track{background:var(--panel-2);}

.work-item{
  flex:0 0 auto; width:min(78vw,420px); scroll-snap-align:start;
  background:var(--bg); padding:36px 32px 32px; transition:transform .3s ease, box-shadow .3s ease, background .3s ease, border-color .3s ease;
  display:flex; flex-direction:column; gap:12px; cursor:pointer;
  border-top:2px solid transparent;
}
.work-item:hover, .work-item:focus-visible{
  background:var(--panel); transform:translateY(-4px);
  box-shadow:0 18px 32px -16px rgba(0,0,0,.55);
  border-top-color:var(--gold);
}
.cert-card{
  flex:0 0 auto; width:min(72vw,300px); scroll-snap-align:start;
  background:var(--bg); padding:30px; transition:transform .3s ease, box-shadow .3s ease, background .3s ease, border-color .3s ease;
  border-top:2px solid transparent;
}
.cert-card:hover{
  background:var(--panel); transform:translateY(-4px);
  box-shadow:0 18px 32px -16px rgba(0,0,0,.55);
  border-top-color:var(--gold);
}

section{position:relative; padding:130px 8vw 80px;}
.container{max-width:1040px; margin:0 auto;}

/* court-line divider: the signature motif */
.court-divider{
  position:relative; height:1px; margin:0 8vw;
  background:linear-gradient(to right, transparent, rgba(232,176,75,.55) 20%, var(--gold) 50%, rgba(232,176,75,.55) 80%, transparent);
  opacity:.7;
}
.court-divider::before{
  content:''; position:absolute; left:50%; top:-3px; width:7px; height:7px;
  background:var(--gold); border-radius:50%; transform:translateX(-50%);
  box-shadow:0 0 10px 1px rgba(232,176,75,.6);
}

/* ---- nav ---- */
nav{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 8vw; background:linear-gradient(to bottom, rgba(20,19,26,.92), rgba(20,19,26,0));
  backdrop-filter:blur(6px);
}
.nav-name{font-family:'Fraunces',serif; font-weight:600; font-size:1.05rem; text-decoration:none; color:var(--paper);}
.nav-links{display:flex; gap:28px; list-style:none;}
.nav-links a{color:var(--muted); text-decoration:none; font-size:.82rem; font-family:'IBM Plex Mono',monospace; letter-spacing:.03em; transition:color .2s; position:relative; padding-bottom:3px;}
.nav-links a::after{
  content:''; position:absolute; left:0; bottom:0; width:0; height:1px;
  background:var(--gold); transition:width .25s ease;
}
.nav-links a:hover{color:var(--gold);}
.nav-links a:hover::after, .nav-links a.active::after{width:100%;}
.nav-links li{display:inline;}
@media(max-width:760px){ .nav-links{display:none;} }

/* ---- eyebrow / score labels : the running-score signature ---- */
.score-label{
  display:inline-flex; align-items:center; gap:10px;
  font-family:'IBM Plex Mono',monospace; font-size:.78rem; letter-spacing:.14em;
  text-transform:uppercase; color:var(--gold); margin-bottom:22px;
}
.score-label::before{content:''; width:22px; height:1px; background:var(--gold);}

/* ---- hero ---- */
.hero{min-height:100vh; display:flex; align-items:center; padding-top:0; position:relative; overflow:hidden;}
.hero-aura{position:absolute; inset:-15% -10%; z-index:0; pointer-events:none;}
.hero-aura::before, .hero-aura::after{
  content:''; position:absolute; border-radius:50%; filter:blur(90px);
}
.hero-aura::before{
  width:440px; height:440px; top:-60px; left:6%;
  background:radial-gradient(circle, rgba(232,176,75,.30), transparent 70%);
  animation:auraDrift 16s ease-in-out infinite;
}
.hero-aura::after{
  width:380px; height:380px; bottom:-100px; right:4%;
  background:radial-gradient(circle, rgba(92,157,217,.24), transparent 70%);
  animation:auraDrift 20s ease-in-out infinite reverse;
}
.hero-aura svg{position:absolute; inset:0; width:100%; height:100%; opacity:.5;}
@keyframes auraDrift{
  0%,100%{transform:translate(0,0) scale(1);}
  50%{transform:translate(26px,-18px) scale(1.08);}
}
@media (prefers-reduced-motion: reduce){ .hero-aura::before, .hero-aura::after{animation:none;} }
.hero .container{position:relative; z-index:1;}
.hero-grid{display:grid; grid-template-columns:1.3fr .7fr; gap:60px; align-items:end;}
.hero h1{font-size:clamp(2.6rem,6.4vw,4.6rem); line-height:1.06; font-weight:600; margin-bottom:26px;}
.name-hl{color:var(--court); font-size:1.08em;}
.hero p{color:var(--muted); font-size:1.08rem; line-height:1.75; max-width:520px; margin-bottom:34px;}
.currently{color:var(--court); font-size:.82rem; margin-top:-22px; margin-bottom:34px; letter-spacing:.02em; display:flex; align-items:center; gap:9px;}
.currently::before{
  content:''; width:7px; height:7px; border-radius:50%; background:var(--court); flex-shrink:0;
  animation:livePulse 2.2s ease-in-out infinite;
}
@keyframes livePulse{
  0%,100%{box-shadow:0 0 0 0 rgba(92,157,217,.5);}
  50%{box-shadow:0 0 0 5px rgba(92,157,217,0);}
}
@media (prefers-reduced-motion: reduce){ .currently::before{animation:none;} }
.location{font-family:'IBM Plex Mono',monospace; font-size:.85rem; color:var(--muted); margin-bottom:18px; display:block;}
.hero-side{border-left:1px solid var(--line); padding-left:32px;}
.hero-photo-wrap{margin-bottom:30px;}
.hero-photo{
  width:100%; aspect-ratio:4/5; object-fit:cover; border-radius:var(--radius);
  border:1px solid var(--line); display:block;
  filter:grayscale(35%) sepia(8%) contrast(105%) brightness(.94);
  opacity:0; transform:scale(1.04); transition:opacity .7s ease, transform .8s ease;
}
.hero-photo.loaded{opacity:1; transform:scale(1);}
.hero-side .stat{margin-bottom:26px;}
.hero-side .stat b{display:block; font-family:'Fraunces',serif; font-size:1.8rem; font-weight:600; color:var(--gold);}
.hero-side .stat span{color:var(--muted); font-size:.82rem;}
.link-row{display:flex; flex-wrap:wrap; gap:18px; margin-top:6px;}
.link-row a{
  color:var(--paper); text-decoration:none; font-size:.86rem; font-family:'IBM Plex Mono',monospace;
  border-bottom:1px solid var(--line); padding-bottom:3px; transition:.2s;
}
.link-row a:hover{color:var(--gold); border-color:var(--gold);}
@media(max-width:820px){ .hero-grid{grid-template-columns:1fr;} .hero-side{border-left:none; border-top:1px solid var(--line); padding-left:0; padding-top:28px; display:flex; gap:40px; flex-wrap:wrap;} .hero-photo-wrap{flex-basis:170px; margin-bottom:0;} .hero-photo{aspect-ratio:4/5;} }

/* ---- section head ---- */
.section-head{margin-bottom:52px; max-width:640px;}
.section-head h2{font-size:clamp(1.9rem,4vw,2.5rem); font-weight:600;}

/* ---- about ---- */
.about-text{color:var(--muted); font-size:1.05rem; line-height:1.85; max-width:680px;}
.about-text strong{color:var(--paper); font-weight:600;}

/* ---- work (item internals; container rules are in the horizontal-scroll block above) ---- */
.work-badge{font-family:'IBM Plex Mono',monospace; font-size:.78rem; color:var(--gold);}
.work-item h3{font-size:1.3rem; font-weight:600;}
.work-item p{color:var(--muted); line-height:1.65; flex:1;}
.work-tags{display:flex; gap:8px; flex-wrap:wrap;}
.work-tags span{font-size:.72rem; color:var(--court); border:1px solid rgba(92,157,217,.35); padding:4px 10px; border-radius:999px;}
.work-item a.wlink{color:var(--paper); text-decoration:none; font-size:.85rem; font-family:'IBM Plex Mono',monospace; border-bottom:1px solid var(--gold); align-self:flex-start;}

/* ---- skills ---- */
.skills-wrap{display:flex; flex-direction:column; gap:22px;}
.skill-row{display:grid; grid-template-columns:180px 1fr; align-items:center; gap:20px; border-bottom:1px solid var(--line); padding-bottom:20px;}
.skill-row .sname{font-family:'Fraunces',serif; font-size:1.15rem;}
.skill-row .sstatus{font-family:'IBM Plex Mono',monospace; font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);}
.meter{height:4px; background:var(--panel-2); border-radius:2px; overflow:hidden;}
.meter i{display:block; height:100%; background:var(--gold);}
.skill-row.progress .meter i{background:var(--court);}
.skill-row.progress .sstatus{color:var(--court);}
@media(max-width:640px){ .skill-row{grid-template-columns:1fr; gap:8px;} }

/* ---- certifications (card internals; container rules are in the horizontal-scroll block above) ---- */
.cert-card h3{font-size:1.1rem; font-weight:600; margin-bottom:6px;}
.cert-card .cert-org{color:var(--court); font-size:.78rem; font-family:'IBM Plex Mono',monospace; margin-bottom:12px; letter-spacing:.02em;}
.cert-card p{color:var(--muted); font-size:.9rem; line-height:1.65;}


/* ---- journey (match points) ---- */
.timeline{display:flex; flex-direction:column;}
.t-item{
  display:grid; grid-template-columns:150px 1fr; gap:24px;
  padding:26px 0 26px 22px; border-top:1px solid var(--line); position:relative;
}
.t-item::before{
  content:''; position:absolute; left:0; top:34px; width:9px; height:9px; border-radius:50%;
  background:var(--muted);
}
.t-item[data-type="hackathon"]::before{background:var(--gold); box-shadow:0 0 8px 1px rgba(232,176,75,.5);}
.t-item[data-type="sports"]::before{background:var(--court); box-shadow:0 0 8px 1px rgba(92,157,217,.45);}
.t-item[data-type="academic"]::before{background:var(--paper);}
.t-item:last-child{border-bottom:1px solid var(--line);}
.t-item .when{font-family:'IBM Plex Mono',monospace; font-size:.78rem; color:var(--gold); padding-top:3px;}
.t-item h3{font-size:1.05rem; margin-bottom:6px; font-weight:600;}
.t-item p{color:var(--muted); font-size:.92rem; line-height:1.65;}
@media(max-width:640px){ .t-item{grid-template-columns:1fr; gap:6px;} }

/* ---- contact / game point ---- */
.contact-panel{
  border:1px solid var(--line); padding:64px 48px; text-align:center;
  background:radial-gradient(circle at 50% 0%, rgba(232,176,75,.08), transparent 60%);
}
.contact-panel h2{font-size:clamp(2rem,5vw,3rem); margin-bottom:18px; font-weight:600;}
.contact-panel p{color:var(--muted); max-width:480px; margin:0 auto 34px; line-height:1.7;}
.contact-links{display:flex; justify-content:center; gap:26px; flex-wrap:wrap;}
.contact-links a{
  color:var(--paper); text-decoration:none; font-family:'IBM Plex Mono',monospace; font-size:.9rem;
  padding-bottom:4px; border-bottom:1px solid var(--line); transition:.2s;
}
.contact-links a:hover{color:var(--gold); border-color:var(--gold);}

footer{text-align:center; padding:44px; color:var(--muted); font-size:.78rem; font-family:'IBM Plex Mono',monospace;}

/* ---- reveal on scroll ---- */
.reveal{opacity:0; transform:translateY(28px); transition:opacity .7s ease, transform .7s ease;}
.reveal.in{opacity:1; transform:translateY(0);}

/* stagger children within a group by 70ms per item */
.work-scroll .reveal:nth-child(1),
.cert-scroll .reveal:nth-child(1),
.skills-wrap .reveal:nth-child(1),
.timeline .reveal:nth-child(1),
.about-text.reveal:nth-of-type(1){transition-delay:0ms;}
.work-scroll .reveal:nth-child(2),
.cert-scroll .reveal:nth-child(2),
.skills-wrap .reveal:nth-child(2),
.timeline .reveal:nth-child(2),
.about-text.reveal:nth-of-type(2){transition-delay:70ms;}
.cert-scroll .reveal:nth-child(3),
.skills-wrap .reveal:nth-child(3),
.timeline .reveal:nth-child(3){transition-delay:140ms;}
.cert-scroll .reveal:nth-child(4),
.skills-wrap .reveal:nth-child(4),
.timeline .reveal:nth-child(4){transition-delay:210ms;}
.skills-wrap .reveal:nth-child(5){transition-delay:280ms;}
.skills-wrap .reveal:nth-child(6){transition-delay:350ms;}
.skills-wrap .reveal:nth-child(7){transition-delay:420ms;}
@media (prefers-reduced-motion: reduce){
  .work-scroll .reveal, .cert-scroll .reveal, .skills-wrap .reveal, .timeline .reveal, .about-text.reveal{transition-delay:0ms;}
}

/* ---- scroll cue on hero ---- */
.scroll-cue{
  position:absolute; bottom:36px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  color:var(--muted); text-decoration:none; font-size:.72rem; letter-spacing:.12em; text-transform:uppercase;
  animation:bounce 2.4s ease-in-out infinite; transition:color .2s;
}
.scroll-cue:hover{color:var(--gold);}
@keyframes bounce{
  0%,100%{transform:translate(-50%,0);}
  50%{transform:translate(-50%,8px);}
}

/* ---- back to top ---- */
#back-to-top{
  position:fixed; bottom:28px; right:28px; width:44px; height:44px; border-radius:50%;
  background:var(--panel); border:1px solid var(--line); color:var(--paper);
  display:flex; align-items:center; justify-content:center; text-decoration:none; font-size:1.1rem;
  opacity:0; pointer-events:none; transform:translateY(8px);
  transition:opacity .3s, transform .3s, border-color .3s, color .3s; z-index:900;
}
#back-to-top.show{opacity:1; pointer-events:auto; transform:translateY(0);}
#back-to-top:hover{border-color:var(--gold); color:var(--gold);}

@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1; transform:none; transition:none;}
  html{scroll-behavior:auto;}
  .scroll-cue{animation:none;}
}

/* ---- project case-study modal ---- */
.project-modal{
  position:fixed; inset:0; z-index:1200;
  display:flex; align-items:center; justify-content:center; padding:24px;
  opacity:0; pointer-events:none; transition:opacity .25s ease;
}
.project-modal.open{opacity:1; pointer-events:auto;}
.pm-backdrop{
  position:absolute; inset:0; background:rgba(10,9,14,.72); backdrop-filter:blur(3px);
}
.pm-panel{
  position:relative; z-index:1; width:min(560px,100%); max-height:85vh; overflow:auto;
  background:var(--panel); border:1px solid var(--line); border-top:2px solid var(--gold);
  border-radius:var(--radius); padding:40px 36px;
  transform:translateY(16px); transition:transform .25s ease;
}
.project-modal.open .pm-panel{transform:translateY(0);}
.pm-close{
  position:absolute; top:16px; right:16px; width:34px; height:34px; border-radius:50%;
  background:transparent; border:1px solid var(--line); color:var(--muted);
  display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:1rem;
  transition:.2s;
}
.pm-close:hover{color:var(--gold); border-color:var(--gold);}
.pm-panel h3{font-size:1.5rem; margin-bottom:18px; padding-right:30px;}
.pm-field{margin-bottom:16px;}
.pm-field .pm-label{
  display:block; font-family:'IBM Plex Mono',monospace; font-size:.72rem; letter-spacing:.1em;
  text-transform:uppercase; color:var(--gold); margin-bottom:6px;
}
.pm-field p{color:var(--muted); font-size:.94rem; line-height:1.6;}

