/* ============================================
   HOLLAND BARRY - Portfolio
   Clean Seamless Design
   ============================================ */

:root {
    --color-white: #ffffff;
    --color-light-gray: #f5f5f5;
    --color-mid-gray: #cccccc;
    --color-text: #1a1a1a;
    --color-text-light: #555555;
    --color-text-lighter: #999999;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Archivo', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

@media (pointer: coarse) {
    body { cursor: auto; }
}

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

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background-color: var(--color-text);
    color: var(--color-white);
}

/* ============================================
   Custom Cursor
   ============================================ */
.cursor {
    width: 8px;
    height: 8px;
    background-color: var(--color-text);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-text);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0.4;
}

@media (pointer: coarse) {
    .cursor, .cursor-follower { display: none; }
}

/* ============================================
   Navigation
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: var(--color-white);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-text);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
}

.nav-list a {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text);
    transition: opacity 0.2s;
}

.nav-list a:hover {
    opacity: 0.6;
}

/* ============================================
   Hero Section - Full Screen
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    background: var(--color-white);
}

.hero-image {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vmin;
    height: 70vmin;
    max-width: 700px;
    max-height: 700px;
    opacity: 0;
    animation: heroImageIn 1.5s ease 0.2s forwards;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes heroImageIn {
    to {
        opacity: 0.9;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 55vmin;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease forwards;
}

.title-line:nth-child(1) { animation-delay: 0.8s; }
.title-line:nth-child(2) { animation-delay: 0.95s; }

.hero-subtitle {
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-light);
    opacity: 0;
    animation: fadeIn 0.8s ease 1.2s forwards;
}

.hero-year {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--color-text-lighter);
    margin-left: var(--spacing-sm);
}

.hero-selected-works {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-top: var(--spacing-md);
    opacity: 0;
    animation: fadeIn 0.8s ease 1.4s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 0.8s ease 1.5s forwards;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-mid-gray), transparent);
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Projects Section - Seamless
   ============================================ */
.projects {
    padding: var(--spacing-xl) var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
    background: var(--color-white);
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.section-count {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--color-text-lighter);
}

/* Project Grid - Masonry-like */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

/* Project Card - Seamless */
.project-card {
    position: relative;
    cursor: pointer;
    background: var(--color-white);
}

.project-card--wide {
    grid-column: span 2;
}

.project-card--tall {
    grid-row: span 2;
}

/* Card Image - Natural sizing, no boxes */
.card-image {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-white);
    overflow: hidden;
}

.card-image img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Tall card (Field and Figure) - allow more height */
.project-card--tall .card-image img {
    max-height: 800px;
}

/* Wide cards (sections) - limit height */
.project-card--wide .card-image img {
    max-height: 350px;
    width: 100%;
}

/* Card Info - Minimal (above image) */
.card-info {
    padding: 0 0 var(--spacing-xs);
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
}

.card-number {
    font-family: var(--font-display);
    font-size: 1rem;
    font-style: italic;
    color: var(--color-text-lighter);
}

.card-title {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-meta {
    font-size: 0.65rem;
    color: var(--color-text-lighter);
    margin-left: auto;
}

/* ============================================
   Lightbox with Zoom & Pan
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: var(--color-white);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text);
    cursor: pointer;
    transition: opacity 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    opacity: 0.5;
}

.lightbox-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
}

.lightbox-container:active {
    cursor: grabbing;
}

.lightbox-image-wrapper {
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-info {
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-white);
}

.lightbox-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.lightbox-meta {
    font-size: 0.75rem;
    color: var(--color-text-lighter);
}

.lightbox-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-white);
    border-top: 1px solid var(--color-light-gray);
}

.lightbox-nav {
    background: none;
    border: 1px solid var(--color-mid-gray);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    transition: border-color 0.2s, background 0.2s;
}

.lightbox-nav:hover {
    border-color: var(--color-text);
    background: var(--color-light-gray);
}

.lightbox-zoom-hint {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

/* ============================================
   Presentation Section
   ============================================ */
.presentation {
    padding: var(--spacing-xl) var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
    background: var(--color-white);
    border-top: 1px solid var(--color-light-gray);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
}

.filter-btn {
    background: none;
    border: 1px solid var(--color-mid-gray);
    border-radius: 100px;
    padding: 0.45rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-lighter);
    cursor: pointer;
    transition: all 0.2s;
}

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

.filter-btn.active {
    color: var(--color-white);
    background: var(--color-text);
    border-color: var(--color-text);
    font-weight: 500;
}

/* Course Panels */
.course-panel {
    display: none;
}

.course-panel.active {
    display: block;
}

.course-info {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.course-code {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text);
}

.course-term {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--color-text-lighter);
}

/* Presentation Entries */
.pres-entry {
    margin-bottom: var(--spacing-lg);
}

.pres-image {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-white);
    overflow: hidden;
}

.pres-image img {
    max-width: 100%;
    max-height: 700px;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.2s;
}

.pres-image img:hover {
    opacity: 0.9;
}

.pres-image--wide img {
    width: 100%;
    max-height: 350px;
}

.pres-blurb {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 300;
    font-style: italic;
    color: var(--color-text-light);
    text-align: center;
    margin-top: var(--spacing-sm);
    padding: 0 var(--spacing-md);
}

.pres-description {
    max-width: 700px;
    margin-top: var(--spacing-md);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--color-text);
}

.pres-description--centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Assignment Groups */
.assignment-group {
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-light-gray);
}

.assignment-group:first-of-type {
    border-top: none;
    padding-top: 0;
}

.assignment-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-lighter);
    margin-bottom: var(--spacing-lg);
}

/* Paired Images */
.paired-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.paired-image {
    overflow: hidden;
    background: var(--color-white);
}

.paired-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

.paired-image img:hover {
    opacity: 0.85;
}

.paired-images--compact {
    max-width: 800px;
    margin: 0 auto;
}

.paired-images--compact .paired-image img {
    object-fit: contain;
    height: auto;
    max-height: 400px;
}

/* Interactive Expand Layout */
.expand-entry {
    margin-bottom: var(--spacing-lg);
}

.expand-hero {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    background: var(--color-white);
}

.expand-hero.hidden {
    display: none;
}

.expand-hero img {
    max-width: 100%;
    max-height: 700px;
    object-fit: contain;
    transition: opacity 0.3s;
}

.expand-hero:hover img {
    opacity: 0.85;
}

.expand-prompt {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-lighter);
    background: rgba(255,255,255,0.9);
    padding: 0.4rem 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.expand-hero:hover .expand-prompt {
    opacity: 1;
}

/* Expand Stack - vertical timeline layout */
.expand-stack {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
}

.expand-stack.active {
    display: flex;
}

.expand-section {
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.expand-section img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.2s;
}

.expand-section:hover img {
    opacity: 0.85;
}

/* Detail Modal (Paired Side-by-Side) */
.detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.97);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: var(--spacing-xl) var(--spacing-md);
}

.detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.detail-close {
    position: fixed;
    top: var(--spacing-sm);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text);
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s;
}

.detail-close:hover {
    opacity: 0.5;
}

.detail-content {
    max-width: 1200px;
    width: 100%;
}

.detail-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.detail-images img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.detail-text {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.9;
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .filter-bar {
        gap: 0.35rem;
    }
    .filter-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.55rem;
    }
    .paired-images {
        grid-template-columns: 1fr;
    }
    .detail-images {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .pres-image img {
        max-height: 400px;
    }
}

/* ============================================
   About Section
   ============================================ */
.about {
    padding: var(--spacing-xl) var(--spacing-md);
    background-color: var(--color-white);
    border-top: 1px solid var(--color-light-gray);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about .section-title {
    margin-bottom: var(--spacing-lg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.about-description {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.8;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.contact-label {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-lighter);
}

.contact-value {
    font-size: 0.85rem;
    font-weight: 300;
    transition: opacity 0.2s;
}

a.contact-value:hover {
    opacity: 0.6;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-light-gray);
    background: var(--color-white);
}

.footer-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-name,
.footer-year {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-lighter);
}

.footer-divider {
    width: 20px;
    height: 1px;
    background-color: var(--color-mid-gray);
}

.back-to-top {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-lighter);
    transition: color 0.2s;
}

.back-to-top:hover {
    color: var(--color-text);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .paired-images--compact {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 0 var(--spacing-md);
    }

    .footer {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .lightbox-zoom-hint {
        display: none;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
