@font-face {
    font-family: 'MaciejCustomFont'; /* Replace with your actual font if needed */
    src: url('fonts/MyCustomFont.woff2') format('woff2'),
         url('fonts/MyCustomFont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body, html {
    margin: 0;
    padding: 0;
    /* Uses custom font, falls back to sans-serif */
    font-family: 'MaciejCustomFont', sans-serif; 
    background: linear-gradient(135deg, #fcfcfc 0%, #e6e9eb 100%);
    color: #333;
    height: 100vh;
    overflow: hidden; 
}

.container {
    display: grid;
    grid-template-columns: 280px 1fr; 
    height: 100vh;
    width: 100vw; 
}

/* --- SIDEBAR & MENU STYLES --- */

/* "Sidebar" denotes the entire lefthand sidebar - i'm using universal padding for all elements */
.sidebar {
    padding: 15px 30px;
    display: flex;
    flex-direction: column;
}

.project-display.text-only {
    grid-template-columns: 1fr;
    flex: 1; /* fill the space thumbnails would have used, since there are none */
}

/* My name :-) */
h1 {
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Subtext - removable tbh */
h2 {
    font-size: 1rem;
    font-weight: 300;
    font-style: italic;
    color: #666;
    margin-bottom: 50px;
}

/* List of project categories - note: should use different font than the contact details */
/* Note that this is nested - ul for the container, li for the inner list*/
ul {
    list-style: none;
    padding: 0;
    margin: 0 0 50px 0;
}

li {
    margin-bottom: 6px;
}

a {
    text-decoration: none;
    color: #444;
    font-weight: 300;
    transition: color 0.3s ease;
}

a:hover {
    color: #7a9e9f; 
}

/* Dropdown Menu Styles */

.sub-menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0 0 0 20px;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin 0.4s ease-in-out;
}

.sub-menu.active {
    max-height: 300px; /* Provides enough room for the links to slide open */
    opacity: 1;
    margin: 10px 0 15px 20px; 
}

.sub-menu li {
    margin-bottom: 8px;
}

.sub-menu a {
    font-size: 0.9rem;
    color: #777;
}

.secondary-nav a {
    font-style: italic;
}

/* --- BLOG TOOLTIP STYLES --- */

/* Grey out the text and set the default cursor */
.secondary-nav a.blog-link {
    cursor: default; 
    position: relative;
    color: #aaa; 
}

/* Prevent the default teal hover color from triggering */
.secondary-nav a.blog-link:hover {
    color: #aaa; 
}

/* The sleek, modern tooltip bubble */
.secondary-nav a.blog-link::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translate(5px, -50%);
    background-color: #2b2b2b;
    color: #f0f0f0;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: monospace, sans-serif; /* Gives the text a markdown/code aesthetic */
    font-size: 0.75rem;
    font-style: normal; /* Overrides the italic from the secondary-nav class */
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth, snappy easing */
    pointer-events: none; /* Prevents the tooltip itself from interfering with mouse events */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* The tiny directional arrow pointing to the text */
.secondary-nav a.blog-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translate(-3px, -50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent #2b2b2b transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

/* Slide-in Hover Animations */
.secondary-nav a.blog-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translate(15px, -50%);
}

.secondary-nav a.blog-link:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translate(5px, -50%);
}

.socials {
    margin-top: auto; 
    display: flex;
    gap: 16px;
    align-items: center;
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.socials svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor; /* grayscale: follows the same color/hover as the text links */
    display: block;
}

/* --- MAIN CONTENT STYLES --- */
.content {
    padding: 50px;
    display: none; /* HIDDEN INITIALLY */
    flex-direction: column;
    justify-content: space-between;
    height: 100%;      /* give this a DEFINITE height so % children resolve */
    box-sizing: border-box;
    overflow: hidden;  /* stop children escaping the layout */
}

/* .content-section had no height/overflow rule at all, so its percentage-
   sized children (standard-layout-wrapper -> project-display -> big-photo)
   were all resolving to "auto", letting the raw <video> render at its
   intrinsic size and overflow the whole page. */
.content-section {
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-height: 0; /* prevents flex/grid children from refusing to shrink */
}

.project-display {
    display: grid;
    grid-template-columns: 1fr 1.5fr; 
    gap: 40px;
    flex: 0 0 50%; /* trailer block takes roughly half the available height */
    min-height: 0;
}

.project-image {
    min-height: 0;
    overflow: hidden;
}

.project-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-info h3 {
    font-weight: 400;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.project-info p {
    font-weight: 200;
    line-height: 1.8;
    margin-bottom: 30px;
}

.link-btn {
    align-self: flex-start;
    border-bottom: 1px solid #333;
    padding-bottom: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.big-photo {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background-color: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 300;
}

/* --- THUMBNAIL STYLES --- */

.standard-layout-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Updated Thumbnail System for 6 Items — 3 columns x 2 rows, filling
   the remaining bottom half of the layout instead of a thin 6-wide strip */
.thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    flex: 1; /* fills whatever space is left after the trailer block */
    min-height: 0;
}

.thumb {
    background-color: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.1);
    overflow: hidden; /* Clips incoming graphic tags neatly */
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumb:hover {
    background-color: rgba(0,0,0,0.08);
    transform: translateY(-3px); 
}

/* Dynamic 3x3 Art Gallery Layout Grid */
.art-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    height: 100%;
}

.art-item {
    background-color: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.art-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.art-item:hover {
    transform: scale(1.02);
}

/* --- CONTACT SECTION --- */
.contact-form-container {
    max-width: 520px;
}
 
.contact-form-container h3 {
    font-weight: 400;
    font-size: 1.8rem;
    margin-bottom: 15px;
}
 
.contact-form-container p {
    font-weight: 200;
    line-height: 1.8;
    margin-bottom: 35px;
}
 
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
 
.contact-form input,
.contact-form textarea {
    font-family: inherit; /* form elements don't inherit this by default */
    font-size: 0.95rem;
    color: #333;
    padding: 14px 16px;
    border: 1px solid rgba(0,0,0,0.15);
    background-color: rgba(0,0,0,0.02);
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
 
.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}
 
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    font-family: inherit;
    color: #999;
}
 
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #7a9e9f;
    background-color: rgba(0,0,0,0.045);
}
 
.submit-btn {
    align-self: flex-start;
    padding: 13px 32px;
    background-color: #333;
    color: #fff;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
 
.submit-btn:hover {
    background-color: #7a9e9f;
}

/* Lightbox Modal Structure */
.lightbox {
    display: none; 
    position: fixed;
    z-index: 9999; /* Positions everything over navigation layout layers */
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9); /* Opaque background styling */
    align-items: center;
    justify-content: center;
}

.lightbox.visible {
    display: flex;
    animation: fadeIn 0.25s ease-out;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: 200;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: #7a9e9f;
}

/* --- ABOUT SECTION --- */
.about-grid {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-weight: 400;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-text p {
    font-weight: 200;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-photo {
    flex-shrink: 0;
    width: 180px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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