/* =========================================================
   DESIGN TOKENS — sky blue palette
   ========================================================= */
:root {
--sky-top:   #4A95C8;   
  --sky-mid:   #6fa5cb;   
  --sky-low:   #afcfe1;  

 --accent:    #7BB6E8;    /* softer cornflower */
  --accent-d:  #0866ad;    /* deeper, more saturated */
  --accent-l:  #a9e2ff;  


      --ink:       #293e67;
  --ink-mid:   #3f5a86;
  --ink-soft:  #8ca4c9;
  --ink-white: #ffffff;

  --hairline:  rgba(26,43,74,.12);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-w:     1240px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--sky-low);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Continuous sky behind every page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 20% 0%,  var(--accent-l) 0%, transparent 80%),
    radial-gradient(ellipse at 80% 20%, var(--accent) 0%, transparent 50%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 50%, var(--sky-low) 100%);
  z-index: -2;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: .06;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: overlay;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
 position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 8px 32px;
  display: flex; justify-content: space-between; align-items: center;
   
  
  color: var(--ink-white);
   transition: opacity .35s ease, transform .35s ease;
}


.nav__logo {
  display: block;
  width: 56px;
  height: 56px;

  background-image: url('images/logo.png');
  background-repeat: no-repeat;
  background-size: 56px 56px;   
  background-position: 0 0;
}

.nav__logo.is-spinning {
  background-image: url('images/logo-sprite.png');
  background-size: 560px 168px;   /* 56px × 10 cols, 56px × 3 rows */
}


.nav__links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;

  /* the bubble */
  padding: 5px 24px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;

  color: var(--ink-mid);
}
.nav__links a {
  position: relative;
  padding: 4px 0;
  transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 2px; width: 0; background: var(--accent-d);
  transition: width .3s ease;
}
.nav__links a:hover { color: var(--accent-l); }
.nav__links a:hover::after { width: 100%; }

.nav__cv {
  padding: 8px 18px;
  background: var(--accent-d);        
  color: var(--ink-white);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: transform .2s, background .2s;
}


.nav__cv:hover { background: var(--accent); transform: translateY(-1px); }

@media (max-width: 720px){
  .nav__links { display: none; }
}

/* =========================================================
   SIDE SOCIALS
   ========================================================= */
.socials {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; gap: 14px;
}

.socials a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 50%, transparent);
  border: 1px solid rgba(255,255,255,.9);

  border-radius: 50%;
   color: var(--ink-white);
  box-shadow: 0 4px 18px rgba(58, 127, 214, .25);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), background .25s, color .25s;
}
.socials a:hover {
  transform: translateY(-3px) scale(1.08);
  background: var(--accent);
  color: var(--accent-d);
}
.socials a svg { width: 18px; height: 18px; }

@media (max-width: 900px){
  .socials {
    left: 50%; transform: translateX(-50%); top: auto; bottom: 80px;
    flex-direction: row;
  }
  .socials::after { display: none; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__scene {
  position: absolute; inset: 0;
  z-index: -1;
}


.hero__bg,
.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  clip-path: url(#hero-clip);
  -webkit-clip-path: url(#hero-clip);
  transition: none;
}


.hero__subtitle {
  position: absolute;
  bottom: 20%;          /* distance from the bottom of the hero */
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  font-size: clamp(15px, 1.5vw, 18px);
  letter-spacing: .3em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-white);
  opacity: 0;
  animation: fade-up 1s .6s ease-out forwards;
  z-index: 2;           /* above the hero image */
}

@keyframes fade-up {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}


/* =========================================================
   HERO BUBBLE TRANSITION
   Soft curved seam between hero and about section.
   Fill matches --sky-low so it blends with the body's
   sky gradient showing through the next section.
   ========================================================= */
.hero__bubble {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;          /* prevent subpixel gap */
  width: 100%;
  height: 240px;
  z-index: 2;            /* above hero bg image, below interactive elements */
  pointer-events: none;
  will-change: transform;
}

.hero__bubble path {
  transition: none;  
}

/* On small screens shrink the bubble so it doesn't dominate */
@media (max-width: 720px) {
  .hero__bubble {
    height: 160px;
  }
}

.scroll-prompt {
  position: absolute;
  bottom: 48px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-white);
  z-index: 5;
  animation: bounce 2.4s ease-in-out infinite;
  
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* =========================================================
   SHARED SECTION STYLES
   ========================================================= */
section {
  position: relative;
  padding: 80px 0;
}
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent-l);
  margin-bottom: 18px;
}
.section-label::before {
  content: ""; width: 24px; height: 1px; background: var(--accent-l);
}
.section-title {
  font-family: "ivypresto-display", serif;
font-weight: 400;
font-style: normal;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  color: var(--ink);
}
.section-title em {
  font-style: italic;
  color: var(--accent-d);
}

.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s cubic-bezier(.22,.61,.36,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.delay-4 { transition-delay: .4s; }

/* Once revealed, drop the delay so hover responds instantly */
.reveal.in-view {
  transition-delay: 0s;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  padding-top: clamp(80px, 10vh, 140px);     
  padding-bottom: clamp(80px, 10vh, 140px);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;        /* slightly more balanced */
  gap: clamp(40px, 6vw, 100px);            /* scales with screen width */
  align-items: center;
  max-width: 1100px;                       /* keeps content from sprawling */
  margin: 0 auto;                          /* centers the whole grid */
}

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
}

.about__visual {
  position: relative;
  aspect-ratio: 4/5;                       /* back to portrait orientation */
  width: 100%;
  max-width: 380px;    
  margin-top: 20px;                    /* close to original size */
  place-self: center;                      /* centers in grid cell */
  border-radius: var(--radius-lg);
  box-shadow:
    0 30px 60px -20px rgba(58, 127, 214, .35),
    inset 0 2px 0 rgba(255,255,255,.6);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.about__image {
  width: 105%;
  height: auto;
  margin-top: -80px;  
  margin-left: -2px;       
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.15));
  animation: bob 5s ease-in-out infinite;
}

.about__image--hover {
  position: absolute;
  top: 47%;
  left: 50%;
  width: 118%;
  max-width: none;             /* THIS LINE — overrides the global img rule */
  height: auto;
  margin: 0;
  transform: translate(-50%, -50%);   /* centers despite being 140% wide */
  opacity: 0;
  transition: opacity .4s ease;
  animation: none;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.15));
}
.about__visual:hover .about__image--hover {
  opacity: 1;
}
.about__hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-white);
  white-space: nowrap;
  box-shadow: 0 4px 14px -4px rgba(30, 58, 86, 0.2);
  pointer-events: none;
  z-index: 3;
  transition: opacity .3s ease, transform .3s ease;
}

.about__visual:hover .about__hint {
  opacity: 0;
  transform: translate(-50%, 8px);    /* slight downward fade-away */
}

.about__text p {
  font-size: clamp(15px, 1.1vw, 17px);
  margin-bottom: clamp(12px, 1.5vh, 20px);
  color: var(--ink-mid);
}


/* Skills marquee */
.skills-marquee {
  margin-top: clamp(12px, 8vh, 36px);
  padding: clamp(16px, 2vh, 28px) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.skills-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.skills-marquee:hover .skills-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 7px)); }
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  position: relative;
  transition: transform .2s, background .2s, border-color .2s;
}

.skill-pill:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.85);
}


.skill-pill__logo {
  width: 18px;
  height: 18px;
  display: block;
  filter: grayscale(1) opacity(0.55);                  /* muted by default */
  transition: filter .3s ease, transform .3s ease;
}

.skill-pill:hover .skill-pill__logo {
  filter: none;                                         /* brand color pops */
  transform: scale(1.08);
}

/* =========================================================
   PROJECTS
   ========================================================= */
.projects__header {
  display: block;
  margin-bottom: 12px;
}
.projects__header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline; 
  gap: 32px;
  flex-wrap: wrap;
}
.projects__intro {
  max-width: 540px;
  color: var(--ink-mid);
  font-size: 17px;
}
.projects__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto;
}

.project-card {
  flex: 0 1 calc((100% - 64px) / 3);   /* 3 columns, accounting for 2 gaps */
  min-width: 280px;                     /* don't shrink below readable size */
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  box-shadow: 0 20px 50px -25px rgba(26, 43, 74, .25);
  transition: transform .4s cubic-bezier(.22,.61,.36,1), box-shadow .4s;
  cursor: pointer;
  display: flex; flex-direction: column;
}

@media (max-width: 900px) {
  .project-card { flex-basis: calc((100% - 32px) / 2); }   /* 2 cols */
}
@media (max-width: 600px) {
  .project-card { flex-basis: 100%; }                       /* 1 col */
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 35px 70px -25px rgba(58, 127, 214, .4);
}
.project-card__media {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--lavender)); /* fallback */
}
.project-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.12));
}

/* Class-based gradient styles — pick one per card */
.project-card.style--1 .project-card__media { background: linear-gradient(135deg, #6db8ff, #c8d4ff); }
.project-card.style--2 .project-card__media { background: linear-gradient(135deg, #aef0d0, #6db8ff); }
.project-card.style--3 .project-card__media { background: linear-gradient(135deg, #d9efff, #3a7fd6); }
.project-card.style--4 .project-card__media { background: linear-gradient(135deg, #c4e0ff, #8aa5d6); }
.project-card.style--5 .project-card__media { background: linear-gradient(135deg, #b8ddff, #c8d4ff); }
.project-card.style--6 .project-card__media { background: linear-gradient(135deg, #e6f3ff, #6db8ff); }

.project-card__icon {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 80px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.15));
}
.project-card__media img,
.project-card__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__body { padding: 24px; }
.project-card__tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.project-card__tag {
  font-size: 11px; 
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent-d);
  background: var(--accent-l);
  padding: 4px 10px;
  border-radius: 999px;
}
.project-card__title {
  font-family: "ivypresto-display", serif;
font-weight: 400;
font-style: normal;
  font-size: 26px; 
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color:  var(--ink);
}
.project-card__desc {
  font-size: 15px; color: var(--ink-soft);
}

.projects__cta {
  text-align: center; margin-top: 70px;
}

/* Static QA cards — no hover lift, no cursor pointer */
.project-card--static {
  cursor: default;
}

.project-card--static:hover {
  transform: none;
  box-shadow: 0 20px 50px -25px rgba(26, 43, 74, .25);  /* same as default, no lift */
}

/* The role text — distinct from a normal description */
.project-card__role {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* Hide the external link arrow on static cards (shouldn't trigger, but belt-and-suspenders) */
.project-card--static .project-card__title::after {
  display: none;
}

.button {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 32px;
  background: var(--accent-d);
  color: white;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .05em;
  transition: transform .25s, background .25s, color .25s, border-color .25s;
}
.button:hover { background: var(--accent); transform: translateY(-2px); }

.button--outline {
  background: transparent;
  color: var(--accent-d);
  border: 1.5px solid var(--accent-d);
  /* inherits transition from .button */
}
.button--outline:hover { 
  background: var(--accent-d); 
  color: white; 
  border-color: var(--accent-d);  /* explicit so it transitions properly */
}

.button svg { 
  width: 16px; height: 16px; 
  transition: transform .25s, stroke .25s;  /* add stroke transition */
}
.button:hover svg { transform: translateX(4px); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  text-align: center;
  position: relative;
  min-height: 80vh;            /* total section height */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* content sits at bottom */
  padding: 40px 0 80px;        /* small breathing room top/bottom */
}

.contact .container {
  position: relative;
  z-index: 1;                                
}

.contact__title {
 font-family: "ivypresto-display", serif;
  line-height: 1.05;
  padding-bottom: 0.15em;
font-weight: 700;
font-style: normal;
  font-size: clamp(48px, 8vw, 96px);
    background: linear-gradient(135deg, #d9efff 0%, #5eaffc 25%, #eaf9fb 50%, #73c2ff 75%, #c7e8ff 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0 24px;

  filter:
    drop-shadow(0 8px 24px rgba(30, 58, 86, 0.25));

}
.contact__sub {
  font-size: 18px;
  color: var(--ink-mid);
  max-width: 540px;
  margin: 0 auto 40px;
}
.contact__actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

/* =========================================================
   ALL-PROJECTS PAGE
   ========================================================= */
   
.page-header {
  padding: 160px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header__title {
  font-family: "ivypresto-display", serif;
  font-weight: 700;
  font-style: normal;
  font-size: clamp(56px, 10vw, 120px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  padding-bottom: 0.15em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;

  background: linear-gradient(
    135deg,
    #d9efff 0%, #5eaffc 25%, #c1cdf9 50%,
    #6db8ff 75%, #cbe0fa 100%
  );
background-size: 200% 200%;       /* larger size = more dramatic shimmer */
animation: holo-shimmer 6s ease-in-out infinite;


  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  

  filter: drop-shadow(0 8px 24px rgba(56, 89, 125, 0.501));
}


.page-header__title em {
  font-style: italic;
 
}

.page-header__sub {
  font-size: 18px;
  color: var(--ink-mid);
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.back-link {
  position: relative;
  z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  margin-bottom: 28px;
  transition: color .2s, transform .2s;
}
.back-link:hover {
  color: var(--accent-d);
  transform: translateX(-3px);
}

/* CLOUDS */
.page-header__cloud {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.9;
  filter: drop-shadow(0 14px 28px rgba(30, 58, 86, 0.15));
  animation: cloud-drift 12s ease-in-out infinite;
}

.page-header__cloud--left {
  top: 22%;
  left: 4%;
  width: clamp(180px, 18vw, 280px);
  animation-delay: 0s;
}

.page-header__cloud--right {
  top: 48%;
  right: 4%;
  width: clamp(200px, 22vw, 340px);
  animation-delay: -8s;       /* offset so they drift independently */
  animation-duration: 14s;
}

@keyframes cloud-drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(24px, -12px); }
}

/* Hide clouds on small screens — they'd overlap the title */
@media (max-width: 900px) {
  .page-header__cloud { display: none; }
}

/* In-page category jump nav */
.category-nav {
  position: sticky;
  top: 60px;
  z-index: 30;
  margin: 40px 0 80px;
  height: 60px;
  pointer-events: none;          /* clicks pass through empty space */
}

/* ===== CENTERED PILL (visible at top) ===== */
.category-nav__bar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -10px rgba(58, 127, 214, 0.25);
  pointer-events: auto;
  opacity: 1;
  transition: opacity .4s ease, transform .4s ease;
}

.category-nav.is-scrolled .category-nav__bar {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
}

.category-nav__bar a {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.category-nav__bar a:hover {
  background: var(--accent);
  color: white;
}

/* ===== SIDE BUTTON + POPOUT (visible when scrolled) ===== */
.category-nav__side {
  position: absolute;
  top: 0;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 12px;                     /* the gap between button and popout */
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

.category-nav.is-scrolled .category-nav__side {
  opacity: 1;
  pointer-events: auto;
}

/* Side button — perfect circle, always visible when scrolled */
.category-nav__btn {
  flex-shrink: 0;
  order: 2;                       /* button on the RIGHT, popout on the LEFT */
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -10px rgba(58, 127, 214, 0.25);
  color: var(--ink);
  cursor: pointer;
  transition: background .25s, color .25s;
}

.category-nav__side:hover .category-nav__btn {
  background: var(--accent);
  color: white;
}

/* Popout menu — hidden until hover */
.category-nav__popout {
  order: 1;                       /* sits to the LEFT of the button */
  display: inline-flex;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -10px rgba(58, 127, 214, 0.25);
  opacity: 0;
  transform: translateX(20px) scale(0.95);
  transform-origin: right center;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.22, .61, .36, 1);
}

/* Hover ANYWHERE in .category-nav__side → popout appears */
.category-nav__side:hover .category-nav__popout {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}

/* When mouse leaves the side area, wait briefly before closing */
.category-nav__popout {
  transition-delay: 0.15s;       /* small grace period to prevent flicker */
}

.category-nav__popout a {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.category-nav__popout a:hover {
  background: var(--accent);
  color: white;
}


/* Category sections */
.category {
  padding: 70px 0;
  scroll-margin-top: 24px;
}
.category__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 24px;
  gap: 32px;
  flex-wrap: wrap;
}
.category__title-group {
  display: flex; flex-direction: column; gap: 6px;
}
.category__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent-l);
}
.category__title {
  font-family: "ivypresto-display", serif;
font-weight: 400;
font-style: normal;
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.category__count {
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: white;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  white-space: nowrap;
}
.category__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
   min-width: 0;
}
@media (max-width: 900px) {
  .category__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .category__grid { grid-template-columns: 1fr; }
}

.category__grid--qa {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .category__grid--qa { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .category__grid--qa { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .category__grid--qa { grid-template-columns: 1fr; }
}

/* Portrait media — taller, better for box art */
.category__grid--qa .project-card__media {
  aspect-ratio: 3 / 4;
}

/* Tighter body padding */
.category__grid--qa .project-card__body {
  padding: 14px 16px;
}

/* Smaller title */
.category__grid--qa .project-card__title {
  font-size: 18px;
  margin-bottom: 4px;
}

/* Tighter role text */
.category__grid--qa .project-card__role {
  font-size: 12px;
  margin-bottom: 0;
}

/* Compact tags */
.category__grid--qa .project-card__tags {
  margin-bottom: 8px;
  gap: 4px;
}

.category__grid--qa .project-card__tag {
  font-size: 10px;
  padding: 3px 8px;
  letter-spacing: .08em;
}

/* =========================================================
   EXTERNAL LINK INDICATOR
   Cards with target="_blank" automatically show an ↗ on hover
   ========================================================= */
.project-card[target="_blank"] .project-card__title::after {
  content: " ↗";
  display: inline-block;
  margin-left: 4px;
  color: var(--accent-d);
  font-weight: 250;
  transition: transform .25s;
}
.project-card[target="_blank"]:hover .project-card__title::after {
  transform: translate(2px, -2px);
}

/* =========================================================
   PROJECT DETAIL PAGE
   ========================================================= */
.project-page-hero {
  padding: 100px 0 40px;          /* was 160px 0 40px — way less top space */
}

.back-link {
  margin-bottom: 28px;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: none;                /* let content breathe wider */
}

.project-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent-l);
}

/* PROJECT TITLE — chrome shimmer to match your hero "Revekka" text */
.project-title {
  font-family: "ivypresto-display", serif;
  font-weight: 700;
  font-style: normal;
  font-size: clamp(56px, 9vw, 110px);
  letter-spacing: -0.03em;
  line-height: 1.0;
  padding-bottom: 0.15em;
  margin: 0;
background: linear-gradient(160deg, #d9efff 0%, #71b6f7 25%, #ffffff 50%, #a0cdf7 75%, #cbe0fa 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo-shimmer 4s ease-in-out infinite;
  
  filter:
   drop-shadow(0 8px 24px rgba(30, 58, 86, 0.25));
}

.project-tagline {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-mid);
  max-width: 60ch;
  margin: 0;
}

/* Watch Trailer button — refined for inline use */
.project-link--trailer {
  flex-shrink: 0;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-d);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px -10px rgba(58, 127, 214, 0.25);
  transition: background .25s, color .25s, transform .25s;
}

.project-link--trailer:hover {
  background: var(--accent-d);
  color: white;
  transform: translateY(-2px);
}

.project-link--trailer svg {
  margin-left: -2px;              /* optical centering — play icon balanced */
}

/* Hero media — replace placeholder with <img> or <video> */
.project-hero-media {
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #6db8ff, #c8d4ff);
  margin: 0px 0 60px;
  display: grid;
  place-items: center;
  font-size: 120px;
  box-shadow: 0 30px 60px -20px rgba(58, 127, 214, .35);
  position: relative;
}
.project-hero-media img,
.project-hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Two-column content area: prose on left, sticky sidebar on right */
.project-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 80px;
  align-items: start;
  padding-bottom: 60px;
  border-bottom: 2px solid var(--accent-l);

}
@media (max-width: 900px) {
  .project-content { grid-template-columns: 1fr; gap: 40px; }
}

.project-prose {
  background: rgba(255, 255, 255, 0.3);

  border-radius: var(--radius-md);
  padding: 40px;

  box-shadow: 
    0 20px 50px -25px rgba(26, 43, 74, 0.15),
    
}

.project-prose h2 {
  font-family: "ivypresto-display", serif;
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 50px 0 18px;
  color: var(--ink);
}
.project-prose h2:first-child { margin-top: 0; }
.project-prose p {
  font-size: 17px;
  color: var(--ink-mid);
  margin-bottom: 18px;
  line-height: 1.65;
}
.project-prose ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}
.project-prose li {
  font-size: 16px;
  color: var(--ink-mid);
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
  line-height: 1.55;
}
.project-prose li::before {
  content: "▸";
  color: var(--accent-d);
  position: absolute;
  left: 0;
  top: 0;
}

/* Right-rail "About this project" card — sticky while scrolling */
.project-sidebar {
  position: sticky;
  top: 100px;
  background: white;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: 0 20px 50px -25px rgba(26, 43, 74, .15);
}
@media (max-width: 900px) {
  .project-sidebar { position: static; }
}
.project-sidebar h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent-d);
  margin-bottom: 14px;
}
.project-sidebar h3:not(:first-child) { margin-top: 28px; }
.project-sidebar dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px 16px;
  font-size: 14px;
}
.project-sidebar dt {
  color: var(--ink-soft);
  font-weight: 500;
}
.project-sidebar dd {
  color: var(--ink);
  font-weight: 600;
}

/* Screenshots gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 20px 0 40px;
}
.project-gallery__item {
  /* Reset button defaults */
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;

  /* Uniform card */
  display: block;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 30px -15px rgba(58, 127, 214, .3);
  transition: transform 0.2s ease;
}

.project-gallery__item:hover { transform: scale(1.02); }
.project-gallery__item:focus-visible {
  outline: 2px solid var(--accent-d);
  outline-offset: 4px;
}

.project-gallery__item img,
.project-gallery__item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;   /* fills the tile, crops if needed */
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }

.lightbox__img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: lb-in 0.2s ease;
}
@keyframes lb-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.lightbox__caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  text-align: center;
  max-width: 80vw;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }

.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lightbox__nav { width: 38px; height: 38px; }
}

/* =========================================================
   VIDEO MODAL
   ========================================================= */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  cursor: zoom-out;
}
.video-modal[hidden] { display: none; }

.video-modal__inner {
  position: relative;
  width: min(1100px, 92vw);
  aspect-ratio: 16 / 9;
  cursor: default;
  animation: lb-in 0.2s ease;
}

.video-modal__video {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 6px;
  background: black;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.video-modal__close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
}
.video-modal__close:hover { background: rgba(255, 255, 255, 0.25); }

/* Make sure .project-link button looks like the original <a> styling */
button.project-link {
  font: inherit;
  cursor: pointer;
}

/* Bottom navigation between projects */
.project-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 120px;
  gap: 20px;
  flex-wrap: wrap;
   position: relative;          /* needed for z-index to take effect */
  z-index: 2;   
}
.project-nav-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-white);
  transition: color .2s, transform .2s;
}
.project-nav-bottom a:hover {
  color: var(--accent-d);
}


site-footer {
  display: block;
  position: relative;
  height: 320px;
  background-image: url('images/FooterFlowers.png');
  background-size: 100% auto;
  background-position: bottom center;
  background-repeat: no-repeat;
  margin-top: -200px;          
  z-index: 0;
  pointer-events: none;
}

.site-footer__inner {
  position: absolute;
  bottom: 0px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(30, 58, 86, 0.4);
  padding: 2px 32px;

  background: rgba(255, 255, 255, 0.2);
  
 
}

.site-footer__inner p { margin: 0; }