/* =========================================
   Theme Variables & Base
   ========================================= */
:root { 
    --bg-color: #fafafa; 
    --text-color: #111111; 
    --accent-color: #777777; 
    --card-bg: #eaeaea;
    --border-color: #dddddd;
    --about-text-color: #333333;
}

[data-theme="dark"] {
    --bg-color: #111111; 
    --text-color: #ffffff; 
    --accent-color: #a0a0a0; 
    --card-bg: #222222;
    --border-color: #333333;
    --about-text-color: #dddddd;
}

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

body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: 'Inter', sans-serif; 
    line-height: 1.6; 
    padding: 2rem 5%; 
    transition: background-color 0.4s ease, color 0.4s ease; 
}

a { 
    color: inherit; 
    text-decoration: none; 
}

/* =========================================
   Header Navigation & Theme Toggle
   ========================================= */
.site-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
    padding-bottom: 4rem; 
}

.logo a { 
    font-size: 1.5rem; 
    font-weight: 800; 
    letter-spacing: -0.05em; 
}

.role { 
    color: var(--accent-color); 
    font-size: 0.9rem; 
    margin-top: 0.2rem; 
}

.site-nav {
    display: flex;
    align-items: center;
}

.site-nav a { 
    margin-left: 2rem; 
    font-weight: 600; 
    font-size: 0.95rem; 
    transition: color 0.3s ease; 
}

.site-nav a:hover, .site-nav a.active { 
    text-decoration: underline; 
    text-underline-offset: 4px; 
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    margin-left: 2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.theme-btn:hover {
    transform: rotate(15deg);
}

/* =========================================
   Brand Grid (Strict 2-Column Homepage Directory)
   ========================================= */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Forces exactly two columns */
    gap: 4rem 3rem;
}

.brand-card {
    display: flex;
    flex-direction: column;
}

.image-wrapper { 
    width: 100%; 
    aspect-ratio: 4/3; 
    overflow: hidden; 
    background: var(--card-bg); 
    margin-bottom: 1.5rem; 
}

.image-wrapper img, .image-wrapper video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; 
}

.brand-card:hover .image-wrapper img, .brand-card:hover .image-wrapper video { 
    transform: scale(1.03); 
}

.brand-info h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-links a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease, border-color 0.3s ease;
}

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

.project-links a::after {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-links a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   Case Study Template
   ========================================= */
.case-study { 
    max-width: 1000px; 
    margin: 0 auto; 
}

.project-header { 
    margin-bottom: 3rem; 
}

.project-header h1 { 
    font-size: 3.5rem; 
    font-weight: 800; 
    letter-spacing: -0.05em; 
    line-height: 1.1; 
}

.project-subtitle { 
    font-size: 1.5rem; 
    color: var(--accent-color); 
    margin-top: 0.5rem; 
}

.project-meta { 
    display: flex; 
    gap: 4rem; 
    border-top: 1px solid var(--border-color); 
    border-bottom: 1px solid var(--border-color); 
    padding: 2rem 0; 
    margin-bottom: 3rem; 
}

.meta-item strong { 
    display: block; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    color: var(--accent-color); 
    margin-bottom: 0.5rem; 
}

.project-description { 
    font-size: 1.2rem; 
    max-width: 700px; 
    margin-bottom: 4rem; 
}

.full-width-media { 
    width: 100%; 
    height: auto; 
    margin-bottom: 2rem; 
    display: block; 
    background: var(--card-bg); 
}

/* =========================================
   Media Embeds & Carousels
   ========================================= */
.video-wrapper { 
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    margin-bottom: 4rem; 
    background: #111; 
}

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

.carousel { 
    position: relative; 
    width: 100%; 
    margin-bottom: 4rem; 
}

.carousel-track { 
    display: flex; 
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth; 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.carousel-track::-webkit-scrollbar { 
    display: none; 
}

.carousel-slide { 
    flex: 0 0 100%; 
    scroll-snap-align: center; 
}

.carousel-slide img { 
    width: 100%; 
    height: auto; 
    display: block; 
    aspect-ratio: 16/9; 
    object-fit: cover; 
    background: var(--card-bg); 
}

.carousel-buttons { 
    display: flex; 
    justify-content: space-between; 
    position: absolute; 
    top: 50%; 
    left: 0; 
    width: 100%; 
    transform: translateY(-50%); 
    pointer-events: none; 
}

.carousel-btn { 
    background: rgba(255, 255, 255, 0.9); 
    color: #111; 
    border: none; 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    cursor: pointer; 
    pointer-events: auto; 
    font-size: 1.2rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 1rem; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    transition: background 0.2s ease, transform 0.2s ease; 
}

.carousel-btn:hover { 
    background: #ffffff; 
    transform: scale(1.05); 
}

/* =========================================
   About Page Styles
   ========================================= */
.about-page { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding-bottom: 5rem; 
}

.about-hero h1 { 
    font-size: 3rem; 
    font-weight: 800; 
    letter-spacing: -0.03em; 
    line-height: 1.1; 
    margin-bottom: 4rem; 
    max-width: 900px; 
}

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

.about-image-wrapper { 
    width: 100%; 
    aspect-ratio: 4/5; 
    overflow: hidden; 
    background: var(--card-bg); 
}

.profile-pic { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    filter: grayscale(100%); 
    transition: filter 0.5s ease; 
}

.profile-pic:hover { 
    filter: grayscale(0%); 
}

.about-text p { 
    font-size: 1.25rem; 
    margin-bottom: 2rem; 
    color: var(--about-text-color); 
    line-height: 1.7; 
}

.detail-block { 
    margin-bottom: 2.5rem; 
    border-top: 1px solid var(--border-color); 
    padding-top: 1rem; 
}

.detail-block h3 { 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    color: var(--accent-color); 
    margin-bottom: 1rem; 
}

.detail-block ul { 
    list-style: none; 
}

.detail-block li { 
    margin-bottom: 0.5rem; 
    font-size: 0.95rem; 
}

.contact-link { 
    display: inline-block; 
    font-weight: 600; 
    font-size: 1rem; 
    margin-bottom: 0.5rem; 
    border-bottom: 2px solid transparent; 
    transition: border-color 0.3s ease; 
}

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

/* =========================================
   Mobile Adjustments
   ========================================= */
@media (max-width: 992px) {
    .about-content { 
        grid-template-columns: 1fr 300px; 
    }
    .about-image-wrapper { 
        grid-column: 1 / -1; 
        max-width: 400px; 
    }
}

@media (max-width: 768px) {
    .brand-grid { grid-template-columns: 1fr; }
    .project-header h1 { font-size: 2.5rem; }
    .project-meta { flex-direction: column; gap: 1.5rem; }
    .carousel-buttons { display: none; }
    
    .about-content { grid-template-columns: 1fr; gap: 3rem; }
    .about-hero h1 { font-size: 2.2rem; }
    .about-image-wrapper { max-width: 100%; aspect-ratio: 1/1; }
}