﻿/* ====================================================================
   THE PROFESSOR - cinematic portfolio layer
   All selectors namespaced p- ; page tokens inherit from style.css
   ==================================================================== */

.professor-page { background: var(--obsidian); }

.p-label {
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--gold);
}

.p-divider { margin: 0 auto 7vh; }
.p-prose .p-divider { margin-bottom: 9vh; }

.p-overline {
  font-size: 12px;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin-bottom: 3vh;
  opacity: 0;
}

html.p-static .p-overline, html:not(.p-js) .p-overline,
html.p-static .p-eyebrow, html:not(.p-js) .p-eyebrow,
html.p-static .p-subtitle2, html:not(.p-js) .p-subtitle2 { opacity: 1 !important; }

/* ---------------- 01. HERO ---------------- */

#p-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--obsidian);
}

#p-orbit-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#p-hero-mobile { display: none; }
#p-hero-mobile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-hud span {
  position: absolute;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: #b3ac99;
  z-index: 4;
}
.p-hud .p-hud-tl { top: 84px; left: 4vw; }
.p-hud .p-hud-tr { top: 84px; right: 4vw; text-align: right; }
.p-hud .p-hud-bl { bottom: 28px; left: 4vw; color: var(--gold); }
.p-hud .p-hud-br { bottom: 28px; right: 4vw; text-align: right; }
#p-frame-counter { color: var(--gold); }

.p-title {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  padding-top: 4vh;
}

.p-title-line { line-height: 0.95; white-space: nowrap; }

.p-title-the {
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 400;
  letter-spacing: 0.42em;
  color: var(--bone);
  margin-bottom: 1.2vh;
}

.p-title-name {
  font-size: clamp(64px, 12.5vw, 190px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 2px var(--gold);
  text-stroke: 2px var(--gold);
}

.p-ltr { display: inline-block; opacity: 0; transform: translateY(0.35em); }

.p-eyebrow {
  font-size: 17px;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin-bottom: 3vh;
  opacity: 0;
}

.p-subtitle2 {
  margin-top: 1.8vh;
  font-size: clamp(18px, 1.7vw, 25px);
  color: var(--gold);
  opacity: 0;
}

.p-subtitle {
  margin-top: 4vh;
  font-size: clamp(21px, 2.1vw, 30px);
  color: var(--champagne);
  opacity: 0;
}

.p-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--muted);
  z-index: 4;
  animation: p-cue 2.6s ease-in-out infinite;
}
@keyframes p-cue {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}

/* ---------------- 02. STATS ---------------- */

#p-stats {
  padding: 16vh 6vw 10vh;
  background: var(--obsidian);
  text-align: center;
}

#p-stats .p-label { margin-bottom: 7vh; }

.p-stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6vh 5.5vw;
  max-width: 1280px;
  margin: 0 auto;
}

.p-stat { min-width: 150px; }

.p-stat-num {
  font-size: clamp(34px, 4.2vw, 62px);
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 14px;
}

.p-stat-label {
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--muted);
  max-width: 210px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ---------------- PROSE ---------------- */

.p-prose {
  max-width: 640px;
  margin: 0 auto;
  padding: 10vh 24px;
}

body.professor-page { counter-reset: psec; }

.p-prose .lead {
  font-family: var(--font-serif);
  font-size: clamp(21px, 4vw, 26px);
  font-weight: 400;
  color: var(--bone);
  text-align: center;
  line-height: 1.55;
  margin-bottom: 50px;
}

.p-prose h2 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin: 46px 0 16px;
}

.p-prose h2::before {
  counter-increment: psec;
  content: counter(psec, upper-roman);
  display: block;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 12px;
  opacity: 0.8;
}

.p-prose p {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 300;
  color: #d8d2c2;
  line-height: 1.72;
  margin-bottom: 22px;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.p-prose h2 + p::first-letter {
  font-family: var(--font-display);
  font-size: 3em;
  line-height: 0.8;
  color: var(--gold);
  float: left;
  padding: 8px 10px 2px 0;
}

.p-prose blockquote {
  position: relative;
  margin: 50px 0 0;
  padding: 34px 10px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(19px, 1.9vw, 25px);
  color: var(--champagne);
  line-height: 1.65;
}

.p-prose blockquote::before,
.p-prose blockquote::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.p-prose blockquote::before { top: 0; }
.p-prose blockquote::after { bottom: 0; }

/* ---------------- 03. THE BUILDER / PILLARS ---------------- */

#p-method { position: relative; background: var(--obsidian); }

.p-sticky-stage video,
#p-closer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-sticky-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.p-stage-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(11,11,13,0.08) 0%, rgba(11,11,13,0.62) 100%);
}

.p-ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(60px, 11vw, 170px);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(237, 234, 226, 0.05);
  white-space: nowrap;
  user-select: none;
}

.p-label-overlay {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
}

.p-pillars {
  position: relative;
  z-index: 2;
  margin-top: -100vh;
  padding-bottom: 8vh;
}

.p-pillar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 520px;
  margin-left: clamp(6vw, 10vw, 14vw);
  opacity: 0;
  transform: translateY(40px);
}

.p-pillar-num {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--gold);
  margin-bottom: 18px;
}

.p-pillar h3 {
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 500;
  color: var(--bone);
  letter-spacing: 0.06em;
  margin-bottom: 2.5vh;
}

.p-pillar p {
  font-size: clamp(17px, 1.6vw, 21px);
  color: #cfc9b8;
  line-height: 1.8;
  background: rgba(11, 11, 13, 0.55);
  padding: 14px 18px;
  border-left: 1px solid var(--gold-dim);
}

/* ---------------- 04. PROOF OF WORK ---------------- */

#p-work {
  padding: 14vh 6vw 16vh;
  background: var(--charcoal);
  text-align: center;
}

#p-work .p-label { margin-bottom: 8vh; }

.p-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px;
  max-width: 1280px;
  margin: 0 auto;
}

.p-card {
  position: relative;
  flex: 1 1 300px;
  max-width: 380px;
  text-align: left;
  padding: 44px 34px 48px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  background: linear-gradient(160deg, rgba(20, 20, 22, 0.9), rgba(11, 11, 13, 0.95));
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.5s ease;
}

.p-card:hover {
  transform: translateY(-10px);
  border-color: rgba(201, 162, 39, 0.6);
}

.p-card-num {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold);
  margin-bottom: 20px;
}

.p-card h3 {
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 500;
  color: var(--bone);
  letter-spacing: 0.05em;
  margin-bottom: 2vh;
  min-height: 2.4em;
}

.p-card p {
  font-size: 17px;
  color: #b9b4a5;
  line-height: 1.75;
}

.p-card-glow {
  position: absolute;
  inset: auto -30% -55% -30%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(201, 162, 39, 0.16) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.p-card:hover .p-card-glow { opacity: 1; }

/* ---------------- 05. THE CLOSER ---------------- */

#p-closer {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--obsidian);
}

.p-closer-content {
  position: relative;
  z-index: 2;
  padding: 18vh 6vw;
}

.p-closer-title {
  font-size: clamp(38px, 7vw, 104px);
  font-weight: 600;
  color: var(--bone);
  letter-spacing: 0.05em;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(30px);
}

.p-closer-title em {
  font-size: 0.9em;
  text-transform: none;
}

.p-closer-sub {
  margin-top: 3.5vh;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--muted);
  opacity: 0;
}

.p-closer-ctas {
  margin-top: 7vh;
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
}

.p-cta-fill,
.p-cta-line {
  display: inline-block;
  padding: 17px 38px;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-decoration: none;
  transition: all 0.4s ease;
}

.p-cta-fill {
  background: var(--gold);
  color: var(--obsidian);
}
.p-cta-fill:hover { background: var(--champagne); }

.p-cta-line {
  border: 1px solid var(--gold-dim);
  color: var(--champagne);
}
.p-cta-line:hover { border-color: var(--gold); color: var(--gold); }

/* ---------------- Reveals ---------------- */

.p-reveal { opacity: 0; transform: translateY(28px); }

html.p-static .p-reveal,
html.p-static .p-pillar,
html.p-static .p-closer-title,
html.p-static .p-closer-sub,
html.p-static .p-closer-ctas,
html.p-static .p-ltr,
html.p-static .p-eyebrow,
html.p-static .p-subtitle,
html.p-static .p-subtitle2,
html.p-static .p-title-line {
  opacity: 1 !important;
  transform: none !important;
}

/* No-JS / failed-CDN fallback: everything readable */
html:not(.p-js) .p-reveal,
html:not(.p-js) .p-pillar,
html:not(.p-js) .p-ltr,
html:not(.p-js) .p-subtitle,
html:not(.p-js) .p-closer-title,
html:not(.p-js) .p-closer-sub,
html:not(.p-js) .p-closer-ctas {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------------- Mobile ---------------- */

@media (max-width: 767px) {
  #p-orbit-canvas { display: none; }
  #p-hero-mobile { display: block; position: absolute; inset: 0; }
  .p-hud .p-hud-tr, .p-hud .p-hud-br { display: none; }
  .p-title-name { -webkit-text-stroke: 1px var(--gold); }
  .p-pillar { margin-left: 8vw; margin-right: 8vw; }
  .p-pillars { margin-top: 0; }
  .p-pillar { min-height: 0; padding: 9vh 0; }
  .p-ghost { font-size: 17vw; }

  /* Phones: the builder and closer films show the WHOLE 16:9 frame
     (full width) instead of cropping the sides - so arms, wall monitors,
     and edge detail stay visible. The hero 360 stays filled (cover), where
     a large centered portrait reads better than a letterboxed band. */
  .p-sticky-stage {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
  }
  .p-sticky-stage video { position: relative; height: auto; object-fit: contain; }

  #p-closer {
    min-height: auto;
    flex-direction: column;
    padding-top: 4vh;
  }
  #p-closer video {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: var(--obsidian);
  }
  #p-closer .p-stage-shade { display: none; }
  .p-closer-content { padding: 6vh 6vw 12vh; }
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  .p-scroll-cue { animation: none; }
}

.p-ledger-note { margin-top: 7vh; font-size: 19px; letter-spacing: 0.02em; color: var(--muted); }
