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

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Brygada+1918:wght@400;500&display=swap');

@font-face {
    font-family: 'Server Mono';
    src: url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@main/fonts/ServerMono-Regular.woff2') format('woff2');
    font-weight: 400;
}

/* Base Styles */
body {
    background: #0B0B0B;
    color: #E1E9EB;
    font-family: 'Server Mono', monospace;
    font-size: 15px;
    line-height: 1.5;
    padding: 0;
    overflow-x: hidden;
}

/* Container Layout */
.container {
    display: flex;
    gap: 3rem;
    width: 100%;
    max-width: calc(100vw - .7rem);
    margin-left: 0.7rem;
}

/* Sidebar Styles */
.sidebar {
    flex-shrink: 0;
    width: 240px;
    position: sticky;
    top: 0.5rem;
    height: fit-content;
}

h1 {
    font-family: 'Brygada 1918', serif;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

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

h1 a:hover {
    color: #76ADB7;
}

.bio {
    font-size: 0.85rem;
    margin-bottom: 3rem;
    line-height: 1.3;
    opacity: 0.9;
}

/* Navigation */
nav a {
    display: block;
    color: #E1E9EB;
    text-decoration: none;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    transition: color 0.2s;
}

nav a:hover {
    color: #76ADB7;
}

#contact-btn {
    cursor: pointer;
    transition: color 0.2s;
}

#contact-btn:active {
    color: #76ADB7;
}

#twitter-link {
    position: relative;
}

.twitter-text {
    display: inline-block;
}

.letter {
    display: inline-block;
}

/* Main Content Area */
main {
    flex: 1;
    width: 100%;
    min-width: 0;
}

/* Project Pages - Grid Layout */
.container.project-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    max-width: calc(100vw - .7rem);
    margin-left: 0.7rem;
}

.container.project-layout .sidebar {
    position: sticky;
    top: 0.5rem;
    width: 240px;
}

.container.project-layout main {
    grid-column: 2;
}

/* Project Page Styles */
.project-header {
    margin-bottom: 2rem;
}

.project-title {
    font-family: 'Brygada 1918', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.project-subtitle {
    font-size: 0.85rem;
    color: rgba(225, 233, 235, 0.6);
    margin-bottom: 1rem;
}

.project-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.project-description p {
    margin-bottom: 1.5rem;
}

/* Media Container */
.media-container {
    margin-bottom: 2rem;
}

/* Video Embed */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #0b0b0b;
    margin-bottom: 1.5rem;
}

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

/* Image Gallery */
.image-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.image-grid.two-column {
    grid-template-columns: repeat(2, 1fr);
}

.project-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Technical Details Section */
.technical-details {
    background: rgba(225, 233, 235, 0.02);
    border: 1px solid rgba(225, 233, 235, 0.1);
    padding: 1.5rem;
    margin: 2rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.technical-details h3 {
    font-family: 'Brygada 1918', serif;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: #E1E9EB;
}

.technical-details ul {
    list-style: none;
    color: rgba(225, 233, 235, 0.7);
}

.technical-details li {
    margin-bottom: 0.4rem;
}

/* Process Section */
.process-section {
    margin: 4rem 0;
    padding: 2rem 0;
    border-top: 1px solid rgba(225, 233, 235, 0.1);
}

.section-title {
    font-family: 'Brygada 1918', serif;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.technique-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: rgba(225, 233, 235, 0.85);
}

/* Credits Section */
.credits {
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(225, 233, 235, 0.6);
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(225, 233, 235, 0.1);
}

.credits strong {
    color: #E1E9EB;
    font-weight: normal;
}

/* Project Navigation */
.project-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(225, 233, 235, 0.1);
}

.project-nav a {
    color: #E1E9EB;
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.project-nav a:hover {
    opacity: 0.7;
}

.project-nav .prev::before {
    content: "← ";
}

.project-nav .next::after {
    content: " →";
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .container {
        gap: 2rem;
    }

    .sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 2rem;
    }

    .container.project-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: relative;
        width: 100%;
        top: 0;
        margin-bottom: 2rem;
    }

    .container.project-layout .sidebar {
        position: relative;
        width: 100%;
        margin-bottom: 2rem;
    }

    main {
        width: 100%;
    }

    .container.project-layout main {
        grid-column: 1;
    }
}

.rotating-bio {
    font-size: 0.85rem;
    margin-bottom: 3rem;
    line-height: 1.3;
    opacity: 0.9;
    min-height: 1.3em; /* Prevents layout shift */
}

.rotating-text {
    display: inline-block;
    white-space: nowrap;
}

.rotating-text span {
    display: inline-block;
    transition: opacity 0.1s ease;
}

.project-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: opacity 0.2s;
    z-index: 0;
}

.project:hover .project-thumbnail {
    opacity: 0.5;
}

/* Clock Styles - Bottom of page positioning */

.clock {
    position: fixed;
    bottom: .5rem;
    left: .5rem;
    z-index: 100;
}

.clock-text {
    display: flex;
    flex-direction: column;
}

.clock-line-1 {
    display: block;
    white-space: nowrap;
    font-size: 0.65rem;
    line-height: 1.3;
}

.clock-line-2 {
    display: block;
    white-space: nowrap;
    font-size: 0.65rem;
    line-height: 1.3;
    margin-top: 0.2rem;
}

.clock-text span {
    display: inline-block;
    transition: opacity 0.1s ease, color 0.1s ease;
}