/* ==========================================================================
   khue — portfolio
   Built from the "Portfolio phone" Figma file. Phone design is 402px wide;
   everything scales up for laptop from 900px.
   ========================================================================== */

@font-face {
  font-family: "Candice";
  src: url("../assets/fonts/Candice.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette straight from the Figma fills */
  --pink: #fe91da;          /* inner page ground */
  --pink-menu: #ffd0ef;     /* menu overlay */
  --purple: #6420aa;        /* home ground */
  --blob-1: #ff3ea5;
  --blob-2: #fa347d;
  --blob-3: #ffd0e7;
  --blob-4: #ff7ed4;
  --star: #fffb8d;
  --star-menu: #fff67a;
  --logo: #b01d50;          /* "khue" on inner pages */
  --logo-home: #f0437f;     /* "khue" on the star */
  --ink: #ffffff;
  --ink-dark: #1e1e1e;

  --display: "Candice", "Pacifico", cursive;
  --body: "Caladea", "Cambria", Georgia, serif;

  --phone: 402px;
  --gutter: 24px;
  --measure: 640px;
  --page: 1040px;

  --fs-body: 20px;
  --fs-h2: 32px;
  --fs-title: 50px;
  --fs-logo: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.25;
  color: var(--ink);
  background: var(--pink);
  overflow-x: hidden;
  position: relative;
}

body.home { background: var(--purple); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Blurred colour blobs (Figma: "Group 3", layer blur 125)
   -------------------------------------------------------------------------- */
.bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.95;
  will-change: transform;
}
.blob-1 { background: var(--blob-1); width: 380px; height: 400px; left: -60px;  top: -170px; }
.blob-2 { background: var(--blob-4); width: 240px; height: 260px; left: -40px;  top: 380px; }
.blob-3 { background: var(--blob-3); width: 260px; height: 250px; right: -80px; top: 1150px; }
.blob-4 { background: var(--blob-2); width: 280px; height: 280px; right: -60px; top: 1450px; }
.blob-5 { background: var(--blob-2); width: 300px; height: 300px; left: -80px;  top: 2400px; }
.blob-6 { background: var(--blob-4); width: 300px; height: 300px; right: -90px; top: 3100px; }

.home .blob-1 { left: -60px; top: -160px; width: 390px; height: 420px; }
.home .blob-2 { background: var(--blob-4); left: -80px; top: 60px; width: 220px; height: 240px; }
.home .blob-3 { background: var(--blob-3); right: -20px; top: 480px; width: 260px; height: 250px; }
.home .blob-4 { background: var(--blob-2); right: -30px; top: 650px; width: 280px; height: 270px; }

/* --------------------------------------------------------------------------
   Header (Figma: stars top-left, "khue" centred, menu icon top-right)
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 5;
  height: 132px;
  max-width: var(--page);
  margin: 0 auto;
}
.header-stars {
  position: absolute;
  left: 20px;
  top: 22px;
  width: 72px;
  height: 72px;
}
.header-stars svg { position: absolute; fill: var(--star); }
.header-stars .s1 { left: 27px; top: 14px; width: 43px; height: 43px; }
.header-stars .s2 { left: 3px;  top: 0;    width: 27px; height: 28px; }
.header-stars .s3 { left: 0;    top: 41px; width: 27px; height: 28px; }

.logo {
  position: absolute;
  left: 50%;
  top: 50px;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: var(--fs-logo);
  line-height: 1;
  color: var(--logo);
  white-space: nowrap;
}
.logo:hover { color: var(--logo-home); }

.menu-btn {
  position: absolute;
  right: 27px;
  top: 34px;
  width: 47px;
  height: 47px;
}
.menu-btn img { width: 100%; height: 100%; }

.site-nav { display: none; }

/* --------------------------------------------------------------------------
   Menu overlay (Figma frame "iPhone 17 - 4")
   -------------------------------------------------------------------------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--pink-menu);
  color: var(--ink-dark);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}
.menu-close {
  position: absolute;
  left: 29px;
  top: 43px;
  width: 24px;
  height: 24px;
}
.menu-close svg { width: 24px; height: 24px; stroke: var(--ink-dark); stroke-width: 4; fill: none; }
.menu-links {
  list-style: none;
  margin: 0;
  padding: 108px 27px 0 0;
  text-align: right;
  font-size: 24px;
}
.menu-links li + li { margin-top: 34px; }
.menu-links a { display: inline-block; padding: 4px 0; }
.menu-links a:hover, .menu-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.menu-star {
  position: absolute;
  left: -143px;
  bottom: -160px;
  width: 548px;
  height: 552px;
  fill: var(--star-menu);
  transform-origin: center;
  animation: spin 40s linear infinite reverse;
}

/* --------------------------------------------------------------------------
   Home (Figma frame "iPhone 17 - 1")
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}
.hero-star-wrap {
  position: relative;
  width: min(86vw, 346px);
  aspect-ratio: 346 / 343;
  margin: auto;
  transform: translateY(-4vh);
}
.hero-star {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--star);
  transform-origin: 50% 50%;
  animation: spin 18s linear infinite reverse; /* reverse = counter-clockwise */
}
.hero-name {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: calc(min(86vw, 346px) * 0.30);
  line-height: 1;
  color: var(--logo-home);
  padding-bottom: 2%;
}
.hero-nav {
  display: flex;
  justify-content: space-between;
  padding: 0 44px 74px;
  font-size: 24px;
}
.hero-nav a { padding: 6px 2px; }
.hero-nav a:hover { text-decoration: underline; text-underline-offset: 8px; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-star, .menu-star { animation: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 0 80px;
}
.page-title {
  font-family: var(--display);
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 1;
  margin: 0 var(--gutter) 0;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--ink);
  width: max-content;
  min-width: 265px;
  max-width: calc(100% - 2 * var(--gutter));
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}
.prose p { margin: 0 0 20px; }
.prose p:last-child { margin-bottom: 0; }
.prose--left { text-align: left; }
.prose--right { text-align: right; }

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px;
  text-align: center;
}
h2.left { text-align: left; padding: 0 12px; }

.section { margin-top: 44px; }
.section--tight { margin-top: 28px; }

.rule {
  border: 0;
  border-top: 1px solid var(--ink);
  width: 265px;
  max-width: 70%;
  margin: 26px auto 0;
}

/* two columns with the thin vertical line (truth | insight, insight | tagline) */
.cols {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 8px;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 12px;
}
.cols > div { text-align: center; }
.cols .vline { background: var(--ink); align-self: stretch; margin: -8px 0 0; }
.cols h2 { margin-bottom: 14px; }
.cols p { margin: 0; }

/* images */
.media { margin: 0; }
.media img { width: 100%; }
.media--bleed { margin: 0; }
.media--inset { margin: 0 12px; }
.media--rounded img { border-radius: 6px; }
.stack { display: grid; gap: 0; margin: 0 12px; }
.stack img { width: 100%; }
/* Figma crops these 16:9 billboards to 378x251, anchored left */
.stack--crop img { aspect-ratio: 378 / 251; object-fit: cover; object-position: left center; }
.media--video video { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; background: #000; }
figcaption { font-size: 16px; margin-top: 10px; opacity: 0.9; }

.credits {
  font-size: 18px;
  margin: 100px 12px 0;
  max-width: 320px;
}

/* --------------------------------------------------------------------------
   Work page (Figma frame "iPhone 17 - 2")
   -------------------------------------------------------------------------- */
.work-intro {
  text-align: center;
  font-size: 24px;
  line-height: 20px;
  margin: -6px 0 26px;
}
.work-grid {
  display: grid;
  gap: 26px;
  padding: 0 27px;
}
.work-card {
  position: relative;
  display: block;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 348 / 191;
  background: rgba(255, 255, 255, 0.15);
}
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.work-card span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(to top, rgba(100, 32, 170, 0.75), rgba(100, 32, 170, 0));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.work-card:hover img, .work-card:focus-visible img { transform: scale(1.04); }
.work-card:hover span, .work-card:focus-visible span { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Carousel (Figma component "carousel hip hop", rebuilt as a smooth
   scroll-snap track so slides glide instead of jumping between variants)
   -------------------------------------------------------------------------- */
.carousel { position: relative; margin: 0 8px; }
.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 6px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.carousel-slide {
  margin: 0;
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  user-select: none;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 8px;
  padding-right: 6px;
}
.carousel-dots { display: flex; gap: 8px; margin-right: auto; padding-left: 6px; }
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease, background 0.2s ease;
}
.carousel-dot.is-active { background: #fff; transform: scale(1.35); }
.carousel-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-btn:hover { background: rgba(255, 255, 255, 0.2); }
.carousel-btn:active { transform: scale(0.94); }
.carousel-btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------------------
   About page (Figma frame "iPhone 17 - 7")
   -------------------------------------------------------------------------- */
.about-figure {
  position: relative;
  margin: -10px 0 0;
  text-align: center;
}
.about-figure img { width: min(100%, 515px); margin: 0 auto; }
/* "my swaggy everyday" sits left of the cutout, "outfit" to its right (Figma layers) */
.about-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  margin: 0;
  font-size: 20px;
  color: #000;
  opacity: 1;
  line-height: 1.2;
  pointer-events: none;
}
.about-figure .cap-left {
  position: absolute;
  right: calc(50% + 70px);
  max-width: 130px;
  text-align: right;
}
.about-figure .cap-right {
  position: absolute;
  left: calc(50% + 62px);
  text-align: left;
}
.polaroids {
  position: relative;
  height: 980px;
  margin-top: 40px;
}
.polaroid {
  position: absolute;
  width: 221px;
  height: 295px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(100, 32, 170, 0.25);
}
.polaroid-1 { left: 47%; top: 0;     transform: rotate(14.3deg); }
.polaroid-2 { left: -8%; top: 222px; transform: rotate(-13.5deg); }
.polaroid-3 { left: 46%; top: 392px; transform: rotate(9deg); }
.polaroid-4 { left: 0;   top: 657px; transform: rotate(-12deg); }
.polaroids svg { position: absolute; width: 43px; height: 43px; fill: var(--star); }
.polaroids .p-star-1 { left: 43%; top: -14px; }
.polaroids .p-star-2 { left: 63%; top: 346px; }
.polaroids .p-star-3 { left: 29%; top: 572px; }

/* --------------------------------------------------------------------------
   Contact page (Figma frame "iPhone 17 - 8")
   -------------------------------------------------------------------------- */
.contact-list { list-style: none; margin: 60px var(--gutter) 0; padding: 0; }
.contact-list li + li { margin-top: 18px; }
.contact-list a { display: inline-flex; align-items: center; gap: 12px; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact-list img { width: 40px; height: 40px; }
.contact-page { min-height: 100vh; }

/* --------------------------------------------------------------------------
   Laptop / desktop
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  :root {
    --fs-body: 21px;
    --fs-h2: 34px;
    --fs-title: 64px;
    --fs-logo: 72px;
    --measure: 680px;
    --gutter: 40px;
  }
  body { line-height: 1.4; }

  .blob { filter: blur(130px); }
  .blob-1 { width: 620px; height: 640px; left: -160px; top: -260px; }
  .blob-2 { width: 380px; height: 400px; left: 6vw; top: 520px; }
  .blob-3 { width: 420px; height: 400px; right: -60px; top: 900px; }
  .blob-4 { width: 460px; height: 460px; right: 4vw; top: 1500px; }
  .blob-5 { width: 480px; height: 480px; left: -100px; top: 2300px; }
  .blob-6 { width: 480px; height: 480px; right: -120px; top: 3000px; }
  .home .blob-1 { width: 720px; height: 740px; left: -200px; top: -300px; }
  .home .blob-2 { width: 360px; height: 380px; left: 2vw; top: 40vh; }
  .home .blob-3 { width: 460px; height: 440px; right: 6vw; top: 30vh; }
  .home .blob-4 { width: 520px; height: 500px; right: -80px; top: 55vh; }

  .site-header { height: 168px; padding: 0 var(--gutter); }
  .header-stars { left: var(--gutter); top: 30px; transform: scale(1.2); transform-origin: top left; }
  .logo { top: 60px; }
  .menu-btn { display: none; }
  .site-nav {
    display: flex;
    gap: 40px;
    position: absolute;
    right: var(--gutter);
    top: 66px;
    font-size: 24px;
  }
  .site-nav a { padding: 4px 0; border-bottom: 2px solid transparent; transition: border-color 0.2s ease; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { border-color: var(--ink); }

  .hero-star-wrap { width: min(44vh, 440px); transform: translateY(-2vh); }
  .hero-name { font-size: calc(min(44vh, 440px) * 0.30); }
  .hero-nav { justify-content: center; gap: 120px; padding-bottom: 72px; font-size: 26px; }

  .page { padding: 0 var(--gutter) 120px; }
  .page-title { margin: 0; min-width: 330px; }
  .section { margin-top: 56px; }
  .rule { margin-top: 36px; }

  .cols { padding: 0; gap: 0 24px; }
  .cols .vline { margin: 0; }

  .media--bleed { margin: 0 auto; max-width: 900px; }
  .media--bleed img { border-radius: 6px; }
  .media--inset { margin: 0 auto; max-width: 900px; }
  .media--narrow { max-width: 560px; margin: 0 auto; }
  .stack { grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 auto; max-width: 960px; }
  .stack--2 { grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 820px; }
  .stack img { border-radius: 6px; }
  .credits { margin: 120px auto 0; max-width: none; text-align: center; }
  h2.left { padding: 0; text-align: center; }

  .work-intro { font-size: 28px; line-height: 1.2; margin: 0 0 40px; }
  .work-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 0; }
  .work-card { aspect-ratio: 4 / 3; border-radius: 8px; }
  .work-card span { opacity: 1; transform: none; font-size: 30px; }

  .carousel { margin: 0 auto; max-width: 900px; }
  .carousel-btn { width: 44px; height: 44px; }

  .about-figure { margin-top: 0; }
  .about-figure figcaption { top: 50%; font-size: 22px; }
  .about-figure .cap-left { right: calc(50% + 90px); max-width: 170px; }
  .about-figure .cap-right { left: calc(50% + 104px); }
  .stack--large { grid-template-columns: 1fr; gap: 24px; max-width: 900px; }
  .polaroids { height: 420px; margin-top: 90px; max-width: 980px; margin-left: auto; margin-right: auto; }
  .polaroid { width: 230px; height: 306px; }
  .polaroid-1 { left: 3%;  top: 20px; transform: rotate(-9deg); }
  .polaroid-2 { left: 27%; top: 50px; transform: rotate(8deg); }
  .polaroid-3 { left: 52%; top: 10px; transform: rotate(-6deg); }
  .polaroid-4 { left: 76%; top: 60px; transform: rotate(11deg); }
  .polaroids .p-star-1 { left: 24%; top: -10px; }
  .polaroids .p-star-2 { left: 50%; top: 330px; }
  .polaroids .p-star-3 { left: 74%; top: 0; }

  .contact-list { margin: 70px 0 0; }
}

@media (min-width: 1200px) {
  .hero-star-wrap { width: min(48vh, 480px); }
  .hero-name { font-size: calc(min(48vh, 480px) * 0.30); }
}
