:root {
    --bg-color: #0a0a0a;
    --text-primary: #f5f5f5;
    --text-secondary: #8e8e93;
    --accent: #ffffff;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Space Mono', monospace !important;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4vw;
    box-sizing: border-box;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

header {
    padding-bottom: 2.5rem;
    margin-top: 50px;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

.logo {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--text-primary);
    gap: 10px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-family: 'Space Mono', monospace !important;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.hero {
    margin-top: 10vh;
    max-width: 950px;
    display: flex;
    flex-direction: column;
    gap: 1rem !important;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    display: block;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.8rem, 6.5vw, 5.5rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.hero-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--text-secondary);
}

.hero-description {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.footer {
    margin-top: 4rem;
    padding: 2rem 0 4rem 0;
    border-top: 1px solid #1c1c1e;
}

.case-indexes {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.case-indexes:hover {
    color: var(--accent);
}

.case-indexes::after {
    content: "→";
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.85);
    /* Dark screen overlay */
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        backdrop-filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-window {
    background-color: #121212;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 90%;
    max-width: 440px;
    padding: 3.5rem 2.5rem;
    position: relative;
    box-sizing: border-box;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-active .modal-window {
    transform: translateY(0);
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #8e8e93;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #f5f5f5;
}

.modal-label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8e8e93;
    margin-bottom: 0.75rem;
}

.modal-heading {
    font-family: var(--font-sans);
    font-weight: 350;
    font-size: 2.2rem;
    margin: 0 0 2rem 0;
    letter-spacing: -0.01em;
    color: #f5f5f5;
}

.contact-links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-link {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    text-decoration: none;
    color: #8e8e93;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    transition: color 0.25s ease, transform 0.25s ease;
}

.contact-link:hover {
    color: #f5f5f5;
    transform: translateX(4px);
}

.instagram-icon {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    color: currentColor;
}

.modal-label,
.modal-heading,
.contact-links-wrapper .contact-link {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-overlay.is-active .modal-label,
.modal-overlay.is-active .modal-heading,
.modal-overlay.is-active .contact-link {
    opacity: 1;
}

.modal-overlay.is-active .modal-label {
    transition-delay: 0.1s;
}

.modal-overlay.is-active .modal-heading {
    transition-delay: 0.18s;
}

.modal-overlay.is-active .email-link {
    transition-delay: 0.26s;
}

.modal-overlay.is-active .instagram-link {
    transition-delay: 0.34s;
}

.projects-section {
    margin-top: 12vh;
    margin-bottom: 15vh;
}

.section-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8e8e93;
    margin-bottom: 3.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem 3vw;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8rem 4vw;
    }

    .project-card:nth-child(even) {
        animation: scaleInEven 1s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #121212;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    position: relative;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.image-default {
    z-index: 1;
    opacity: 1;
}

.image-hover {
    z-index: 2;
    opacity: 0;
}

.project-card:hover .image-hover {
    opacity: 1 !important;
}

.project-card:hover .image-default {
    opacity: 0 !important;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #121212 0%, #161616 100%);
}

.image-placeholder span {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #444446;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-meta {
    max-width: 480px;
}

.project-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0 0 0.5rem 0;
    color: #f5f5f5;
    margin: 0 0 0.6rem 0;
}

.project-description {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #8e8e93;
    margin: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #f5f5f5;
}

.header-logo-icon {
    height: 1.1em;
    width: auto;
    object-fit: contain;
    display: block !important;
    margin: 0;
}

/* 1. Define the Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleInEven {
    from {
        opacity: 0;
        transform: translateY(10vh) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(10vh) scale(1);
    }
}


/* 2. Apply Animations & Use Delays for a Orchestrated "Cascade" Effect */
.hero-subtitle {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    opacity: 0; /* Starts hidden until animation kicks in */
}

.hero-description {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}

/* Apply a smooth entry to your project grid items */
.project-card {
    animation: scaleIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
    opacity: 0;
}
