/* =========================================
   MINIMALIST / BRUTALIST STYLE
   (Modeled on Lavigne + User Requirements)
   ========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: #fff;
    color: #111;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #ff004a; /* User's Red */
}

/* --- Container --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 60px 0;
    border-bottom: 2px solid #111;
    margin-bottom: 40px;
}

#logo {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
}

nav a {
    margin: 0 5px;
}

nav a:hover {
    background-color: #ff004a;
    color: #fff;
    text-decoration: none;
    padding: 2px 5px;
    margin: 0;
}

/* --- Page Titles --- */
.page-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.selected-work span {
    background: #111;
    color: #fff;
    padding: 2px 8px;
}

/* --- Project Grid --- */
.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    /* Responsive Grid */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 50px 40px;
    margin-bottom: 100px;
}

.project-link {
    display: block;
    group: hover;
}

.project-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.project-link:hover img {
    border-color: #ff004a;
    box-shadow: 0 5px 15px rgba(255, 0, 74, 0.15);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    border-top: 2px solid #111;
    padding-top: 8px;
    margin-top: -2px; /* Pull it up to touch image if border */
    transition: border-color 0.3s ease;
}

.project-link:hover .project-meta {
    border-top-color: #ff004a;
    color: #ff004a;
}

.project-meta .title { font-weight: 500; text-transform: uppercase; }
.project-meta date { opacity: 0.6; font-weight: 300; }

/* --- Footer --- */
footer {
    border-top: 2px solid #111;
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: 50px;
}

/* =========================================
   FULL SCREEN OVERLAYS
   (Mimicking a separate page load)
   ========================================= */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10000;
    overflow-y: auto; /* Scrollable */
    
    /* Animation: Slide Up */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-out;
}

.page-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.overlay-header {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 20px;
    text-align: right;
    background: rgba(255,255,255,0.95);
    z-index: 10001;
}

.overlay-close {
    display: inline-block;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    text-transform: uppercase;
    border: 2px solid #111;
    padding: 5px 15px;
    transition: all 0.2s;
}

.overlay-close:hover {
    background: #ff004a;
    border-color: #ff004a;
    color: #fff;
}

.overlay-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 100px 20px;
}

.overlay-content h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.meta-date {
    font-family: 'Oswald', sans-serif;
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 40px;
    border-bottom: 2px solid #111;
    padding-bottom: 20px;
    display: inline-block;
}

.overlay-body {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
}

.hero-img {
    width: 100%;
    height: auto;
    margin-bottom: 30px;
}

.video-container {
    width: 100%;
    margin-bottom: 30px;
}
.video-container video { width: 100%; height: auto; }

/* Buttons inside Overlay */
.external-link-block { margin-top: 40px; }

.btn-external {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 15px 30px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #111;
    transition: all 0.3s;
}

.btn-external:hover {
    background: #ff004a;
    border-color: #ff004a;
    color: #fff;
}

.link-list { list-style: none; padding: 0; margin-top: 20px; }
.link-list li { margin-bottom: 10px; font-size: 1.2rem; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.link-list a:hover { color: #ff004a; }

/* Internal Galleries in Overlay */
.internal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 40px;
}
.internal-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
    transition: opacity 0.2s;
}
.internal-grid img:hover { opacity: 0.8; }

/* CV Styling */
.cv-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}
.cv-row .year { font-weight: bold; width: 80px; flex-shrink: 0; }

/* Mobile */
@media (max-width: 768px) {
    header { flex-direction: column; align-items: flex-start; padding-bottom: 30px; }
    nav { margin-top: 20px; }
    .project-list { grid-template-columns: 1fr; }
    .overlay-content h1 { font-size: 2rem; }
}