/* ============================================
   NAVIGATION PILL
   ============================================ */

.nav-pill {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    transition: background-color 300ms ease;
}

.nav-pill--scrolled {
    background: rgba(0, 0, 0, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
}

.nav-pill__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-pill__link {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 6px 8px;
    border-radius: 999px;
    transition: background-color var(--transition-fast);
    text-decoration: none;
}

.nav-pill__link:hover {
    background: rgba(255, 255, 255, 0.06);
    opacity: 1;
}

/* The dot indicator */
.nav-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--color-text-muted);
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

/* Active state: filled dot with accent glow */
.nav-pill__link--active .nav-pill__dot {
    background: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 0 10px color-mix(in srgb, var(--color-accent) 50%, transparent);
}

/* Hover dot highlight */
.nav-pill__link:hover .nav-pill__dot {
    border-color: var(--color-text);
}

/* The text label: hidden by default, slides open on hover */
.nav-pill__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text);
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 400ms var(--reveal-easing),
                opacity 300ms ease,
                margin-left 400ms var(--reveal-easing);
    margin-left: 0;
}

/* On pill hover, expand ALL labels */
.nav-pill:hover .nav-pill__label {
    max-width: 90px;
    opacity: 1;
    margin-left: 6px;
}

/* Active link always shows its label */
.nav-pill__link--active .nav-pill__label {
    max-width: 90px;
    opacity: 1;
    margin-left: 6px;
}

/* Initial "teach" state: labels temporarily expanded on page load */
.nav-pill--expanded .nav-pill__label {
    max-width: 90px;
    opacity: 1;
    margin-left: 6px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img,
.hero__bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark overlay — stronger on left for text readability */
.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.55) 40%,
        rgba(0, 0, 0, 0.25) 100%
    );
    z-index: 1;
}

/* Bottom gradient — visual bridge to showcase section */
.hero__bg::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, #000 0%, transparent 100%);
    z-index: 2;
}

.hero__content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    will-change: transform;
}

.hero__name {
    font-family: var(--font-display);
    font-size: var(--fs-hero-name);
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hero__tagline {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
    transition: color var(--accent-transition);
}

.hero__subtitle {
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    max-width: 480px;
    color: var(--color-text-muted);
    font-size: var(--fs-body);
}

/* Per-character animation spans */
.hero__char {
    display: inline-block;
    transform-origin: bottom center;
}

.hero__actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero__footer {
    position: absolute;
    bottom: var(--space-md);
    left: 0;
    right: 0;
    text-align: center;
    z-index: 3;
    font-size: var(--fs-small);
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero__footer p + p {
    margin-top: 0.25rem;
}

/* Hero video reel — crossfading background clips */
.hero__reel {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.hero__reel-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero__reel-video--active {
    opacity: 1;
}

/* Scroll hint — animated line at bottom of hero */
.hero__scroll-hint {
    position: absolute;
    bottom: calc(var(--space-lg) + 40px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    transition: opacity 400ms ease;
}

.hero__scroll-hint--hidden {
    opacity: 0;
    pointer-events: none;
}

.hero__scroll-line {
    display: block;
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--color-accent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* Reel progress indicator — bottom-right of hero */
.hero__reel-progress {
    position: absolute;
    bottom: var(--space-md);
    right: var(--container-padding);
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero__reel-dot {
    width: 32px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: background 300ms ease;
}

.hero__reel-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--color-accent);
    transition: width 100ms linear;
}

.hero__reel-dot--active::after {
    animation: reelProgress 6s linear forwards;
}

.hero__reel-dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Hero gradient text */
.hero__name--gradient {
    background: linear-gradient(
        135deg,
        var(--color-text) 0%,
        var(--color-accent) 50%,
        var(--color-text) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 8s ease-in-out infinite;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    font-family: var(--font-body);
    font-size: var(--fs-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.75rem 1.75rem;
    border: var(--border-white);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    opacity: 0.8;
}

.btn--filled {
    background: var(--color-text);
    color: var(--color-bg);
}

.btn--filled:hover {
    background: #e0e0e0;
    opacity: 1;
}

/* ============================================
   FILTER BUTTONS
   ============================================ */

.filters {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-top: var(--space-lg);
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.4rem 1rem;
    border: 1px solid transparent;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.filter-btn--active,
.filter-btn:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.card {
    display: block;
    transition: transform var(--transition-normal);
}

.card:hover {
    transform: translateY(-3px);
    opacity: 1;
    box-shadow: 0 0 40px color-mix(in srgb, var(--color-accent) 12%, transparent);
}

.card__label {
    font-size: var(--fs-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
    color: var(--color-text-muted);
}

.card:hover .card__label {
    color: var(--color-text);
}

.card__media {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #111;
}

.card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-small);
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #111 100%);
}

/* ============================================
   PROJECT DETAIL
   ============================================ */

.project__title {
    font-family: var(--font-display);
    font-size: var(--fs-page-title);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    padding-top: var(--space-lg);
}

.project__tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-md);
}

.tab-btn {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.6rem 1.25rem;
    border: var(--border-thin);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.tab-btn + .tab-btn {
    border-left: none;
}

.tab-btn--active,
.tab-btn:hover {
    color: var(--color-text);
    border-color: var(--color-text);
}

.project__description {
    line-height: 1.8;
    margin-bottom: var(--space-md);
    text-align: justify;
}

/* Credits table */
.credits__row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    padding: 0.75rem 0;
    border-bottom: var(--border-thin);
    font-size: var(--fs-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.credits__row dt {
    font-weight: 700;
}

.credits__row dd a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Shot tiles */
.shot-tile {
    border: var(--border-thin);
}

.shot-tile__header {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: var(--fs-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: var(--border-thin);
}

.shot-tile__media {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #111;
}

/* ============================================
   VIDEO PLAYER
   ============================================ */

.video-container {
    position: relative;
    background: #0a0a0a;
    aspect-ratio: 16 / 9;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.video-overlay.hidden {
    display: none;
}

.play-btn {
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-normal);
}

.play-btn:hover {
    transform: scale(1.1);
}

.play-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--color-text);
    margin-left: 3px;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1rem;
    font-size: var(--fs-small);
    background: rgba(0, 0, 0, 0.8);
}

.video-controls .control-btn {
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

.video-controls .control-btn:hover {
    opacity: 0.7;
}

.timeline {
    flex: 1;
    height: 3px;
    background: var(--color-border);
    cursor: pointer;
    position: relative;
}

.timeline__progress {
    height: 100%;
    background: var(--color-text);
    width: 0%;
    transition: width 100ms linear;
}

.time-display {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    min-width: 3.5rem;
    text-align: center;
    flex-shrink: 0;
}

.control-icon {
    width: 16px;
    height: 16px;
    fill: var(--color-text);
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about {
    padding-top: var(--space-xl);
}

.about__bio {
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about__bio + .about__bio {
    margin-top: var(--space-md);
}

.about__awards {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding: var(--space-md) 0;
}

.about__awards img {
    height: 40px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.about__services {
    padding-top: var(--space-md);
}

.about__services h2 {
    font-weight: 700;
    font-size: var(--fs-body);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.services-list li {
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.services-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border: 1px solid var(--color-text);
}

/* Portrait section */
.about__portrait {
    display: flex;
    flex-direction: column;
}

.portrait__meta {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: var(--fs-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: var(--border-thin);
    border-bottom: none;
    color: var(--color-text-muted);
}

.about__portrait img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #111;
    border: var(--border-thin);
}

.about__social {
    margin-top: auto;
    padding-top: var(--space-md);
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: var(--fs-small);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.social-link .arrow {
    font-size: 0.9em;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact {
    padding-top: var(--space-xl);
}

.contact-section {
    padding: var(--space-md) 0;
}

.contact-section .two-col {
    align-items: start;
}

.contact__label {
    font-weight: 700;
    font-size: var(--fs-body);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact__email {
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: var(--fs-body);
    letter-spacing: 0.08em;
}

.contact__links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ============================================
   PAGE TITLE (for non-hero pages)
   ============================================ */

.page-header {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-md);
}

.page-header__title {
    font-family: var(--font-display);
    font-size: var(--fs-page-title);
    font-weight: 700;
    line-height: 1.1;
}

/* ============================================
   HOMEPAGE SHOWCASE
   ============================================ */

.showcase__slide {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.showcase__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.showcase__bg img,
.showcase__bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showcase__bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.78vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
}

.showcase__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.showcase__content {
    position: relative;
    z-index: 1;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.showcase__slide--visible .showcase__content {
    opacity: 1;
    transform: translateY(0);
}

/* First slide scale entrance — visual bridge from hero */
.showcase__slide:first-child .showcase__bg {
    transform: scale(1.05);
    transition: transform 1.2s var(--reveal-easing);
}

.showcase__slide:first-child.showcase__slide--visible .showcase__bg {
    transform: scale(1) translateY(0);
}

.showcase__title {
    font-family: var(--font-display);
    font-size: var(--fs-showcase-title);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-xs);
}

.showcase__credit {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 600ms ease 200ms;
}

.showcase__slide--visible .showcase__credit {
    opacity: 1;
}
