/* ============================================
   MANOJ JACOB — Portfolio Website
   Minimalist, elegant, responsive
   ============================================ */

/* ---------- Reset & Base ----------
   Note: a Google Fonts @import previously lived here loading Cormorant /
   Inter / Courier Prime. Cormorant + Courier Prime weren't referenced
   anywhere, Inter is only used by admin.html and work-detail.html (which
   fall back cleanly to system sans-serif). The @import was render-blocking
   AND blocked by our CSP, adding ~1s of perceived nav lag — removed. */

@font-face {
  font-family: 'Gotham';
  src: url('./fonts/gotham.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gotham Book';
  src: url('./fonts/Gotham Book.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gotham Regular';
  src: url('./fonts/Gotham Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: 'Gotham', serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
  /* Kill the 300ms tap delay some mobile browsers still impose. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Hover-fade only on devices with real hover. On touch, the same rule
   would "stick" after a tap (until the user taps somewhere else) and make
   the link look half-faded while the next page loads. */
@media (hover: hover) and (pointer: fine) {
  a:hover {
    opacity: 0.6;
  }
}

/* Immediate visual confirmation when a link is tapped, so navigation feels
   instant even if the next page takes a beat to render. */
a:active {
  opacity: 0.5;
  transition: opacity 0s;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Utility ---------- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- HERO SECTION ---------- */
.hero {
  min-height: 100svh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.hero__image-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  width: 100%;
  max-width: min(600px, 80vw);
}

.hero__image-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: scale(1.5) translateX(20px);

}

.hero__nav {
  display: flex;
  gap: 50px;
  align-items: center;
}

.hero__nav-link {
  font-family: 'Gotham', serif;
  font-weight: 400;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  letter-spacing: 0.05em;
  color: #1a1a1a;
  position: relative;
  padding: 8px 0;
  cursor: pointer;
  background: none;
  border: none;
}

.hero__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #1a1a1a;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero__nav-link:hover::after {
  width: 100%;
}

.hero__nav-link:hover {
  opacity: 1;
}

/* ---------- ABOUT / TEXT SECTION ---------- */
.about-text {
  padding: 40px 0 20px;
  background: #fff;
}

.about-text__content {
  width: 100%;
  padding-left: 100px;
}

.about-text__content p {
  font-family: 'Gotham', serif;
  font-size: clamp(1.2rem, 2.8vw, 2.5rem);
  font-weight: 400;
  line-height: 1.45;
  color: #1a1a1a;
}

/* ---------- WORK SECTION ---------- */
.work-section {
  padding: 20px 0 80px;
  background: #fff;
  position: relative;
}

.work-section__header {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}

.work-section__label {
  font-family: 'Gotham', serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  margin-right: 20px;
  color: #1a1a1a;
  letter-spacing: 0.05em;
  user-select: none;
}

.work-section__grid-wrapper {
  display: flex;
  align-items: stretch;
}

.work-section__grid-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 100px;
}

.work-grid-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
}

.work-grid {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 72px) / 4);
  gap: 24px;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  color: #000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
  font-size: 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

#prevWork {
  left: 0;
}

#nextWork {
  right: 0;
}

.carousel-nav:hover:not(:disabled) {
  background: #000;
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active:not(:disabled) {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav:disabled {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.8);
}

.work-grid__item {
  width: 100%;
  aspect-ratio: 16/10;
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.work-grid__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.work-grid__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.work-grid__item:hover::after {
  background: rgba(0, 0, 0, 0.05);
}


/* ---------- EVERYTHING ELSE / PROFILE SECTION ---------- */
.profile-section {
  padding: 20px 0;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  background: #fff;
}

.profile-section__inner {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  margin: 0 0 0 0%;
  padding: 0 10px;
}

.profile-section__photo {
  flex: 0 0 40%;
  max-width: 380px;
}

.profile-section__photo-img {
  width: 100%;
  aspect-ratio: 2/3;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.profile-section__photo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Placeholder gradient simulating a B&W portrait */
/* .profile-section__photo-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(60,60,60,0.9) 0%,
    rgba(40,40,40,1) 40%,
    rgba(20,20,20,1) 100%
  );
} */

.profile-section__links {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 10px;
  width: fit-content;
}

.profile-section__link {
  display: block;
  font-family: 'Gotham', serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
  line-height: 1;
  padding: 0;
  border-bottom: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.profile-section__link:hover {
  opacity: 0.6;
}

.profile-section__item {
  width: 100%;
}

.profile-section__dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-content {
  padding: 12px 0 0 0;
  font-family: 'Gotham Book', sans-serif;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #444;
  max-width: 520px;
  letter-spacing: 0.01em;
}

.dropdown-content>*:last-child {
  margin-bottom: 0;
}

.dropdown-content p {
  margin-bottom: 8px;
}

.dropdown-list {
  list-style: none;
  margin-bottom: 8px;
}

.dropdown-list li {
  position: relative;
  padding-left: 10px;
  margin-bottom: 2px;
  color: #666;
}

.dropdown-list li::before {
  content: '•';
  position: absolute;
  left: 0;
}

.brands-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-cat {
  font-size: 0.85rem;
}

.brand-cat strong {
  display: inline-block;
  margin-bottom: 0;
}

.brand-cat span {
  color: #666;
}

.work-exp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-exp-item strong {
  display: inline-block;
  margin-bottom: 0;
}

.work-exp-item span {
  color: #666;
}

.awards-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.award-cat strong {
  display: inline-block;
  margin-bottom: 2px;
  border-bottom: none;
  padding-bottom: 0;
  width: fit-content;
}

.award-cat .dropdown-list {
  margin-bottom: 0;
}

/* ---------- PROFILE ROTATED CONTACT ---------- */

/* Section needs position:relative for absolute child */
.profile-section {
  position: relative;
  overflow: hidden;
}

.profile-section__contact-rotated {
  position: absolute;
  right: 80px;
  top: 40px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  /* In vertical-rl, column = side-by-side columns */
  align-items: stretch;
  /* Both columns stretch to same height */
  gap: 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  pointer-events: none;
  z-index: 10;
}

/* Line 1 (left column): "N e e d  t h e  w o r k  t o  w o r k ?" */
.contact-rotated__line1 {
  font-family: 'Gotham', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.22em;
  color: #1a1a1a;
  white-space: nowrap;
}

/* Line 2 (right column): "Write to" + email + separator line */
.contact-rotated__line2 {
  display: flex;
  flex-direction: row;
  /* In vertical-rl, row = top-to-bottom flow */
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.contact-rotated__write {
  font-family: 'Gotham', sans-serif;
  font-weight: 700;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: #1a1a1a;
}

.contact-rotated__email {
  font-family: 'Gotham', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  color: #1a1a1a;
  letter-spacing: 0.03em;
  text-decoration: none;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.contact-rotated__email:hover {
  opacity: 0.55;
}

/* Separator line: fills remaining space after .com up to the top */
.contact-rotated__separator {
  display: block;
  flex: 1 0 0%;
  width: 1px;
  background: rgba(26, 26, 26, 0.3);
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 40px 0;
  text-align: center;
  background: #fff;
  border-top: 1px solid #eee;
}

.footer__text {
  font-family: 'Gotham', serif;
  font-weight: 300;
  font-size: 0.8rem;
  color: #aaa;
  letter-spacing: 0.1em;
}

/* ---------- SUB-PAGE STYLES ---------- */
.subpage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.subpage__header {
  padding: 30px 40px;
  border-bottom: 1px solid #eee;
}

.subpage__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  cursor: pointer;
}

.subpage__back:hover {
  background: #000;
  color: #fff;
  transform: scale(1.1);
  opacity: 1;
}

.subpage__back:active {
  transform: scale(0.95);
}

.subpage__back--standalone {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 1000;
}

.subpage__back svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.subpage__back:hover svg {
  transform: translateX(-3px);
}


.subpage__logo {
  font-family: 'Gotham', serif;
  font-weight: 300;
  font-size: 1.6rem;
  color: #1a1a1a;
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: 10px;
}

.subpage__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 40px;
}

.subpage__heading {
  font-family: 'Gotham Book', sans-serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: #1a1a1a;
  letter-spacing: 0.03em;
  text-align: center;
  position: relative;
}



.subpage__subtitle {
  font-family: 'Gotham', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  color: #999;
  margin-top: 20px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* --- Bio Content Styles --- */
.bio-content {
  max-width: 800px;
  margin: 40px auto 0;
  text-align: left;
}

.bio-content p {
  font-family: 'Gotham', sans-serif;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #1a1a1a;
  margin-bottom: 30px;
}

.bio-content ul {
  list-style: none;
  margin-bottom: 30px;
  padding-left: 0;
}

.bio-content li {
  font-family: 'Gotham', sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #1a1a1a;
  position: relative;
  padding-left: 20px;
}

.bio-content li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: #1a1a1a;
}

/* ---------- SCROLL ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger-children>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.visible>*:nth-child(1) {
  transition-delay: 0s;
}

.stagger-children.visible>*:nth-child(2) {
  transition-delay: 0.08s;
}

.stagger-children.visible>*:nth-child(3) {
  transition-delay: 0.16s;
}

.stagger-children.visible>*:nth-child(4) {
  transition-delay: 0.24s;
}

.stagger-children.visible>*:nth-child(5) {
  transition-delay: 0.32s;
}

.stagger-children.visible>*:nth-child(6) {
  transition-delay: 0.40s;
}

.stagger-children.visible>*:nth-child(7) {
  transition-delay: 0.48s;
}

.stagger-children.visible>*:nth-child(8) {
  transition-delay: 0.56s;
}

.stagger-children.visible>* {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .subpage__back--standalone {
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
  }

  .subpage__back svg {
    width: 20px;
    height: 20px;
  }

  .hero {
    padding: 20px;
    height: 100svh;
    min-height: 100svh;
  }

  .hero__image-logo {
    max-width: 95vw;
  }

  .hero__image-logo img {
    transform: scale(1.2);
    transform-origin: center;
  }

  .hero__nav {
    gap: 30px;
  }

  .about-text {
    padding: 60px 0;
  }

  .about-text__content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .work-section__grid-wrapper {
    padding: 0 24px;
  }

  .work-grid {
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 20px) / 2);
    grid-template-rows: repeat(5, 1fr);
    gap: 20px;
  }

  .work-section__label {
    font-size: 2.5rem;
    margin-right: 10px;
  }

  .work-section__dots {
    padding: 0 8px;
  }


  .profile-section {
    align-items: flex-start;
    padding-top: 20px;
  }

  .profile-section__inner {
    flex-direction: column;
    gap: 40px;
    margin: 0 auto;
    padding: 0 25px;
  }

  .profile-section__photo {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .profile-section__links {
    width: 100%;
    padding-top: 0px;
    text-align: left;
    gap: 20px;
  }

  .dropdown-content {
    padding-right: 50px;
  }

  .profile-section__link {
    width: 100%;
  }

  .profile-section__contact-rotated {
    right: 25px;
    /* Pull left to align with section padding/image edge */
    top: auto;
    bottom: 50px;
    height: 180px;
    /* Reduced height to keep it compact */
    gap: 6px;
  }

  .contact-rotated__line1 {
    font-size: 0.6rem;
    letter-spacing: 0.52em;
  }

  .contact-rotated__line2 {
    gap: 4px;
  }

  .contact-rotated__write {
    font-size: 0.3rem;
    /* Smaller */
  }

  .contact-rotated__email {
    font-size: 0.55rem;
    /* Smaller */
  }

  .subpage__header {
    padding: 20px 25px;
  }

  .subpage__body {
    padding: 60px 25px;
  }
}

@media (max-width: 480px) {

  .hero__nav {
    flex-direction: column;
    gap: 15px;
  }

  .work-section__grid-wrapper {
    padding: 0 45px;
  }

  .work-grid {
    grid-auto-columns: calc((100% - 12px) / 2);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
  }

  .carousel-nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .profile-section__link {
    font-size: 1.1rem;
    text-align: left;
  }

  .profile-section__contact-rotated {
    right: 25px;
    bottom: 40px;
  }

  .contact-rotated__line1 {
    font-size: 0.5rem;
    letter-spacing: 0.45em;
  }
}

/* --- Extra Mobile Polish --- */
@media (max-width: 480px) {
  .carousel-nav {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .work-grid__item {
    border-radius: 12px;
  }

  .profile-section__link {
    letter-spacing: 0.1em;
    transition: opacity 0.2s;
  }

  .profile-section__link:active {
    opacity: 0.6;
  }
}

/* ==========================================================================
   PUBLIC WORK MODAL (BEHANCE STYLE)
   ========================================================================== */
.work-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #fff;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.work-modal.is-open {
  transform: translateY(0);
}

.work-modal__close {
  position: absolute;
  top: 25px;
  right: 35px;
  width: 44px;
  height: 44px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, background 0.2s ease;
}

.work-modal__close:hover {
  background: #000;
  transform: scale(1.05);
}

.work-modal__iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

/* Mobile specific modal adjustments */
@media (max-width: 768px) {
  .work-modal__close {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   PAGE NAV (compact top bar on sub-pages)
   ========================================================================== */

/* Reserve clearance under the fixed nav so it never overlaps page content. */
body:has(> .page-nav) {
  padding-top: 78px;
}

.page-nav {
  position: fixed;
  top: 24px;
  left:0;
  right: 100px;
  margin: 0 auto;
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 10px 24px;
  width: max-content;
  max-width: calc(100vw - 24px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  z-index: 999;
}

.page-nav__link {
  font-family: 'Gotham', serif;
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #1a1a1a;
  position: relative;
  padding: 2px 0;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.3s ease;
  /* Drop the browser's dark tap-focus ring — it was the "stuck black line"
     visible while the next page loaded. Keyboard users still get :focus-visible. */
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.page-nav__link:focus { outline: none; }
.page-nav__link:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 4px; }

.page-nav__back {
  display: none; /* desktop hides it — the floating top-left back button handles that case */
}

.page-nav__divider--back {
  display: none;
}

.page-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: #1a1a1a;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-nav__link.is-active::after {
  width: 100%;
}

/* Hover underline only on devices that actually have hover (mouse, trackpad).
   Without this guard, iOS/Android leave the `:hover` state "stuck" on the
   tapped link while the next page is loading, making the previous link look
   active alongside the new one. */
@media (hover: hover) and (pointer: fine) {
  .page-nav__link:hover::after {
    width: 100%;
  }
}

.page-nav__link.is-active {
  font-weight: 500;
}

.page-nav__divider {
  width: 1px;
  height: 12px;
  background: rgba(0, 0, 0, 0.18);
}

@media (max-width: 600px) {
  body:has(> .page-nav) {
    padding-top: 76px;
  }

  /* Phone view: the back button moves INSIDE the nav pill (as its first item),
     so the previously-floating top-left back button gets hidden — but only on
     pages that have a .page-nav. The bio/awards/brands/work-experience pages
     have no .page-nav and rely on the floating back button, so they keep it. */
  body:has(> .page-nav) .subpage__back--standalone {
    display: none;
  }

  .page-nav {
    top: 20px;
    left: 14px;
    right: 14px;
    margin: 0 auto;
    height: 44px;
    gap: 12px;
    padding: 0 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: max-content;
    max-width: calc(100vw - 28px);
  }

  .page-nav__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    line-height: 1;
    color: #1a1a1a;
    border-radius: 999px;
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    /* No transition — instant feedback, no "stuck animation" feel. */
    transition: none;
  }

  .page-nav__back:active { background: rgba(0, 0, 0, 0.08); }

  .page-nav__divider--back {
    display: inline-block;
  }

  .page-nav__link {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }

  /* Snap the active underline on mobile — no animation means nothing can look
     "stuck halfway" while the next page is loading. */
  .page-nav__link::after {
    transition: none;
  }

  .page-nav__divider {
    height: 12px;
  }
}

@media (max-width: 380px) {
  .page-nav {
    height: 42px;
    gap: 8px;
    padding: 0 10px;
  }

  .page-nav__back {
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }

  .page-nav__link {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }

  .page-nav__divider {
    height: 11px;
  }
}