/* ===========================================
   Brand Colors:
   - Primary: Soft Lavender #CBAACB
   - Text/Anchor: Deep Ink #2D2A3B
   - Secondary: Slate Violet #6B6080
   - Accent: Aged Brass #A8935F
   - Background: Paper White #F7F6F4
   =========================================== */

:root {
    --primary: #CBAACB;
    --text: #2D2A3B;
    --secondary: #6B6080;
    --accent: #A8935F;
    --background: #F7F6F4;
    --white: #FFFFFF;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: var(--text);
    background-color: var(--background);
    line-height: 1.7;
}

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
}

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

a:hover {
    opacity: 0.7;
}

/* Accessibility - Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.contact-links a:focus-visible {
    outline-offset: 0;
    outline-color: var(--accent);
}

.research-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--background);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 1rem;
    opacity: 1;
}

/* ===========================================
   Navigation
   =========================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(247, 246, 244, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    opacity: 1;
    color: var(--accent);
}

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

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

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

/* Hamburger animation when active */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===========================================
   Hero Section
   =========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
}

.hero-content {
    max-width: min(680px, calc(100% - 400px));
    z-index: 1;
}

.hero-label {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.hero p {
    font-size: 1.15rem;
    color: var(--secondary);
    margin-bottom: 2.5rem;
}

.hero p a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

.hero-accent {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 340px;
    height: 420px;
    background: linear-gradient(160deg, var(--primary) 0%, rgba(203, 170, 203, 0.4) 100%);
    border-radius: 200px 200px 20px 20px;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(45, 42, 59, 0.15));
}

/* ===========================================
   Section Styling
   =========================================== */
section {
    padding: 8rem 10%;
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 1rem;
}

section h2 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    margin-bottom: 3rem;
    color: var(--text);
}

/* ===========================================
   About Section
   =========================================== */
.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.about-text p.lead {
    font-size: 1.25rem;
    color: var(--text);
}

/* ===========================================
   Work Section
   =========================================== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.work-card {
    background: var(--white);
    border-radius: 8px;
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.work-card p {
    flex-grow: 1;
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(45, 42, 59, 0.08);
}

.work-card-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.work-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.work-card p {
    color: var(--secondary);
    font-size: 0.95rem;
}

.work-card-link {
    display: inline-block;
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
    align-self: flex-start;
}

.work-card-link:hover {
    opacity: 0.7;
}

.work-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.work-card-links .work-card-link {
    margin-top: 0;
    padding-top: 0;
}

.work-card-featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.work-visual {
    height: 280px;
    border-radius: 6px;
    overflow: hidden;
}

.video-preview {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.video-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--text);
    transition: transform 0.3s ease;
}

.video-preview:hover img {
    transform: scale(1.03);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(45, 42, 59, 0.85);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent var(--white);
}

.video-preview:hover .play-button {
    background: var(--accent);
}

/* ===========================================
   Research Section
   =========================================== */
.research {
    background: var(--text);
    color: var(--background);
}

.research .section-label {
    color: var(--primary);
}

.research h2 {
    color: var(--background);
}

.research-list {
    display: flex;
    flex-direction: column;
}

.research-item {
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 2rem;
    align-items: center;
    border-radius: 8px;
    transition: background 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.research-item:hover {
    background: rgba(203, 170, 203, 0.12);
    opacity: 1;
}

.research-year {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    color: var(--accent);
}

.research-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    color: var(--background);
}

.research-venue {
    color: var(--primary);
    font-size: 0.9rem;
}

/* ===========================================
   Contact Section
   =========================================== */
.contact {
    text-align: center;
    padding: 10rem 10%;
}

.contact h2 {
    margin-bottom: 1.5rem;
}

.contact p {
    color: var(--secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-links a {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.contact-links a:hover {
    background: var(--primary);
    color: var(--text);
    opacity: 1;
}

/* ===========================================
   Color Bar
   =========================================== */
.color-bar {
    height: 4px;
    display: flex;
}

.color-bar span {
    flex: 1;
}

.color-bar span:nth-child(1) { background: var(--primary); }
.color-bar span:nth-child(2) { background: var(--text); }
.color-bar span:nth-child(3) { background: var(--secondary); }
.color-bar span:nth-child(4) { background: var(--accent); }

/* ===========================================
   Footer
   =========================================== */
footer {
    padding: 2rem 10%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid rgba(107, 96, 128, 0.2);
}

footer p {
    font-size: 0.85rem;
    color: var(--secondary);
}

/* ===========================================
   Scroll Animations
   =========================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================================
   Back to Top Button
   =========================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--white);
    border: 1px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(45, 42, 59, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 1024px) {
    .hero {
        min-height: auto;
        padding: 8rem 5% 4rem;
        flex-direction: column;
        justify-content: flex-start;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero p {
        max-width: 100%;
        margin-bottom: 0;
    }

    .hero-accent {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 220px;
        height: 280px;
    }

    .hero-image {
        width: 190px;
    }

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

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

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

    .work-card-featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .research-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        flex-direction: column;
        padding: 1rem 5%;
        gap: 1rem;
        border-top: 1px solid rgba(107, 96, 128, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

}

@media (max-width: 480px) {
    section {
        padding: 4rem 5%;
    }

    .contact {
        padding: 6rem 5%;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-links a {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}
