@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&display=swap');

:root {
    --white: #FFFFFF;
    --black: #111111;
    --gray-light: #FAFAFA;
    --gray-border: #EEEEEE;
    --gray-text: #666666;
    --gray-medium: #999999;
    --transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--black);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 500;
}

em {
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    z-index: 1000;
}

nav .container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--gray-text);
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.6;
}

/* Hero Section */
.hero {
    padding: 140px 0 160px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.15;
    margin-bottom: 2rem;
    max-width: 1100px;
}

.hero p {
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 700px;
    color: var(--black);
}

/* Bento Grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 400px;
    gap: 1.5rem;
    padding-bottom: 160px;
}

.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--white);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition), filter var(--transition);
    image-rendering: -webkit-optimize-contrast;
}

.project-card.cover img {
    object-fit: cover;
}

.project-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.9;
    transition: opacity var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 0;
}

.project-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.project-info-default {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    transition: opacity var(--transition);
}

.project-info-default h3 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.75rem;
}

.project-card:hover .project-info-default {
    opacity: 0;
}

.project-info-hover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    color: var(--white);
}

.project-card:hover .project-info-hover {
    opacity: 1;
}

.project-info-hover .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.project-info-hover h3 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.project-info-hover p {
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 90%;
    opacity: 0.9;
}

/* Grid Spans */
.col-span-2 {
    grid-column: span 2;
}

.row-span-2 {
    grid-row: span 2;
}

/* Expertise Section */
.expertise {
    padding-bottom: 160px;
}

.expertise-board {
    background-color: var(--gray-light);
    border-radius: 8px;
    padding: 3rem;
}

.expertise-board h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 2.5rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.expertise-column h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.expertise-list {
    list-style: none;
}

.expertise-list li {
    font-size: 0.95rem;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

/* About Section */
.about {
    padding-bottom: 160px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4rem;
    align-items: stretch;
}

.about-left {
    grid-column: span 5;
    background-color: #999999;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.about-left h2 {
    font-size: 6.5rem;
    line-height: 0.9;
    color: #FFFFFF;
    width: 100%;
    margin: 0;
    letter-spacing: -0.02em;
}

.about-left h2 span {
    display: block;
}

.about-left h2 .inter {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.about-left h2 .playfair {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    margin-top: -0.5rem;
}

.about-right {
    grid-column: span 7;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-text p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.about-text p:first-child {
    color: #111111;
}

.about-text p:last-child {
    color: #999999;
}

.skills-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skills-tools-column h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999999;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.dot-list {
    list-style: none;
}

.dot-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    color: #111111;
    margin-bottom: 1rem;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: #000000;
    border-radius: 50%;
}

.about-divider {
    height: 1px;
    background-color: #EEEEEE;
    margin: 4rem 0;
}

/* Timeline */
.timeline-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999999;
    font-weight: 600;
    margin-bottom: 3rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #EEEEEE;
}

.timeline-item {
    position: relative;
    margin-bottom: 3.5rem;
}

.timeline-dot {
    position: absolute;
    left: calc(-2rem + 1px);
    top: 6px;
    width: 7px;
    height: 7px;
    background-color: #000000;
    border-radius: 50%;
}

.timeline-item .period {
    font-size: 0.85rem;
    color: #999999;
    margin-bottom: 0.5rem;
}

.timeline-item .role {
    font-size: 1.15rem;
    font-weight: 500;
    color: #111111;
}

.timeline-item .role em {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
}

/* Footer */
footer {
    padding-bottom: 4rem;
}

.footer-content {
    border-top: 1px solid var(--gray-border);
    padding-top: 4rem;
}

.footer-portrait {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.footer-content h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    max-width: 800px;
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--gray-text);
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.6;
}

.copyright {
    font-size: 0.85rem;
    color: var(--gray-text);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--white);
    display: none;
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--black);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 2100;
}

.modal-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.modal-header {
    margin-bottom: 4rem;
}

.modal-id {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-text);
    margin-bottom: 1rem;
}

.modal-header h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.modal-category {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-text);
    margin-bottom: 2rem;
}

.modal-mission {
    max-width: 900px;
}

.modal-mission h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.modal-mission p {
    font-size: 1.25rem;
    line-height: 1.6;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.modal-gallery {
    position: sticky;
    top: 4rem;
    height: fit-content;
}

.modal-main-img {
    background: var(--gray-light);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.modal-main-img img {
    width: 100%;
    height: auto;
    min-height: 400px;
    max-height: 600px;
    object-fit: contain;
}

.modal-nav-arrows {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-main-img:hover .modal-nav-arrows {
    opacity: 1;
}

.arrow {
    background: rgba(17, 17, 17, 0.8);
    color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.modal-thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.thumb {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid var(--gray-border);
    opacity: 0.5;
    transition: all 0.3s;
}

.thumb.active {
    border-color: var(--black);
    opacity: 1;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content-details {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.modal-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal-section p {
    font-size: 1.05rem;
    line-height: 1.7;
}

.modal-result {
    background: var(--gray-light);
    padding: 2rem;
    border-radius: 8px;
}

.modal-metric {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.modal-interventions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.intervention h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.intervention p {
    color: var(--gray-text);
}

.modal-ai-box,
.modal-craft-box {
    border: 1px solid var(--gray-border);
    padding: 2rem;
    border-radius: 8px;
}

.btn-live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--black);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    margin-top: 1.5rem;
    transition: opacity 0.3s;
}

.btn-live:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .work-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-grid {
        display: block;
    }

    .about-left {
        width: 100%;
        margin-bottom: 3rem;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .project-card {
        aspect-ratio: 4/3;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .row-span-2 {
        grid-row: span 1;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}