/* ================================================================
   EVELYN SU — PORTFOLIO
   ================================================================ */

/* ---- DESIGN TOKENS ---- */
:root {
  --bg:        #F6F4F0;
  --bg-2:      #EEEAE3;
  --bg-3:      #E6E2DA;
  --black:     #0C0C0B;
  --text:      #1C1A17;
  --muted:     #7A7570;
  --stone:     #8E8880;
  --stone-lt:  #CAC5BE;
  --blue:      #6FA3C4;
  --red:       #C04030;
  --gold:      #D4A537;
  --white:     #FFFFFF;

  --ff-cursive: 'Great Vibes', cursive;
  --ff-serif:   'Cormorant Garamond', serif;
  --ff-sans:    'Work Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  --nav-h: 68px;
  --px:    clamp(24px, 5vw, 72px);   /* global horizontal page padding */
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- SELECTION COLOUR ---- */
::selection         { background: var(--red); color: #fff; }
::-moz-selection    { background: var(--red); color: #fff; }

/* ---- RESET & BASE ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: none; }
ul { list-style: none; }

/* ---- CUSTOM CURSOR ---- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  will-change: transform;
  /* no transform transition — JS drives movement directly via rAF */
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--red);
  transition: width .2s var(--ease), height .2s var(--ease), background .2s;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(192,64,48,.45);
  transition: width .25s var(--ease), height .25s var(--ease),
              border-color .25s, opacity .25s;
}
.cursor-ring.ring-hover  { width: 50px; height: 50px; border-color: var(--red); }
.cursor-dot.dot-hover    { width: 4px;  height: 4px; }
.cursor-ring.ring-click  { width: 24px; height: 24px; }

/* ---- NAV ---- */
.nav {
  position: fixed; inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 64px);
  z-index: 1000;
  transition: background .45s, backdrop-filter .45s, box-shadow .45s;
}
.nav-scrolled {
  background: rgba(246,244,240,.88);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(12,12,11,.07);
}
.nav-logo   { display: flex; align-items: center; flex-shrink: 0; }
.su-stamp   { width: auto; height: 72px; transition: opacity .3s; display: block;
               mix-blend-mode: multiply; }   /* makes white bg transparent on nav */
.su-stamp:hover { opacity: .75; }
.su-stamp-fallback {
  display: none;        /* shown only when image 404s */
  align-items: center;
  justify-content: center;
  width: 56px; height: 36px;
  border: 2px solid var(--black);
  font-family: 'Arial Black', sans-serif;
  font-size: 18px; font-weight: 900;
  letter-spacing: 2px;
  color: var(--black);
}

.nav-links  { display: flex; align-items: center; gap: 38px; }
.nav-links li { display: flex; align-items: center; }
.nav-link {
  font-size: 11.5px; font-weight: 400; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text);
  position: relative; padding: 0;
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; margin: 0;
  line-height: 1;
  transition: color .3s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--black);
  transition: width .35s var(--ease);
}
.nav-link:hover::after, .nav-link:focus::after { width: 100%; }
.nav-link svg { transition: transform .3s var(--ease); }
.nav-dropdown:hover .nav-link svg { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 18px); left: 50%;
  transform: translate(-50%, 6px);
  background: var(--bg);
  border: 1px solid rgba(12,12,11,.09);
  border-radius: 10px;
  padding: 8px 0; min-width: 210px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  box-shadow: 0 12px 36px rgba(12,12,11,.09);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, 0);
}
.dropdown-menu li a {
  display: block; padding: 10px 22px;
  font-size: 12.5px; letter-spacing: .04em;
  transition: background .2s, padding-left .25s var(--ease);
}
.dropdown-menu li a:hover { background: var(--bg-2); padding-left: 28px; }

/* Mobile nav */
.nav-menu-btn {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 6px;
}
.nav-menu-btn span {
  display: block; width: 22px; height: 1.5px;
  background: var(--black);
  transition: transform .35s var(--ease), opacity .35s;
}
.nav-menu-btn.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-menu-btn.active span:nth-child(2) { opacity: 0; }
.nav-menu-btn.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0;
  background: var(--bg); z-index: 998;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
  opacity: 0; pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .4s, transform .4s var(--ease);
}
.mobile-menu.active { opacity: 1; pointer-events: all; transform: translateY(0); }
.mobile-menu a {
  font-family: var(--ff-sans); font-size: 32px; font-weight: 300;
  transition: color .3s;
}
.mobile-menu a:hover { color: var(--stone); }

/* ---- SIDE PANELS (Work + Skills) — shared base ---- */
.work-side,
.skills-side {
  position: fixed;
  z-index: 900;
  display: flex;
  align-items: center;
  cursor: none;
}

/* Work: left edge, upper-center */
.work-side   { left: 0;  top: 50%; transform: translateY(-50%); }
/* Skills: right edge, center */
.skills-side { right: 0; top: 50%; transform: translateY(-50%); }

/* Tab — clean vertical label with red-dot accent */
.work-side-tab,
.skills-side-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 13px 10px;
  position: relative;
}

.work-side-tab::after,
.skills-side-tab::after {
  content: '';
  display: block;
  width: 3px; height: 3px;
  background: var(--red);
  border-radius: 50%;
  margin-top: 10px;
  opacity: 0.28;
  transition: opacity .35s;
}
.work-side:hover  .work-side-tab::after,
.skills-side:hover .skills-side-tab::after { opacity: 1; }

.work-side-letter,
.skills-side-letter {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--stone);
  line-height: 2;
  transition: color .32s var(--ease);
}
.work-side:hover  .work-side-letter,
.skills-side:hover .skills-side-letter { color: var(--black); }

/* Transparent frosted-glass popup — shared base */
.work-side-menu,
.skills-side-menu {
  position: absolute;
  top: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  background: rgba(246,244,240,.72);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(12,12,11,.07);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(12,12,11,.08);
}

/* Work popup opens to the RIGHT */
.work-side-menu {
  left: 100%;
  transform: translateY(-50%) translateX(-10px);
}
.work-side:hover .work-side-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}

/* Skills popup opens to the LEFT */
.skills-side-menu {
  right: 100%;
  transform: translateY(-50%) translateX(10px);
}
.skills-side:hover .skills-side-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}

/* Work popup — link list */
.work-side-menu {
  padding: 8px 0;
  min-width: 228px;
  white-space: nowrap;
}

.work-side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 22px;
  font-family: var(--ff-sans);
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--text);
  transition: background .2s, padding-left .28s var(--ease);
}
.work-side-item:hover { background: rgba(12,12,11,.05); padding-left: 28px; }

.work-side-soon { color: var(--stone); }
.work-side-soon:hover {
  color: var(--stone);
  padding-left: 22px;
  background: transparent;
  cursor: not-allowed;
}
.work-soon-tag {
  font-size: 8px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone-lt);
  border: 1px solid var(--stone-lt);
  border-radius: 4px; padding: 1px 5px;
}

/* Skills popup — categorised layout */
.skills-side-menu { padding: 14px 16px; }

.skills-popup-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 380px;
  max-height: 72vh;
  overflow-y: auto;
}

/* Category section */
.skill-cat-section { display: flex; flex-direction: column; gap: 6px; }
.skill-cat-label {
  font-family: var(--ff-sans);
  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--black);
  opacity: .4;
}
.skill-cat-row { display: flex; flex-wrap: wrap; gap: 5px; }

/* Every card is exactly 56×64px — fully uniform */
.skills-popup-grid .skill-card {
  width: 56px;
  height: 64px;
  padding: 0;
  border-radius: 8px;
  gap: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(246,244,240,.6);
  border-color: rgba(12,12,11,.05);
  overflow: hidden;
}
.skills-popup-grid .skill-card:hover {
  background: rgba(255,255,255,.88);
  border-color: rgba(12,12,11,.1);
}
.skills-popup-grid .skill-icon-wrap {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.skills-popup-grid .skill-icon  { width: 22px; height: 22px; }
.skills-popup-grid .skill-emoji { font-size: 18px; line-height: 1; }
.skills-popup-grid .skill-name  {
  font-size: 7.5px; letter-spacing: .04em;
  text-align: center; line-height: 1.2;
  padding: 0 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  width: 100%;
}

@media (max-width: 768px) {
  .work-side   { display: none; }
  .skills-side { display: none; }
}

/* ================================================================
   LANDING PAGE — portal entry
   ================================================================ */
.page-landing {
  background: var(--bg);
  overflow: hidden;
  height: 100dvh;
}

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px var(--px) 40px;
  gap: 0;
  position: relative;
}

/* evlynsu name logo */
.landing-logo {
  display: block;
  width: clamp(160px, 28vw, 360px);
  height: auto;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
  margin-bottom: -8px;
  animation: landing-fadein .9s ease both;
}

/* EV character container */
.landing-ev-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: none;
  animation: landing-fadein 1.1s .15s ease both, ev-float 3.2s ease-in-out infinite;
}

.landing-ev-img {
  display: block;
  width: clamp(220px, 52vw, 460px);
  height: auto;
  max-width: 90vw;
  filter: drop-shadow(0 16px 40px rgba(12,12,11,.14));
  animation: ev-flip 6s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
  transition: filter .2s;
}
.landing-ev-wrap:hover .landing-ev-img {
  filter: drop-shadow(0 20px 48px rgba(12,12,11,.22));
}

/* Bounce animation on click */
@keyframes ev-bounce {
  0%   { transform: scale(1)    translateY(0); }
  28%  { transform: scale(0.91) translateY(6px); }
  58%  { transform: scale(1.1)  translateY(-14px); }
  78%  { transform: scale(0.97) translateY(3px); }
  100% { transform: scale(1)    translateY(0); }
}
.ev-bouncing { animation: ev-bounce .62s ease-out !important; }

/* Tap hint */
.landing-hint {
  font-family: var(--ff-sans);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 12px 0 0;
  animation: landing-fadein 1.3s .4s ease both, hint-breathe 3s 1.8s ease-in-out infinite;
  transition: opacity .35s, transform .35s;
}
.landing-hint.hint-gone {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
@keyframes hint-breathe {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1;  }
}

/* Choice cards */
.choice-wrap {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-bottom: 48px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.choice-wrap.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
}

.choice-img {
  width: clamp(180px, 32vw, 280px);
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform .28s var(--ease), filter .25s;
}
.choice-btn:hover .choice-img {
  transform: translateY(-4px) scale(1.04);
  filter: brightness(1.06);
}

.choice-sub {
  font-family: var(--ff-sans);
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--black);
  opacity: .45;
  margin-top: -42px;
}

/* Fade-in for landing elements */
@keyframes landing-fadein {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   EXPLORE PAGE — "Get to Know Me"
   ================================================================ */
.explore-hero {
  padding: calc(var(--nav-h) + 72px) var(--px) 48px;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.explore-eyebrow {
  font-family: var(--ff-sans);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 20px;
}
.explore-title {
  font-family: var(--ff-sans);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 18px;
}
.explore-title em { font-style: italic; }
.explore-intro-img {
  display: block;
  width: clamp(280px, 60vw, 560px);
  height: auto;
  margin: 0 auto 18px;
}
.explore-desc {
  font-family: var(--ff-sans);
  font-size: 14px;
  color: var(--stone);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto;
}

/* Chatbox on explore page — wider, centred */
.explore-chat-section {
  display: flex;
  justify-content: center;
  padding: 0 var(--px) 72px;
}
.explore-chat {
  width: 100%;
  max-width: 660px !important;
}

/* Work grid */
.explore-work {
  padding: 0 var(--px) 96px;
  max-width: 1080px;
  margin: 0 auto;
}
.explore-section-title {
  font-family: var(--ff-sans);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  margin-bottom: 32px;
}
.explore-work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.explore-work-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 22px;
  border: 1px solid rgba(12,12,11,.1);
  border-radius: 16px;
  background: var(--bg);
  text-decoration: none;
  color: var(--black);
  transition: background .25s var(--ease), border-color .25s, transform .25s var(--ease);
}
a.explore-work-card:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--bg);
  transform: translateY(-3px);
}
.explore-work-card--soon {
  opacity: .55;
  cursor: default;
}
.ewc-icon  { font-size: 26px; }
.ewc-title {
  font-family: var(--ff-sans);
  font-size: 18px;
  font-weight: 300;
  flex: 1;
}
.ewc-arrow {
  font-size: 16px;
  opacity: .4;
  align-self: flex-end;
  transition: opacity .2s, transform .2s;
}
a.explore-work-card:hover .ewc-arrow {
  opacity: 1;
  transform: translateX(4px);
}
.ewc-tag {
  font-family: var(--ff-sans);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .5;
}

/* Mobile landing */
@media (max-width: 540px) {
  .choice-wrap   { gap: 10px; }
  .choice-card   { min-width: 160px; padding: 16px 18px 14px; }
  .choice-title  { font-size: 17px; }
  .landing-ev-img { width: clamp(180px, 72vw, 340px); height: auto; }
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Subtle paper grain */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03; mix-blend-mode: multiply;
}

/* Name logo — sits inside ev-hero above popo */
.hero-name-img {
  display: block;
  width: clamp(180px, 30vw, 420px);
  height: auto;
  mix-blend-mode: multiply;
  margin: 0 auto;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}

/* Stage: flex column, bottom-aligned, no clipping */
.hero-stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  z-index: 2;
  min-height: 260px;
  padding-top: clamp(16px, 3vh, 36px);
}

/* ---- EV HERO (centered column: logo → EV) ---- */
.ev-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: all;
  cursor: none;
  gap: 0;
}

/* Wrapper that speech bubble is relative to */
.ev-img-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: -18px; /* pull popo up closer to the name logo */
}
.ev-speech {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--black);
  color: var(--bg);
  font-family: var(--ff-sans);
  font-size: 11px; font-weight: 400;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  margin-bottom: 6px;
  opacity: 0;
  transition: opacity .25s, transform .25s var(--ease);
  pointer-events: none;
  box-shadow: 0 3px 14px rgba(12,12,11,.14);
  z-index: 10;
}
.ev-speech::after {
  content: ''; position: absolute;
  top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--black);
}
.ev-speech.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ev-hero-img {
  display: block;
  height: clamp(260px, 48vh, 460px);
  width: auto;
  max-width: none;
  filter: drop-shadow(0 14px 32px rgba(12,12,11,.18));
  user-select: none;
  -webkit-user-drag: none;
  animation: ev-float 3.2s ease-in-out infinite;
}

/* ---- EV CONTACT BUTTON + POPUP ---- */
.ev-contact {
  position: absolute;
  right: 0;
  top: 44%;
  transform: translate(calc(100% + 14px), -50%);
  z-index: 10;
}
.ev-contact-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--black);
  border: none;
  color: rgba(246,244,240,.9);
  display: flex; align-items: center; justify-content: center;
  cursor: none;
  box-shadow: 0 4px 16px rgba(12,12,11,.22);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.ev-contact-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 22px rgba(12,12,11,.3);
}
.ev-contact-popup {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  background: var(--black);
  color: rgba(246,244,240,.92);
  font-family: var(--ff-sans);
  font-size: 12px;
  letter-spacing: .03em;
  padding: 9px 18px;
  border-radius: 22px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  box-shadow: 0 6px 24px rgba(12,12,11,.18);
}
.ev-contact-popup a { color: inherit; text-decoration: none; }
.ev-contact-popup a:hover { text-decoration: underline; text-underline-offset: 2px; }
.ev-contact-popup.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}

/* EV reactions */
.ev-hero-img.ev-wiggle { animation: ev-wiggle .5s ease-in-out forwards; }
.ev-hero-img.ev-jump   { animation: ev-jump  .6s cubic-bezier(.36,.07,.19,.97) forwards; }
.ev-hero-img.ev-shy    { animation: ev-shy   .55s ease-in-out forwards; }

@keyframes ev-wiggle {
  0%,100% { transform: rotate(0deg)  scale(1); }
  20%     { transform: rotate(-8deg) scale(1.06); }
  40%     { transform: rotate( 8deg) scale(1.06); }
  60%     { transform: rotate(-5deg) scale(1.03); }
  80%     { transform: rotate( 5deg) scale(1.03); }
}
@keyframes ev-jump {
  0%   { transform: translateY(0)     scale(1, 1); }
  28%  { transform: translateY(-36px) scale(1.1, 0.9); }
  56%  { transform: translateY(-14px) scale(0.95, 1.05); }
  78%  { transform: translateY(-3px)  scale(1.02, 0.98); }
  100% { transform: translateY(0)     scale(1, 1); }
}
@keyframes ev-shy {
  0%,100% { transform: scale(1)    rotate(0deg); }
  30%     { transform: scale(0.92) rotate(-4deg); }
  65%     { transform: scale(0.96) rotate(3deg); }
}
@keyframes ev-float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-12px); }
}
@keyframes ev-flip {
  0%,  36%  { transform: scaleX(1); }
  42%       { transform: scaleX(-1); }
  58%       { transform: scaleX(-1); }
  64%, 100% { transform: scaleX(1); }
}

/* ---- CHATBOX ---- */
.chat-wrap {
  width: 100%;
  max-width: 560px;
  padding: 0 clamp(16px, 4vw, 32px) clamp(20px, 4vh, 40px);
  flex-shrink: 0;
  position: relative; z-index: 2;
}
.chat-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}
.chat-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(246,244,240,.22);
  background: rgba(12,12,11,.55);
  font-family: var(--ff-sans);
  font-size: 11px;
  letter-spacing: .04em;
  color: rgba(246,244,240,.75);
  cursor: none;
  transition: background .2s, color .2s, border-color .2s;
}
.chat-chip:hover { background: var(--bg); color: var(--black); border-color: var(--bg); }
.chat-body {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(12,12,11,.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(12,12,11,.28);
}
.chat-messages {
  height: 200px;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }
.chat-msg {
  display: flex;
  align-items: flex-end;
  animation: msg-in .22s var(--ease) both;
}
.chat-msg--user { flex-direction: row-reverse; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.chat-bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 14px;
  font-family: var(--ff-sans);
  font-size: 12px;
  line-height: 1.55;
}
.chat-msg--ai   .chat-bubble { background: rgba(255,255,255,.09); color: rgba(246,244,240,.9); border-bottom-left-radius: 3px; }
.chat-msg--user .chat-bubble { background: rgba(255,255,255,.18); color: rgba(246,244,240,.95); border-bottom-right-radius: 3px; }
.typing-dot {
  display: inline-block; width: 5px; height: 5px;
  background: rgba(246,244,240,.35); border-radius: 50%; margin: 0 2px;
  animation: typing-bounce .9s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .30s; }
@keyframes typing-bounce {
  0%,80%,100% { transform: translateY(0); }
  40%          { transform: translateY(-4px); }
}
.chat-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.chat-input {
  flex: 1; border: none; background: transparent;
  font-family: var(--ff-sans); font-size: 12.5px; color: rgba(246,244,240,.9); outline: none;
}
.chat-input::placeholder { color: rgba(246,244,240,.28); }
.chat-send {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: rgba(246,244,240,.9); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: none; flex-shrink: 0; transition: background .2s;
}
.chat-send:hover { background: rgba(255,255,255,.28); }
.hero-tags {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.hero-dot { color: var(--stone-lt); }

.scroll-hint {
  position: absolute; bottom: 38px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--stone);
  pointer-events: none;
  will-change: opacity;
}
.scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--stone) 0%, transparent 100%);
  animation: line-pulse 2.2s ease-in-out infinite;
}
@keyframes line-pulse {
  0%,100% { opacity:.35; transform: scaleY(1) translateY(0); }
  50%      { opacity:1;   transform: scaleY(1.15) translateY(2px); }
}

/* ---- DESIGN STUDIO CTA ---- */
.design-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  margin-bottom: 20px;
  border: 1px solid rgba(12,12,11,.15);
  border-radius: 32px;
  background: rgba(12,12,11,.04);
  text-decoration: none;
  color: var(--black);
  font-family: var(--ff-sans);
  transition: background .25s var(--ease), border-color .25s, transform .2s var(--ease);
  z-index: 3;
}
.design-cta:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--bg);
  transform: translateY(-2px);
}
.design-cta-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}
.design-cta-sub {
  font-size: 10px;
  opacity: .55;
  letter-spacing: .06em;
}
.design-cta:hover .design-cta-sub { opacity: .72; }
.design-cta-arrow {
  flex-shrink: 0;
  opacity: .6;
  transition: transform .25s var(--ease), opacity .25s;
}
.design-cta:hover .design-cta-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* ---- ABOUT ---- */
.about {
  padding: clamp(80px, 12vw, 160px) clamp(24px, 8vw, 120px);
  background: var(--bg);
}
.about-inner {
  max-width: 720px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr;
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}

/* Section label */
.section-label {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 36px;
  display: flex; align-items: center; gap: 14px;
}
.section-label::before {
  content: ''; width: 26px; height: 1px;
  background: var(--stone-lt); flex-shrink: 0;
}
.section-label::after {
  content: ''; width: 4px; height: 4px;
  background: var(--red); border-radius: 50%; flex-shrink: 0;
  opacity: 0.6;
}

/* Bio Layers */
.bio-layers { margin-bottom: 30px; }
.bio-l1, .bio-l2, .bio-l3 {
  font-family: var(--ff-sans);
  font-size: clamp(26px, 3.8vw, 46px);
  font-weight: 300; line-height: 1.25;
  letter-spacing: -.01em;
  opacity: 0; /* animated in by GSAP */
}
.bio-l1 { color: var(--text); }
.bio-l2 { color: var(--stone); padding-left: clamp(14px, 2.5vw, 44px); }
.bio-l3 { font-style: italic; padding-left: clamp(28px, 5vw, 88px); }

.bio-body {
  margin-bottom: 44px;
  display: flex; flex-direction: column; gap: 16px;
}
.bio-body p {
  font-size: 15px; line-height: 1.85;
  color: var(--muted); font-weight: 300;
}

.about-ctas { display: flex; flex-direction: column; gap: 14px; }
.cta-arrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text); width: fit-content;
  transition: gap .35s var(--ease), color .3s;
}
.cta-arrow svg { transition: transform .35s var(--ease); flex-shrink: 0; opacity: .7; }
.cta-arrow:hover { color: var(--black); gap: 20px; }
.cta-arrow:hover svg { transform: translateX(5px); opacity: 1; }

/* Photo */
.about-photo  { display: flex; justify-content: center; align-items: flex-start; padding-top: 8px; }
.photo-frame  { position: relative; width: clamp(240px, 28vw, 400px); aspect-ratio: 3/4; }
.headshot {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  border-radius: 3px;
  filter: grayscale(20%);
  transition: filter .7s;
}
.headshot:hover { filter: grayscale(0%); }
.headshot-placeholder {
  display: none;
  width: 100%; height: 100%;
  background: var(--bg-2);
  border-radius: 3px;
  align-items: center; justify-content: center;
  font-family: var(--ff-sans); font-size: 80px; color: var(--stone-lt);
}
.photo-deco {
  position: absolute; bottom: -18px; right: -18px;
  width: 68%; height: 68%;
  border: 1px solid var(--stone-lt); border-radius: 3px;
  z-index: -1;
  transition: transform .5s var(--ease);
}
.photo-frame:hover .photo-deco { transform: translate(5px, 5px); }

/* ---- SKILLS ---- */
.skills {
  padding: clamp(70px, 10vw, 130px) clamp(24px, 8vw, 120px);
  background: var(--bg-2);
}
.skills-inner { max-width: 1200px; margin: 0 auto; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.skill-card {
  background: var(--bg);
  border: 1px solid rgba(12,12,11,.065);
  border-radius: 10px;
  padding: 22px 12px 16px;
  display: flex; flex-direction: column;
  align-items: center; gap: 11px;
  cursor: none;
  transition: border-color .3s, box-shadow .35s;
  transform-style: preserve-3d;
  will-change: transform;
}
.skill-card:hover {
  border-color: rgba(12,12,11,.14);
  box-shadow: 0 10px 32px rgba(12,12,11,.08);
}
.skill-icon-wrap {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
}
.skill-icon    { width: 38px; height: 38px; object-fit: contain; }
.skill-emoji   { font-size: 32px; line-height: 1; }
.skill-name    {
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-align: center; line-height: 1.3;
}

/* ---- FOOTER ---- */
.footer {
  padding: clamp(52px, 8vw, 88px) clamp(24px, 8vw, 120px);
  background: var(--black);
  color: rgba(246,244,240,.88);
}
.footer-inner  { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.footer-top    { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 28px; }
.footer-logo-img {
  height: 72px; width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.88;
  display: block;
}
.footer-links  { display: flex; flex-direction: column; gap: 10px; }
.footer-link   {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: rgba(246,244,240,.5);
  letter-spacing: .04em;
  transition: color .3s;
}
.footer-link svg { width: 13px; height: 13px; flex-shrink: 0; }
.footer-link:hover { color: var(--bg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
                 padding-top: 28px; border-top: 1px solid rgba(246,244,240,.08); }
.footer-copy   { font-size: 10.5px; color: rgba(246,244,240,.25); letter-spacing: .08em; text-transform: uppercase; }
.footer-nav    { display: flex; gap: 20px; }
.footer-nav a  { font-size: 11px; color: rgba(246,244,240,.3); letter-spacing: .08em;
                 text-transform: uppercase; transition: color .3s; }
.footer-nav a:hover { color: rgba(246,244,240,.7); }

/* ---- CONNECT BUTTONS (footer 3-button layout) ---- */
.connect-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 50px;
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(246,244,240,.75);
  border: 1px solid rgba(246,244,240,.15);
  background: rgba(246,244,240,.06);
  transition: background .25s, color .25s, border-color .25s;
  text-decoration: none;
  white-space: nowrap;
}
.connect-btn:hover {
  background: rgba(246,244,240,.12);
  color: var(--bg);
  border-color: rgba(246,244,240,.3);
}
.connect-btn svg { flex-shrink: 0; }
@media (max-width: 600px) {
  .connect-btns { flex-direction: row; flex-wrap: wrap; }
}


/* ---- REVEAL (initial invisible for GSAP) ---- */
[data-reveal] { opacity: 0; transform: translateY(36px); }

/* ================================================================
   SUB-PAGE SHARED STYLES
   ================================================================ */
.page-header {
  padding: calc(var(--nav-h) + clamp(60px, 8vw, 100px)) clamp(24px, 8vw, 120px) clamp(40px, 6vw, 72px);
  background: var(--bg);
  max-width: 1200px; margin: 0 auto;
}
.page-header h1 {
  font-family: var(--ff-sans);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 300; letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-header p {
  font-size: 15px; color: var(--muted); font-weight: 300; line-height: 1.75;
  max-width: 560px;
}

.page-section {
  padding: clamp(32px, 5vw, 60px) clamp(24px, 8vw, 120px) clamp(60px, 10vw, 120px);
  max-width: 1200px; margin: 0 auto;
}

/* Project grid */
.project-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.project-card {
  background: var(--bg-2);
  border: 1px solid rgba(12,12,11,.06);
  border-radius: 12px; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s;
  cursor: none;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(12,12,11,.1);
}
.project-card-img {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.project-card-img-placeholder {
  font-family: var(--ff-sans); font-size: 48px; color: var(--stone-lt);
  transition: transform .5s var(--ease);
}
.project-card:hover .project-card-img-placeholder { transform: scale(1.08); }
.project-card-body { padding: 24px 26px 28px; }
.project-card-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}
.tag {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(12,12,11,.06); color: var(--muted);
}
.project-card h2 {
  font-family: var(--ff-sans); font-size: 26px; font-weight: 400;
  margin-bottom: 10px; line-height: 1.2;
}
.project-card p {
  font-size: 14px; color: var(--muted); line-height: 1.75;
  font-weight: 300; margin-bottom: 20px;
}
.project-link {
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
  transition: gap .3s var(--ease), color .3s;
}
.project-link svg { transition: transform .3s var(--ease); }
.project-link:hover { gap: 16px; color: var(--stone); }
.project-link:hover svg { transform: translateX(4px); }

/* Gallery grid (photography) */
.gallery-grid {
  columns: 3; column-gap: 16px;
}
.gallery-item {
  break-inside: avoid; margin-bottom: 16px;
  border-radius: 6px; overflow: hidden;
  background: var(--bg-3);
  aspect-ratio: var(--ar, 1);
  position: relative;
  transition: transform .4s var(--ease);
  cursor: none;
}
.gallery-item:hover { transform: scale(1.01); }
.gallery-placeholder {
  width: 100%; height: 100%; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-sans); font-size: 20px; font-weight: 300;
  color: var(--stone-lt);
}

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 32px;
  transition: color .3s, gap .3s var(--ease);
}
.back-link svg { transition: transform .3s var(--ease); }
.back-link:hover { color: var(--black); gap: 14px; }
.back-link:hover svg { transform: translateX(-4px); }

/* ================================================================
   RESPONSIVE SYSTEM
   ─── Desktop      › 1024px  (base styles above)
   ─── Tablet       640 – 1024px
   ─── Mobile       480 – 640px
   ─── Small mobile  0 – 480px
   ================================================================ */

/* ── Tablet (≤ 768px) ────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Nav */
  .nav-links    { display: none; }
  .nav-menu-btn { display: flex; }

  /* Hero — shorter scroll travel on tablet */
  .hero-outer { height: 260vh; }

  /* About — single column, photo on top */
  .about { padding: clamp(64px, 9vw, 100px) clamp(24px, 6vw, 72px); }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about-photo { order: -1; justify-content: flex-start; }
  .photo-frame { width: min(300px, 60vw); }
  .photo-deco  { display: none; }  /* cleaner without deco on tablet */

  /* Bio layers — slightly tighter indent */
  .bio-l2 { padding-left: clamp(12px, 3vw, 36px); }
  .bio-l3 { padding-left: clamp(24px, 6vw, 72px); }

  /* Skills — 4 columns */
  .skills-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }

  /* Footer */
  .footer-top   { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Sub-pages */
  .project-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .gallery-grid { columns: 2; column-gap: 12px; }
  .page-section { padding-left: clamp(24px, 5vw, 72px); padding-right: clamp(24px, 5vw, 72px); }
  .page-header  { padding-left: clamp(24px, 5vw, 72px); padding-right: clamp(24px, 5vw, 72px); }
}

/* ── Mobile (≤ 640px) ─────────────────────────────────────────── */
@media (max-width: 640px) {

  /* Nav */
  .nav { padding: 0 18px; height: 60px; }
  .su-stamp { height: 42px; }

  /* Hero — compact scroll travel */
  .hero-outer { height: 230vh; }
  .ev-hero-img  { height: clamp(220px, 52vh, 420px); }
  .ev-speech    { font-size: 11px; padding: 7px 14px; }
  .scroll-hint  { bottom: 24px; }
  .scroll-line  { height: 32px; }

  /* About */
  .about { padding: 56px 20px 60px; }
  .about-inner { gap: 32px; }
  .about-photo { justify-content: center; }
  .photo-frame { width: min(240px, 72vw); }
  .section-label { margin-bottom: 24px; }

  .bio-l1, .bio-l2, .bio-l3 { font-size: clamp(22px, 6.5vw, 32px); }
  .bio-l2 { padding-left: 14px; }
  .bio-l3 { padding-left: 28px; }
  .bio-body { margin-bottom: 32px; }
  .bio-body p { font-size: 14px; line-height: 1.8; }
  .about-ctas { gap: 10px; }
  .cta-arrow  { font-size: 10.5px; }

  /* Skills */
  .skills { padding: 48px 20px 56px; }
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .skill-card { padding: 16px 8px 13px; gap: 8px; border-radius: 8px; }
  .skill-icon-wrap { width: 34px; height: 34px; }
  .skill-icon  { width: 30px; height: 30px; }
  .skill-emoji { font-size: 26px; }
  .skill-name  { font-size: 9.5px; }

  /* Footer */
  .footer { padding: 40px 20px 36px; }
  .footer-inner { gap: 24px; }
  .footer-logo  { font-size: 40px; }
  .footer-links { flex-direction: column; gap: 12px; }
  .footer-link  { font-size: 12px; }
  .footer-copy  { font-size: 9.5px; }
  .footer-nav   { gap: 14px; }
  .footer-nav a { font-size: 9.5px; }


  /* Sub-pages */
  .project-grid { grid-template-columns: 1fr; gap: 16px; }
  .project-card h2 { font-size: 22px; }
  .project-card p  { font-size: 13px; }
  .gallery-grid { columns: 2; column-gap: 10px; }
  .gallery-item { margin-bottom: 10px; }
  .page-header { padding-left: 20px; padding-right: 20px; padding-top: 100px; }
  .page-header h1 { font-size: clamp(28px, 8vw, 40px); margin-bottom: 12px; }
  .page-header p  { font-size: 14px; }
  .page-section   { padding: 24px 20px 60px; }
  .back-link { margin-bottom: 20px; }
}

/* ── Small Mobile (≤ 420px) ──────────────────────────────────── */
@media (max-width: 420px) {

  /* Hero */
  .ev-hero-img { height: clamp(180px, 48vh, 320px); }

  /* Skills — 2 columns on very small screens */
  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }

  /* About */
  .bio-l1, .bio-l2, .bio-l3 { font-size: 22px; }

  /* Gallery */
  .gallery-grid { columns: 1; }

  /* Footer */
  .footer-logo { font-size: 36px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .footer-nav { flex-wrap: wrap; gap: 10px; }

}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--stone-lt); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--stone); }

/* ---- SELECTION (defined at top of file in red) ---- */
