/* ========================================
   Jonah Menzies — Portfolio
   ======================================== */

:root {
    --navy: #003366;
    --navy-light: #0a4a7a;
    --navy-dark: #001f3f;
    --slate: #2c3e50;
    --text: #1a1a2e;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg: #fafafa;
    --bg-alt: #f0f2f5;
    --white: #ffffff;
    --border: #e2e8f0;
    --accent: #e8913a;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ---- Navigation ---- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    background: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--navy);
}

.nav-contact {
    padding: 0.5rem 1.25rem;
    border: 1.5px solid var(--navy);
    border-radius: 6px;
    color: var(--navy) !important;
    transition: all 0.2s;
}

.nav-contact:hover {
    background: var(--navy);
    color: var(--white) !important;
}

/* ---- Hero ---- */
.hero {
    padding: 10rem 3rem 5rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--navy-dark);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ---- Page Header (Projects) ---- */
.page-header {
    padding: 10rem 3rem 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--navy-dark);
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.page-header .hero-sub {
    margin-bottom: 0;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.25s;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    border: 1.5px solid var(--navy);
}

.btn-primary:hover {
    background: var(--navy-light);
    border-color: var(--navy-light);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--navy);
}

.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-1px);
}

/* ---- Section Grid ---- */
.section-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    max-width: 1000px;
    padding: 0 3rem;
    margin: 0 auto;
}

.section-label span {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.section-label h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--navy-dark);
    letter-spacing: -0.01em;
}

/* ---- About ---- */
.about {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.about .lead {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ---- Details ---- */
.details {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.detail-block h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--navy);
    display: inline-block;
}

.detail-item {
    margin-bottom: 1.25rem;
}

.detail-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.detail-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ---- Tags ---- */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--bg-alt);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* ---- Contact ---- */
.contact {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.contact-link {
    display: block;
    padding: 1.25rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

a.contact-link:hover {
    border-color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.08);
}

.contact-label {
    display: block;
    margin-bottom: 0.5rem;
}

.contact-label svg {
    color: var(--navy);
}

.contact-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--navy);
}

/* ---- Projects ---- */
.project {
    padding: 3rem;
    margin: 0 3rem 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s;
}

.project:hover {
    border-color: var(--navy);
}

.project-header {
    margin-bottom: 2rem;
}

.project-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-year {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.05em;
}

.project-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.status-ongoing {
    background: #fef3cd;
    color: #856404;
}

.status-complete {
    background: #d4edda;
    color: #155724;
}

.project-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--navy-dark);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.project-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
}

.project-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.project-description p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-description h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--navy);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-description h3:first-child {
    margin-top: 0;
}

.project-description ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.project-description ul li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.project-description ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--navy);
    font-weight: 600;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.5rem;
}

.project-media {
    display: flex;
    align-items: stretch;
}

.media-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border: 2px dashed var(--border);
    border-radius: 8px;
    min-height: 200px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Media items when added */
.project-media img,
.project-media video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Project body full width variant */
.project-body-full {
    display: block;
}

/* Gallery */
.project-gallery {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.project-gallery h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--navy);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.project-gallery h3:first-child {
    margin-top: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    margin: 0;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    border-radius: 8px;
    display: block;
    background: var(--bg-alt);
}

.gallery-item video {
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #000;
}

.gallery-item figcaption {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.gallery-item-wide {
    grid-column: span 1;
}

/* Custom Video Player */
.video-player {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.video-player video {
    display: block;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.5rem 0.75rem 0.6rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    opacity: 0;
    transition: opacity 0.25s;
}

.video-player:hover .video-controls,
.video-player:focus-within .video-controls {
    opacity: 1;
}

.vp-play,
.vp-fullscreen {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    line-height: 1;
    opacity: 0.9;
    transition: opacity 0.15s;
}

.vp-play:hover,
.vp-fullscreen:hover {
    opacity: 1;
}

.vp-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.vp-progress:hover {
    height: 6px;
}

.vp-progress-bar {
    height: 100%;
    width: 0;
    background: #fff;
    border-radius: 2px;
    pointer-events: none;
}

.vp-time {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    font-family: var(--font-body);
    white-space: nowrap;
    min-width: 5.5em;
    text-align: center;
}

.video-player:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.video-player:fullscreen video {
    max-height: 100vh;
    max-width: 100vw;
    object-fit: contain;
}

.video-player:fullscreen .video-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1rem 0.75rem;
}

@media (min-width: 700px) {
    .gallery-item-wide {
        grid-column: span 2;
    }
}

/* ---- Lightbox Gallery ---- */
.gallery-item img {
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.gallery-item img:hover {
    opacity: 0.85;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 15, 30, 0.94);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.lightbox-inner {
    display: flex;
    max-width: 92vw;
    max-height: 88vh;
    width: 100%;
    gap: 2.5rem;
    align-items: center;
    position: relative;
}

.lightbox-img-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 84vh;
    object-fit: contain;
    border-radius: 8px;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.25s, transform 0.25s;
    cursor: default;
}

.lightbox.active .lightbox-img-wrap img {
    opacity: 1;
    transform: scale(1);
}

.lightbox-sidebar {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    padding-right: 1rem;
}

.lightbox-caption {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
}

.lightbox-counter {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.15s;
    line-height: 1;
}

.lightbox-close:hover {
    color: #fff;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.lightbox-prev {
    left: -3.5rem;
}

.lightbox-next {
    right: calc(280px + 4.5rem);
}

/* ---- Footer ---- */
footer {
    padding: 3rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .hero,
    .page-header {
        padding: 8rem 1.5rem 3rem;
    }

    .hero h1,
    .page-header h1 {
        font-size: 2.75rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1.5rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .project {
        margin: 0 1.5rem 1.5rem;
        padding: 2rem;
    }

    .project-body {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .lightbox-inner {
        flex-direction: column;
        gap: 1.25rem;
        max-height: 94vh;
        padding: 1rem;
    }

    .lightbox-img-wrap img {
        max-height: 58vh;
    }

    .lightbox-sidebar {
        flex: 0 0 auto;
        padding: 0 1rem;
        text-align: center;
    }

    .lightbox-prev {
        left: 0.75rem;
    }

    .lightbox-next {
        right: 0.75rem;
    }

    .lightbox-close {
        top: -2rem;
        right: 0.5rem;
    }
}

@media (max-width: 600px) {
    .nav-links {
        gap: 1rem;
    }

    .hero h1,
    .page-header h1 {
        font-size: 2.25rem;
    }

    .project-header h2 {
        font-size: 1.35rem;
    }
}
