/* ===== SPLIT LAYOUT ===== */
.split-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 1fr 6fr;
  min-height: 100vh;
  align-items: flex-start;
}

.split-left {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 72px;
  -webkit-overflow-scrolling: touch;
  /* hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.split-left::-webkit-scrollbar { display: none; }

.split-right {
  grid-column: 3;
  padding: 44px 64px;
}

/* ===== LOGO ===== */
.split-logo {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--color-text-heading);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  flex-shrink: 0;
}

/* ===== HERO STATIC ===== */
.hero-static {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero-heading {
  font-family: var(--font-heading);
  font-size: 2.5rem; /* 40px */
  font-weight: var(--fw-normal);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text-heading);
}

.hero-heading__line {
  display: block;
}

.hero-tagline {
  font-size: var(--text-base);
  font-weight: var(--fw-normal);
  color: var(--color-text-muted);
  line-height: 2;
  max-width: 38ch;
}

/* ===== HERO CONTACT DROPDOWN ===== */
.hero-contact {
  position: relative;
  display: inline-block;
}

.hero-cta {
  display: block;
  background: #e6e6e6;
  color: var(--color-text-heading);
  font-weight: var(--fw-normal);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-btn);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
/* Open state via aria-expanded */
.hero-cta[aria-expanded="true"] { color: #fff; }
.hero-cta[aria-expanded="true"]::before { opacity: 1; }
/* Desktop hover — wipe effect */
@media (hover: hover) {
  .hero-cta::before {
    opacity: 1;
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .hero-cta:hover::before { transform: translateX(0); }
  .hero-cta:hover {
    color: #fff;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
  }
}

.hero-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 6px;
  min-width: 190px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
}

.hero-dropdown.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ===== LEFT SECTIONS ===== */
.left-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.left-about .section__label,
.left-works .section__label,
.left-tools .section__label,
.left-experience .section__label,
.left-life .section__label {
  font-size: 1rem; /* 16px */
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: var(--color-text-heading);
  color: var(--color-text-heading);
  margin-bottom: 0;
}

.left-about p:not(.section__label) {
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

/* ===== LEFT LIFE OUTSIDE ===== */
.life-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

.life-gallery-2col {
  display: flex;
  gap: var(--space-2);
}
.life-gallery-2col__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.life-gallery-2col__col img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* ===== RIGHT PANEL WORKS ===== */
.right-works {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.right-works .section__label {
  margin-bottom: var(--space-1);
}

.right-works .cards-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (max-width: 768px) {
  /* About + Experience */
  .about-col { border-bottom: none; }

}


/* ===== ABOUT + EXPERIENCE ===== */
.about-experience__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--space-3);
  align-items: stretch;
}
.about-col      { grid-column: span 6; }
.experience-col { grid-column: span 6; }
.about-col,
.experience-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.about-col .tools-section {
  margin-top: var(--space-4);
}
.about-col .section__label,
.experience-col .section__label {
  margin-bottom: var(--space-2);
}
.about-col p:not(.section__label) {
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: calc(5 * (var(--container-max) - 2 * var(--container-padding) - 11 * var(--space-3)) / 12 + 4 * var(--space-3));
}
.about-col p:not(.section__label) strong {
  color: var(--color-text-heading);
  font-weight: var(--fw-bold);
}

/* ===== TOOLS SECTION ===== */
.tools-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.tools-section__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--color-text-heading);
  letter-spacing: var(--tracking-tight);
}
.tools-icons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: default;
  transition: transform var(--transition);
}
.tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tool-icon:hover { transform: translateY(-2px); }


@media (max-width: 900px) {
  .about-experience__inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .about-col,
  .experience-col { grid-column: span 1; }
  .about-col { padding-bottom: var(--space-6); border-bottom: 1px solid var(--color-border); }
  .experience-col { padding-left: 0; }
}
@media (max-width: 768px) {
  .tool-icon { width: 32px; height: 32px; border-radius: 8px; }
  .about-col { border-bottom: none; padding-bottom: 0; }
  .about-experience__inner { gap: var(--space-12); }
}

/* ===== EXPERIENCE CARDS ===== */
.exp-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.exp-cards .exp-card:first-child { padding-top: 0; }
.exp-card {
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
  transition: box-shadow var(--transition), transform var(--transition);
}
.exp-card:hover {
  box-shadow: none;
  transform: translateY(-2px);
}
.exp-card__role {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--color-text-heading);
  line-height: var(--leading-snug);
  margin-bottom: 4px;
}
.exp-card__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
}
.exp-card__date {
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .exp-card__role { font-size: var(--text-sm); }
  .exp-card__meta { font-size: var(--text-sm); }
}

/* ===== LIFE OUTSIDE WORK ===== */
.life-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: calc(5 * (var(--container-max) - 2 * var(--container-padding) - 11 * var(--space-3)) / 12 + 4 * var(--space-3));
  margin-bottom: 0;
}
.life-gallery {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.life-gallery__half {
  display: flex;
  flex: 1;
  gap: var(--space-3);
  align-items: flex-start;
}
.life-gallery__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.life-gallery__col img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

/* ===== LOCKED CARD (Coming Soon) ===== */
.card--locked {
  cursor: default;
  pointer-events: none;
}
.card__coming-soon {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  background: var(--color-pill-bg);
  color: var(--color-pill-text);
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .life-gallery { gap: 8px; }
  .life-gallery__half { flex-direction: column; gap: 8px; }
  .life-gallery__col { gap: 8px; }
}


/* ===== PAGE ANIMATIONS ===== */

@keyframes slide-from-left {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-from-right {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Initial hidden state */
.hero-static,
.left-section {
  opacity: 0;
}

/* Playing */
.hero-static.anim-in,
.left-section.anim-in {
  animation: slide-from-left 2.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Done */
.hero-static.anim-done,
.left-section.anim-done {
  opacity: 1;
  transform: none;
}

/* Cards — initial hidden, then slide from right */
.right-works .card {
  opacity: 0;
}
.right-works .card.anim-in {
  animation: slide-from-right 2.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.right-works .card.anim-done {
  opacity: 1;
  transform: none;
}

.right-works .card.card--exit-left,
.left-works .card.card--exit-left {
  transform: translateX(-56px) !important;
  opacity: 0 !important;
  transition: transform 0.35s cubic-bezier(0.4, 0, 1, 1), opacity 0.28s ease !important;
  pointer-events: none !important;
}
.right-works .card.card--exit-right,
.left-works .card.card--exit-right {
  transform: translateX(56px) !important;
  opacity: 0 !important;
  transition: transform 0.35s cubic-bezier(0.4, 0, 1, 1), opacity 0.28s ease !important;
  pointer-events: none !important;
}
.right-works .card.card--exit-up,
.left-works .card.card--exit-up {
  transform: translateY(-40px) !important;
  opacity: 0 !important;
  transition: transform 0.35s cubic-bezier(0.4, 0, 1, 1), opacity 0.28s ease !important;
  pointer-events: none !important;
}
.right-works .card.card--exit-down,
.left-works .card.card--exit-down {
  transform: translateY(40px) !important;
  opacity: 0 !important;
  transition: transform 0.35s cubic-bezier(0.4, 0, 1, 1), opacity 0.28s ease !important;
  pointer-events: none !important;
}

/* Scroll reveal (kept for legacy) */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
              transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.fade-up.is-visible {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .exp-card:hover { box-shadow: none; transform: none; }
  .tools-icons.is-visible .tool-icon:hover { transform: none; }
}

@media (max-width: 768px) {
  .fade-up {
    transform: translateY(12px);
    transition-duration: 0.4s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===================================================
   RESPONSIVE — Stacked layout (≤ 1100px)
   Order: hero → works carousel → exp → tools → life
   =================================================== */

/* Mobile works section: hidden on desktop */
.left-works { display: none; }

/* Works carousel base (used when .left-works is shown) */
.works-carousel {
  display: flex;
  gap: var(--space-2);
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 0px;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-1);
}
.works-carousel::-webkit-scrollbar { display: none; }
/* Tablet: cards ~45% — two visible + peek of third to hint scrollability */
.works-carousel .card {
  flex: 0 0 calc(45% - 8px);
  scroll-snap-align: start;
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  /* Stacked 8-col layout */
  .split-layout {
    grid-template-columns: repeat(8, 1fr);
    max-width: 760px;
    padding: 0 var(--space-3);
    padding-bottom: var(--space-5); /* 40px bottom breathing room */
  }

  .split-left {
    grid-column: 1 / -1;
    min-width: 0;
    position: static;
    height: auto;
    overflow: visible; /* reset desktop overflow-x:hidden so carousel can scroll */
    padding: var(--space-6) 0 0;
    gap: var(--space-8); /* 64px between sections */
  }

  /* Works in right panel hidden — carousel takes its place */
  .split-right { display: none; }

  /* Show mobile works carousel */
  .left-works { display: flex; }

  /* Hero tagline: remove char limit */
  .hero-tagline { max-width: none; }

  /* Swap slide animations to fade-up for stacked context */
  @keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
  }
  .hero-static.anim-in,
  .left-section.anim-in {
    animation: fade-in-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}


/* Mobile (≤ 640px): one card + peek */
@media (max-width: 640px) {
  .split-layout {
    padding: 0 var(--space-2);
    padding-bottom: var(--space-5);
    max-width: 100%;
  }

  .split-left {
    padding-top: var(--space-5);
    gap: var(--space-7); /* 56px */
  }

  .works-carousel .card {
    flex: 0 0 calc(100% - 40px);
  }

  /* Hero heading slightly smaller on small screens */
  .hero-heading { font-size: 2rem; }

}
