/* Theme Engine & Global Resets */
:root {
    /* Default: Editorial Light */
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --text-primary: #121212;
    --text-secondary: rgba(18, 18, 18, 0.6);
    --accent: #121212;
    --border: rgba(18, 18, 18, 0.1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Syne', sans-serif;
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0b;
    --bg-secondary: #141417;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent: #ffffff;
    --border: rgba(255, 255, 255, 0.1);
}

[data-theme="mono"] {
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --accent: #ffffff;
    --border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: background-color 0.6s ease, color 0.6s ease;
    overflow-x: hidden;
}

/* Editorial Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 0.85;
    letter-spacing: -0.05em;
}

h1 {
    font-size: clamp(4rem, 15vw, 15rem);
}

h2 {
    font-size: clamp(2rem, 8vw, 6rem);
    margin-bottom: 2rem;
}

p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.4;
    font-weight: 400;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 5vw;
}

.accent {
    color: var(--accent-purple);
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.section {
    padding: clamp(5rem, 15vh, 10rem) 0;
    position: relative;
}

/* Editorial Nav */
.editorial-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 3rem 0;
    transition: var(--transition-smooth);
}

.editorial-nav.scrolled {
    padding: 1.5rem 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 4rem;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

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

/* Theme Toggle */
.theme-btn {
    background: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-dot {
    width: 12px;
    height: 12px;
    background: var(--bg-primary);
    border-radius: 50%;
}

/* Editorial Hero */
.editorial-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
}

.hero-title-wrapper {
    position: relative;
}

.hero-meta {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.editorial-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.hero-desc {
    max-width: 400px;
    color: var(--text-primary);
}

/* Hero Cinematic */
.hero.cinematic {
    height: 100vh;
    width: 100%;
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&q=80&w=1920');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,10,11,0.3) 0%, rgba(10,10,11,0.7) 100%);
    z-index: 1;
}

.centered-content {
    position: relative;
    z-index: 2;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.name-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60vw;
    max-width: 800px;
}

.line {
    width: 100%;
    height: 1px;
    background: var(--line-color);
}

.grand-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0.5em;
    padding: 1.5rem 0;
    margin: -0.5rem 0;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    letter-spacing: 0.4em;
    color: var(--text-secondary);
    margin-top: 3rem;
    font-weight: 400;
    text-transform: uppercase;
}

.scroll-indicator {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-secondary);
    z-index: 2;
    cursor: pointer;
    transition: var(--transition);
}

.scroll-indicator:hover {
    color: white;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    display: block;
    margin-bottom: 0.8rem;
}

.scroll-indicator .arrow {
    font-size: 1.8rem;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-12px);}
    60% {transform: translateY(-6px);}
}

/* Base Reveal Animation Adjustment */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Editorial Insight Section */
.editorial-grid-v1 {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10vw;
    align-items: end;
}

.detailed-process {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.process-col {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.process-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.process-col p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Editorial Gallery (Asymmetrical) */
.editorial-grid-v2 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4rem 2rem;
    margin-top: 5rem;
}

.gallery-item {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gallery-item.large {
    grid-column: span 12;
    margin-bottom: 5rem;
}

.gallery-item.mid {
    grid-column: 4 / span 6;
}

.img-wrapper, .mock-img {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.gallery-item.large .img-wrapper {
    aspect-ratio: 21/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

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

.meta-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.gallery-meta h3 {
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.2;
}

input, textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

input:focus, textarea:focus {
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
    background: rgba(255, 255, 255, 0.05);
}

.submit-btn {
    background: white;
    color: black;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(255,255,255,0.1);
}

/* Footer */
footer {
    padding: 6rem 0;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

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

.social-links a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    color: white;
}

/* Stripe Mesh Gradient Background */
.background-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg-obsidian);
    overflow: hidden;
    pointer-events: none;
}

.mesh-orb {
    position: absolute;
    width: 80vw;
    height: 80vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    will-change: transform;
}

.orb-1 {
    top: -20%;
    right: -10%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: meshFlow 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.orb-2 {
    bottom: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: meshFlow 25s infinite alternate-reverse cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes meshFlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 15%) scale(1.1); }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 6rem;
    }
    
    .hero-main {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
        padding-right: 0;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero p {
        margin-inline: auto;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .process-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4rem;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-card {
        right: 0;
        padding: 1.5rem;
    }
    
    .floating-card span {
        font-size: 2rem;
    }
}
