@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

@view-transition { navigation: auto; }

/* ===== VIEW TRANSITION TIMING ===== */
/* All named shared-element groups (card-bg-*, vt-*): slower expo-out morph */
::view-transition-group(*) {
  animation-duration: 480ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
/* Root (non-shared content): old page scales back, new page lifts in */
::view-transition-old(root) {
  animation: 320ms cubic-bezier(0.4, 0, 1, 1) both vt-exit;
}
::view-transition-new(root) {
  animation: 400ms cubic-bezier(0.16, 1, 0.3, 1) both vt-enter;
}
@keyframes vt-exit {
  to { opacity: 0; transform: scale(0.97); }
}
@keyframes vt-enter {
  from { opacity: 0; transform: scale(1.01) translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation-duration: 0.01ms !important; }
}

/* Fixed chrome (nav, dot-nav) shouldn't get swept into the root page's scale/translate
   sweep above — give it its own named group and disable animation so it just persists
   instead of swimming through whatever named element (card title, etc.) is morphing. */
.top-nav { view-transition-name: top-nav; }
.dot-nav { view-transition-name: dot-nav; }
::view-transition-group(top-nav),
::view-transition-group(dot-nav) {
  animation: none;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  transition: background-color 0.8s ease;
}

/* about-visible added by JS when scrolling to #about */
body.about-visible {
  overflow-y: auto;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===== TOP NAV ===== */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(9, 12, 17, 0.85) 0%, rgba(9, 12, 17, 0.5) 60%, transparent 100%);
}
.top-nav > * { pointer-events: all; }

.wordmark {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  user-select: none;
  cursor: pointer;
}
.interpunct {
  transition: color 0.2s ease;
}
.wordmark:hover .interpunct {
  color: var(--accent);
}

.about-back-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 48px auto 64px;
  padding: 10px 20px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.about-back-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.mode-pill {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
}

.mode-btn {
  position: relative;
  z-index: 1;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  transition: color 0.2s ease;
}
.mode-btn.active {
  color: #0B0E13;
  font-weight: 600;
}
.mode-btn:hover:not(.active) {
  color: var(--text);
}

/* sliding fill — color-matches the active project's brand (--toggle-accent),
   set in setLeftPanelContent() in main.js as the active card changes */
.mode-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--toggle-accent-gradient, var(--toggle-accent, var(--accent)));
  box-shadow: 0 0 18px color-mix(in srgb, var(--toggle-accent, var(--accent)) 55%, transparent);
  transition:
    left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.4s ease,
    box-shadow 0.4s ease;
  pointer-events: none;
}

/* ---- Other options from design/pill-picker.html, kept here for fast swap-back ---- */
/*
A — Underline only (no pill chrome, sliding underline beneath active label):
.mode-pill { padding: 4px 2px; gap: 18px; }
.mode-btn { padding: 7px 0 8px; border-bottom: 1.5px solid transparent; }
.mode-btn.active { color: var(--text); font-weight: 500; }
.mode-indicator { top: auto; bottom: 4px; height: 1.5px; background: var(--text); border-radius: 0; }

B — Flat segmented chip (no blur, no glass):
.mode-pill { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.mode-btn { border-radius: 4px; }
.mode-btn.active { color: var(--text); font-weight: 500; }
.mode-indicator { top: 4px; bottom: 4px; background: var(--panel-2); border-radius: 4px; z-index: 0; }

C — Outline only (transparent center, no fill):
.mode-btn.active { color: var(--text); font-weight: 500; }
.mode-indicator { top: 4px; bottom: 4px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28); background: transparent; }

D — Toned-down glass (quiet blur, no color-matching):
.mode-pill { background: rgba(255,255,255,0.03); backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%); border: 1px solid rgba(255,255,255,0.1); }
.mode-btn.active { color: var(--text); font-weight: 500; }
.mode-indicator { top: 4px; bottom: 4px; border-radius: 999px; background: rgba(255,255,255,0.07); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border: 1px solid rgba(255,255,255,0.16); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18); }

Session 8 unified glass pill (superseded 2026-06-20 — called "hideous" after real-browser review):
.mode-pill { background: rgba(255,255,255,0.05); backdrop-filter: blur(16px) saturate(220%); -webkit-backdrop-filter: blur(16px) saturate(220%); border: 1px solid rgba(255,255,255,0.16); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.mode-btn.active { color: var(--text); }
.mode-indicator { top: 4px; bottom: 4px; border-radius: 999px; background: rgba(255,255,255,0.14); backdrop-filter: blur(20px) saturate(200%); -webkit-backdrop-filter: blur(20px) saturate(200%); border: 1px solid rgba(255,255,255,0.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 2px 10px rgba(0,0,0,0.25); }
*/

.about-link {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.about-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===== LAYOUT SPLIT ===== */
.layout {
  display: grid;
  grid-template-columns: 40fr 60fr;
  height: 100vh;
}

/* ===== LEFT PANEL ===== */
.left-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 120px 56px 64px;
  overflow: hidden;
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  transition: opacity 0.3s ease, transform 0.25s ease;
}
.project-info.is-transitioning {
  opacity: 0;
  transform: translateY(10px);
}

.project-cat {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--toggle-accent, var(--accent));
  margin-bottom: 18px;
}

.project-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 4.5vw, 5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 24px;
}

.project-desc {
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 360px;
  margin-bottom: 36px;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--toggle-accent, var(--accent)) 55%, transparent);
  -webkit-text-fill-color: color-mix(in srgb, var(--toggle-accent, var(--accent)) 55%, transparent);
  transition: color 0.15s ease, -webkit-text-fill-color 0.15s ease;
  width: fit-content;
}
.project-cta .cta-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}
.project-cta:hover {
  color: var(--toggle-accent, var(--accent));
  -webkit-text-fill-color: var(--toggle-accent, var(--accent));
}
.project-cta:hover .cta-arrow {
  transform: translateX(4px);
  color: var(--toggle-accent, var(--accent));
  -webkit-text-fill-color: var(--toggle-accent, var(--accent));
}
.project-cta.is-pending {
  color: var(--text-dim);
  pointer-events: none;
  cursor: default;
}

/* ===== SOCIAL LINKS ===== */
.social-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.social-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  opacity: 0.35;
  transition: opacity 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.social-btn:hover { opacity: 1; color: color-mix(in srgb, var(--accent) 65%, #090C11); }
.social-btn svg { display: block; flex-shrink: 0; }
.social-btn span {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== CARD COLUMN ===== */
.card-column {
  position: relative;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 17%,
    black 83%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 17%,
    black 83%,
    transparent 100%
  );
}
.card-column::-webkit-scrollbar { display: none; }

.card-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 17.5vh 56px 17.5vh 32px;
}
.card-list[hidden] {
  display: none;
}

/* ===== PROJECT CARDS ===== */
.project-card {
  position: relative;
  height: 65vh;
  border-radius: 3px;
  overflow: hidden;
  opacity: 0.35;
  transition: opacity 0.4s ease;
  flex-shrink: 0;
  scroll-snap-align: center;
  display: block;
}
.project-card.is-active { opacity: 1; }
.project-card.is-pending { cursor: default; }

a.project-card {
  transition: opacity 0.4s ease, box-shadow 0.2s ease;
}
a.project-card:hover {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--card-accent) 30%, transparent), 0 32px 64px rgba(0, 0, 0, 0.5);
}
a.project-card:active {
  transform: scale(0.97);
  transition: transform 0.1s ease-out, opacity 0.4s ease, box-shadow 0.2s ease;
}

.card-bg {
  position: absolute;
  inset: 0;
  background: var(--card-bg, var(--panel));
}

/* Transparent-bg img hero — sits centered, floats, zooms on hover */
.hero-img-screened {
  position: absolute;
  max-width: none;
  width: var(--hero-img-w, 80%);
  height: auto;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  mix-blend-mode: var(--hero-img-blend, normal);
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.65));
  animation: heroImgFloat 5s ease-in-out infinite;
  transition: width 0.5s cubic-bezier(0.22, 0.9, 0.32, 1), filter 0.3s ease;
  pointer-events: none;
}
a.project-card:hover .hero-img-screened {
  width: var(--hero-img-w-hover, var(--hero-img-w, 85%));
  animation-play-state: paused;
}
@keyframes heroImgFloat {
  0%, 100% { transform: translateX(-50%) translateY(-50%); }
  50%       { transform: translateX(-50%) translateY(calc(-50% - 9px)); }
}

/* Real-logo hero treatment (creative exhibits) */
.card-bg--logo {
  background-image: var(--hero-image), var(--card-bg, var(--panel));
  background-size: var(--hero-size, 44% auto), cover;
  background-position: var(--hero-pos, center 46%), center;
  background-repeat: no-repeat, no-repeat;
  background-blend-mode: screen, normal;
  transition: background-size 0.5s cubic-bezier(0.22, 0.9, 0.32, 1);
}
a.project-card:hover .card-bg--logo {
  background-size: var(--hero-size-hover, var(--hero-size, 44% auto)), cover;
}

/* Abstract generative hero treatment (professional exhibits) — inline SVG so
   individual shapes can float idly and lock into position on hover. */
.hero-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58%;
  height: auto;
  transform: translate(-50%, -50%);
}
.hero-shape {
  transform-box: fill-box;
  transform-origin: center;
}
.hero-connector {
  fill: none;
  stroke-dasharray: var(--len, 300);
  stroke-dashoffset: var(--len, 300);
  transition: stroke-dashoffset 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
a.project-card:hover .hero-shape {
  animation: none !important;
  transform: translate(0, 0);
  transition: transform 0.6s cubic-bezier(0.22, 0.9, 0.32, 1);
}
a.project-card:hover .hero-connector {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
}
.hero-float-a { animation: heroFloatA 3.6s ease-in-out infinite; }
.hero-float-b { animation: heroFloatB 4.1s ease-in-out infinite; }
.hero-float-c { animation: heroFloatC 3.3s ease-in-out infinite; }
.hero-float-d { animation: heroFloatD 4.4s ease-in-out infinite; }
.hero-float-e { animation: heroFloatA 3.9s ease-in-out infinite 0.3s; }
.hero-float-f { animation: heroFloatB 3.5s ease-in-out infinite 0.5s; }
@keyframes heroFloatA { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(4px, -7px); } }
@keyframes heroFloatB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-5px, 6px); } }
@keyframes heroFloatC { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6px, 5px); } }
@keyframes heroFloatD { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-4px, -6px); } }

.card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 80px 32px 28px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
}
.card-label-cat {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--card-accent, rgba(255, 255, 255, 0.4));
  margin-bottom: 8px;
}
.card-label-title {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.1;
  display: block;
}

/* ===== DOT NAV ===== */
.dot-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  border: none;
  padding: 0;
  opacity: 0.35;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  display: block;
}
.dot.active {
  opacity: 1;
  background: var(--text);
  transform: scale(1.5);
}
.dot:hover:not(.active) {
  opacity: 0.7;
  transform: scale(1.3);
}

/* ===== ABOUT SECTION ===== */
.about-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 56px;
  background: var(--bg);
}
.about-inner {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 72px;
  align-items: start;
  width: 100%;
}

/* Bio column */
.about-thesis {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 32px;
}
.about-bio p {
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  line-height: 1.8;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.about-bio p:last-child { margin-bottom: 0; }

/* Skills column (center) */
.about-sidebar {
  flex: 1;
  min-width: 0;
}
.skill-groups {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 40px;
}
.skill-cat {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-tag {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 5px 12px;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.skill-tag:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* Credentials */
.about-creds {
  padding-top: 36px;
  border-top: 1px solid var(--line-soft);
}
.about-creds p {
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 0;
}
.about-creds p:last-child { margin-bottom: 0; }

/* Credentials in column 3 — reset the column-2 top border/padding */
.about-identity .about-creds {
  padding-top: 0;
  border-top: none;
  margin-bottom: 36px;
}

/* Identity / quote column */
.about-identity {
  padding-left: 40px;
  border-left: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
}
.about-quotemark {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 80px;
  line-height: 0.75;
  color: var(--accent);
  opacity: 0.2;
  margin-bottom: 12px;
  user-select: none;
}
.about-quote {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 16px;
}
.about-attr {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.45;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .project-info,
  .project-card,
  .dot,
  .project-cta .cta-arrow,
  .social-links a,
  .about-link,
  .mode-btn,
  .mode-indicator,
  .hero-shape,
  .hero-img-screened {
    transition: none !important;
    animation: none !important;
  }
  .hero-connector { stroke-dashoffset: 0; }
}

/* Mobile-only social links copy (inside about section) */
.social-links--about { display: none; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  html, body {
    height: auto;
    overflow-y: auto;
  }

  .layout {
    display: block;
    height: auto;
  }

  .left-panel { display: none; }

  .card-column {
    height: auto;
    overflow-y: visible;
    scroll-snap-type: none;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .card-list {
    padding: 80px 16px 32px;
    gap: 12px;
  }

  .project-card {
    height: 72vw;
    opacity: 1;
    scroll-snap-align: none;
  }

  .top-nav {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
  }
  .wordmark { font-size: 11px; letter-spacing: 0.1em; }

  .about-link { display: none; }
  .about-creds .about-link { display: inline; }
  .dot-nav { display: none; }
  .about-section { padding: 60px 24px; }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .about-identity { padding-left: 0; border-left: none; border-top: 1px solid var(--line-soft); padding-top: 32px; }

  .social-links--about {
    display: flex;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line-soft);
  }
}
