:root {
    --color-bg: #000000;
    --color-bg-secondary: #0a0a0a;
    --color-text: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-accent: #4a9eff;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-card: #0f0f0f;

    --font-display: 'Inter', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 300;
}

/* Remove grain overlay */
.grain-overlay {
    display: none;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.nav-links a:hover {
    color: var(--color-text);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 4rem 6rem;
    position: relative;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.45) 100%),
        url('images/MuonLaunch.jpg');
    background-size: cover;
    background-position: center%;
    background-attachment: fixed;
}

.hero-content {
    max-width: 1000px;
    text-align: center;
}

.hero-label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line {
    display: block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 4rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Section Styles */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10rem 4rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    margin-bottom: 5rem;
}

.section-number {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--color-accent);
    font-weight: 500;
    letter-spacing: 0.1em;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* About Section */
.about {
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.lead-text {
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1.5;
    color: var(--color-text);
    font-weight: 300;
    letter-spacing: -0.01em;
}

.about-text p {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 300;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 500;
}

.detail-value {
    font-size: 1.125rem;
    color: var(--color-text);
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.project-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    transition: border-color 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.project-image {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.1) 0%, rgba(74, 158, 255, 0.03) 100%);
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.project-card:nth-child(1) .project-image img {
    object-position: center 50%;
    transform: scale(1.5);
}

.project-card:nth-child(2) .project-image img {
    object-position: center 23%;
}

.project-card:nth-child(3) .project-image img {
    object-fit: contain;
    background-color: var(--color-card);
}

.project-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-text-secondary);
    opacity: 0.5;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.project-content {
    padding: 2.5rem;
}

.project-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 500;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    margin: 1rem 0 1.25rem;
    letter-spacing: -0.01em;
}

.project-description {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-weight: 300;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.project-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 1rem;
}

.project-link svg {
    opacity: 0.6;
}

/* Contact Section */
.contact {
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.contact-content {
    max-width: 800px;
}

.contact-text {
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1.5;
    margin-bottom: 4rem;
    color: var(--color-text);
    font-weight: 300;
    letter-spacing: -0.01em;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    background-color: var(--color-accent);
    color: var(--color-bg);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    align-self: flex-start;
    letter-spacing: 0.02em;
}

.contact-button:hover {
    background-color: #3a8eef;
    transform: translateY(-2px);
}

.contact-links {
    display: flex;
    gap: 3rem;
}

.contact-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width 0.3s ease;
}

.contact-link:hover {
    color: var(--color-text);
}

.contact-link:hover::after {
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--color-bg);
    color: var(--color-text-secondary);
    padding: 4rem 4rem;
    border-top: 1px solid var(--color-border);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.back-to-top {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-container {
        padding: 1.5rem 2rem;
    }

    .section-container {
        padding: 6rem 2rem;
    }

    .hero {
        padding: 8rem 2rem 4rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

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

    .nav-links a {
        font-size: 0.85rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 3rem;
    }

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

    .footer-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .contact-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Project Page Styles */
.project-hero {
    padding: 12rem 4rem 6rem;
    background-color: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.project-breadcrumb {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.project-breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-breadcrumb a:hover {
    color: var(--color-text);
}

.project-breadcrumb span {
    margin: 0 0.5rem;
}

.project-hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.project-hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 4rem;
    max-width: 800px;
    font-weight: 300;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 500;
}

.meta-value {
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 400;
}

.project-content-section {
    padding: 0;
}

.project-main-image {
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    background-color: var(--color-card);
    border-bottom: 1px solid var(--color-border);
}

.project-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.project-section {
    padding: 6rem 4rem;
    border-bottom: 1px solid var(--color-border);
}

.project-section:last-of-type {
    border-bottom: none;
}

.project-section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.project-text {
    max-width: 800px;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    font-weight: 300;
}

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

.project-text p:last-child {
    margin-bottom: 0;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-weight: 300;
    background-color: var(--color-card);
}

.gallery-item-1 img {
    object-position: center 30%;
}

.gallery-item-2 img {
    object-fit: contain;
    background-color: var(--color-card);
}

.gallery-item-muon-launch img {
    object-position: center 5%;
}

.gallery-item-poseidon-tilt img {
    object-position: center 1%;
}

.muon-hero-image img {
    object-fit: contain;
    background-color: var(--color-card);
}

.project-back {
    padding: 6rem 4rem;
    text-align: center;
}

.back-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

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

@media (max-width: 1024px) {
    .project-hero {
        padding: 10rem 2rem 4rem;
    }

    .project-section {
        padding: 4rem 2rem;
    }

    .project-back {
        padding: 4rem 2rem;
    }

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

@media (max-width: 768px) {
    .project-meta {
        gap: 2rem;
    }

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

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 300;
    line-height: 1;
    padding: 0;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .lightbox-image {
        max-width: 95%;
        max-height: 85vh;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}
