/* ==========================================================================
   TOKENS
   ========================================================================== */
:root{
  --void:        #0d0a1a;
  --deep:        #1a1330;
  --deep-2:      #241a42;
  --purple:      #4c3a86;
  --lavender:    #a996e0;
  --lavender-2:  #cbb8f7;
  --starlight:   #f4f0ff;
  --muted:       #b3a8d0;
  --glow:        #b48cff;
  --line:        rgba(244,240,255,0.14);

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 64px);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--void);
  color: var(--starlight);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3{ margin:0; font-family: var(--serif); font-weight: 500; }

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

::selection{ background: var(--purple); color: var(--starlight); }

/* faint grain overlay for atmosphere */
.grain{
  position: fixed; inset:0; pointer-events:none; z-index: 500;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%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");
}

.wrap{ max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.wrap--wide{ max-width: 1440px; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav{
  position: fixed; top:0; left:0; right:0; z-index: 200;
  display:flex; align-items:center; justify-content:space-between;
  padding: 22px var(--pad);
  transition: background .4s ease, padding .4s ease, backdrop-filter .4s ease;
}
.nav.is-scrolled{
  background: rgba(13,10,26,0.72);
  backdrop-filter: blur(10px);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.nav__mark{
  font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.02em;
  color: var(--starlight);
}
.nav__links{ display:flex; gap: 34px; }
.nav__links a{
  font-size: 0.92rem; color: var(--muted); position:relative; padding-bottom:2px;
  transition: color .25s ease;
}
.nav__links a:hover{ color: var(--starlight); }
.nav__links a::after{
  content:""; position:absolute; left:0; bottom:-4px; width:0; height:1px;
  background: var(--lavender-2); transition: width .3s ease;
}
.nav__links a:hover::after{ width:100%; }

.nav__toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width: 34px; height: 34px; background:none; border:none; cursor:pointer; z-index: 210;
}
.nav__toggle span{ display:block; height:1px; width:100%; background: var(--starlight); transition: transform .3s ease, opacity .3s ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position: relative;
  height: 100svh; min-height: 560px;
  display:flex; align-items:flex-end;
  overflow:hidden;
  background: radial-gradient(120% 90% at 50% 12%, #2c2050 0%, #16102c 55%, #0d0a1a 100%);
}
.hero__video{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit: cover; object-position: center;
  opacity: 0.85;
}
.hero__scrim{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(13,10,26,0.25) 0%, rgba(13,10,26,0.15) 35%, rgba(13,10,26,0.55) 78%, rgba(13,10,26,0.96) 100%),
    linear-gradient(90deg, rgba(13,10,26,0.35) 0%, transparent 30%, transparent 70%, rgba(13,10,26,0.35) 100%);
}
.hero__stars{
  position:absolute; inset:0; pointer-events:none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 25% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 22%, #fff, transparent),
    radial-gradient(1px 1px at 60% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 75% 25%, #fff, transparent),
    radial-gradient(1px 1px at 88% 15%, #fff, transparent),
    radial-gradient(1px 1px at 95% 35%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 8% 35%, #fff, transparent),
    radial-gradient(1px 1px at 55% 5%, #fff, transparent);
  opacity: 0.55;
  animation: twinkle 6s ease-in-out infinite;
}
@keyframes twinkle{ 0%,100%{ opacity:0.35; } 50%{ opacity:0.75; } }

.hero__content{
  position: relative; z-index: 2;
  width:100%;
  padding: 0 var(--pad) clamp(72px, 12vh, 130px);
}
.hero__eyebrow{
  margin:0 0 14px; font-size: 0.85rem; letter-spacing: 0.04em;
  color: var(--lavender-2); font-weight:500;
}
.hero__heading{
  font-size: clamp(2.3rem, 6.5vw, 4.6rem);
  line-height: 1.06; font-weight: 500;
  white-space: pre-line;
  max-width: 14ch;
  color: var(--starlight);
  text-shadow: 0 2px 40px rgba(180,140,255,0.25);
}
.hero__sub{
  margin: 22px 0 0; max-width: 46ch;
  color: var(--muted); font-size: clamp(0.98rem, 1.6vw, 1.12rem);
}
.hero__cta{
  margin-top: 36px;
  display:inline-flex; align-items:center; gap: 10px;
  font-size: 0.95rem; color: var(--starlight);
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
  transition: gap .3s ease, border-color .3s ease, color .3s ease;
}
.hero__cta svg{ transform: rotate(180deg); transition: transform .3s ease; }
.hero__cta:hover{ gap: 16px; border-color: var(--lavender-2); color: var(--lavender-2); }
.hero__cta:hover svg{ transform: rotate(180deg) translateY(3px); }

.hero__scrollcue{
  position:absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 1px; height: 46px; background: var(--line); z-index:2;
  overflow:hidden;
}
.hero__scrollcue span{
  position:absolute; top:-46px; left:0; width:100%; height:100%;
  background: var(--lavender-2);
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue{ 0%{ top:-46px; } 60%,100%{ top:46px; } }

/* ==========================================================================
   SHARED SECTION STYLES
   ========================================================================== */
.section{ padding: clamp(72px, 12vw, 140px) 0; position:relative; }
.section__kicker{
  margin:0 0 18px; font-size: 0.82rem; color: var(--lavender); letter-spacing: 0.03em;
}
.section__kicker--light{ color: var(--lavender-2); }
.section__title{
  font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 44px;
  color: var(--starlight);
}
.section__title--light{ color: var(--starlight); }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about{ background: var(--void); }
.about__grid{
  display:grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(36px, 6vw, 90px);
  align-items:start;
}
.about__portrait{
  border-radius: 6px; overflow:hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, var(--deep-2), var(--void));
}
.about__portrait img{ width:100%; height:100%; object-fit:cover; }
.about__portrait.is-circle{
  aspect-ratio: 1/1; border-radius: 50%;
  max-width: min(320px, 80%); margin: 0 auto;
}
.about__paras p{
  color: var(--muted); font-size: 1.02rem; max-width: 58ch;
  margin: 0 0 18px;
}
.about__facts{
  margin-top: 34px; display:grid; gap: 14px;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.about__facts li{
  display:flex; justify-content:space-between; gap: 20px;
  font-size: 0.92rem; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  color: var(--starlight);
}
.about__facts li span:first-child{ color: var(--muted); }
.about__facts li:last-child{ border-bottom:none; padding-bottom:0; }

.about__resume{
  margin-top: 34px;
  display:inline-flex; align-items:center; gap: 10px;
  font-size: 0.95rem; color: var(--starlight);
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
  transition: gap .3s ease, border-color .3s ease, color .3s ease;
}
.about__resume svg{ transition: transform .3s ease; }
.about__resume:hover{ gap: 16px; border-color: var(--lavender-2); color: var(--lavender-2); }
.about__resume:hover svg{ transform: translateY(3px); }

/* ==========================================================================
   EXPERIENCE — timeline
   ========================================================================== */
.experience{ background: linear-gradient(180deg, var(--void), var(--deep) 100%); }
.timeline{ border-top: 1px solid var(--line); }
.timeline li{
  display:grid; grid-template-columns: 160px 1fr; gap: clamp(16px,4vw,60px);
  padding: 32px 0; border-bottom: 1px solid var(--line);
}
.timeline .t-period{ color: var(--lavender-2); font-size: 0.9rem; padding-top: 4px; }
.timeline .t-role{ font-family: var(--serif); font-size: 1.3rem; margin-bottom: 6px; color: var(--starlight); }
.timeline .t-org{ color: var(--lavender); font-size: 0.95rem; margin-bottom: 10px; }
.timeline .t-desc{ color: var(--muted); max-width: 62ch; font-size: 0.98rem; }

/* ==========================================================================
   SKILLS — editorial index, in the spirit of the experience timeline
   ========================================================================== */
.skills{ background: var(--deep); }
.skills-list{ border-top: 1px solid var(--line); }
.skill-row{
  display:grid; grid-template-columns: 200px 1fr; gap: clamp(16px,4vw,60px);
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.skill-row__title{
  font-family: var(--serif); font-size: 1.2rem; color: var(--starlight);
  padding-top: 2px;
}
.skill-row__title span{
  display:block; font-family: var(--sans); font-size: 0.76rem; font-weight:600;
  letter-spacing: 0.03em; color: var(--lavender); margin-top: 6px;
}
.skill-row__tags{
  display:flex; flex-wrap:wrap; align-content:flex-start;
  gap: 10px 28px;
}
.skill-row__tags span{
  position:relative; font-size: 1rem; color: var(--muted);
  padding-bottom: 3px; cursor:default;
  transition: color .25s ease;
}
.skill-row__tags span::after{
  content:""; position:absolute; left:0; bottom:0; width:0; height:1px;
  background: var(--lavender-2); transition: width .3s ease;
}
.skill-row__tags span:hover{ color: var(--starlight); }
.skill-row__tags span:hover::after{ width:100%; }

/* ==========================================================================
   WORK — slider (one project at a time, arrows + dots, click to enlarge)
   ========================================================================== */
.work{ background: linear-gradient(180deg, var(--deep), var(--void) 90%); }
.work__sub{ color: var(--muted); max-width: 46ch; margin-top: -20px; margin-bottom: 8px; }

.slider{
  position: relative;
  display:flex; align-items:center; gap: 14px;
  margin-top: 44px;
}
.slider__viewport{ flex:1; overflow:hidden; border-radius: 10px; }
.slider__track{
  display:flex;
  transition: transform 0.55s cubic-bezier(.65,0,.35,1);
}

.slide{
  flex: 0 0 100%;
  display:grid; grid-template-columns: 1fr 1.05fr; align-items:center; gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 4vw, 54px);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(180,140,255,0.16), transparent 60%),
    linear-gradient(155deg, var(--deep-2) 0%, #150f28 75%);
  border: 1px solid var(--line);
  min-height: 420px;
}
.slide.orientation-portrait{ grid-template-columns: 0.72fr 1fr; }

.slide__media{
  position:relative; border-radius: 8px; overflow:hidden;
  border: 1px solid var(--line); cursor: zoom-in;
  background: var(--void);
}
.slide__media.landscape{ aspect-ratio: 4 / 3; }
.slide__media.portrait{ aspect-ratio: 3 / 4; max-width: 320px; margin: 0 auto; }
.slide__media img{ width:100%; height:100%; object-fit: cover; transition: transform .5s ease; }
.slide__media:hover img{ transform: scale(1.045); }
.slide__zoom{
  position:absolute; right: 12px; bottom: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  background: rgba(13,10,26,0.72); border: 1px solid var(--line); color: var(--starlight);
  opacity: 0; transition: opacity .25s ease;
}
.slide__media:hover .slide__zoom{ opacity: 1; }

.slide__index{ font-size: 0.82rem; color: var(--lavender); margin: 0 0 12px; }
.slide__title{ font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--starlight); margin: 0 0 16px; }
.slide__desc{ color: var(--muted); font-size: 0.98rem; line-height:1.65; max-width: 46ch; }
.slide__link{
  display:inline-flex; align-items:center; gap: 8px; margin-top: 24px;
  font-size: 0.88rem; color: var(--void); background: var(--lavender-2);
  padding: 10px 18px; border-radius: 4px; font-weight: 600;
  transition: background .25s ease;
}
.slide__link:hover{ background: var(--starlight); }

.slider__arrow{
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  background: var(--deep-2); border: 1px solid var(--line); color: var(--starlight);
  cursor:pointer; transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.slider__arrow:hover{ border-color: var(--lavender-2); color: var(--lavender-2); background: var(--deep); }
.slider__arrow:disabled{ opacity: 0.35; cursor: default; }

.slider__dots{
  display:flex; justify-content:center; gap: 10px; margin-top: 26px;
}
.slider__dots button{
  width: 8px; height: 8px; border-radius: 50%; padding:0; border: none;
  background: var(--line); cursor:pointer; transition: background .25s ease, transform .25s ease;
}
.slider__dots button.is-active{ background: var(--lavender-2); transform: scale(1.3); }

/* ==========================================================================
   LIGHTBOX — click any project image to view it larger
   ========================================================================== */
.lightbox{
  position: fixed; inset:0; z-index: 1000;
  display:flex; align-items:center; justify-content:center; padding: 30px;
  background: rgba(10,8,20,0.92); backdrop-filter: blur(6px);
}
.lightbox[hidden]{ display:none; }
.lightbox__img{
  max-width: 90vw; max-height: 88vh; object-fit: contain;
  border-radius: 6px; box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}
.lightbox__close{
  position: absolute; top: 22px; right: 22px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--deep-2); border: 1px solid var(--line); color: var(--starlight);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.lightbox__close:hover{ border-color: var(--lavender-2); color: var(--lavender-2); }

/* ==========================================================================
   CREDITS / FOOTER
   ========================================================================== */
.credits{
  background: radial-gradient(120% 100% at 50% 100%, #241a42 0%, #0d0a1a 70%);
  padding: clamp(72px,12vw,130px) 0 50px;
  border-top: 1px solid var(--line);
}
.credits__email{
  display:inline-block; margin: -6px 0 34px;
  font-family: var(--serif); font-size: clamp(1.4rem, 3.4vw, 2rem);
  color: var(--starlight); border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.credits__email:hover{ color: var(--lavender-2); border-color: var(--lavender-2); }
.credits__lines{ display:grid; gap: 10px; margin-bottom: 40px; }.credits__lines li{ color: var(--muted); font-size: 0.98rem; }
.credits__social{ display:flex; flex-wrap:wrap; gap: 26px; margin-bottom: 60px; }
.credits__social a{
  font-size: 0.95rem; color: var(--starlight); border-bottom: 1px solid var(--line);
  padding-bottom: 3px; transition: color .25s ease, border-color .25s ease;
}
.credits__social a:hover{ color: var(--lavender-2); border-color: var(--lavender-2); }
.credits__note{ color: var(--muted); font-size: 0.82rem; margin:0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px){
  .about__grid{ grid-template-columns: 1fr; }
  .about__portrait{ max-width: 340px; }
  .skills-list{ }
  .timeline li{ grid-template-columns: 1fr; gap: 6px; }
  .slide, .slide.orientation-portrait{ grid-template-columns: 1fr; min-height: 0; }
  .slide__media.portrait{ max-width: 260px; }
}

@media (max-width: 680px){
  .nav__links{
    position:fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    background: rgba(20,15,38,0.98); backdrop-filter: blur(14px);
    flex-direction:column; align-items:flex-start; justify-content:center;
    gap: 30px; padding: 40px var(--pad);
    transform: translateX(100%); transition: transform .4s ease;
    border-left: 1px solid var(--line);
  }
  .nav__links.is-open{ transform: translateX(0); }
  .nav__links a{ font-size: 1.15rem; }
  .nav__toggle{ display:flex; }
  .hero__content{ padding-bottom: 96px; }
  .hero__heading{ max-width: 100%; }
  .slider{ gap: 8px; }
  .slider__arrow{ width: 36px; height: 36px; }
  .slide{ padding: 20px; gap: 20px; }
}
