/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #fdfdfd;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --text-muted2: #3f3f3f;
    --accent-gold: #C5A059;
    --accent-platinum: #E5E4E2;
    --midnight: #0f1014;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --transition-speed: 0.8s;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    --font-logo: 'Cinzel', serif;
    --font-kr: 'Nanum Myeongjo', serif;
    --font-roman: 'Garamond', serif;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    background-color: transparent;
}

/* --- DYNAMIC AMBIENT LIGHT ENGINE --- */
.ambient-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Moved behind cinematic layer (-1) */
    pointer-events: none;
    transition: opacity 0.6s ease;
    /* Smoother fade for JS toggling */
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.85;
    animation: orbFloat 14s infinite alternate ease-in-out;
}

/* --- CINEMATIC LAYERS --- */
.cinematic-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease;
    z-index: -1;
}

#hero-bg-layer {
    background-image: url('../images/gallery/White Studio.png');
    opacity: 0.05;
    /* Extremely subtle texture */
    z-index: -2;
    filter: grayscale(100%);
}

#portfolio-reveal-layer {
    opacity: 0;
    z-index: -1;
    /* Clarity Update */
    filter: grayscale(80%) sepia(10%) brightness(0.7) contrast(1.1);
    transition: opacity 0.6s ease;
}

.reveal-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

/* Profile Photo Wrapper for Smooth Glow */
.profile-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto 2rem auto;
    border-radius: 50%;
    z-index: 10;
}

/* The Glow Layer (Pseudo-element) */
.profile-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.6);
    /* Golden Glow */
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.2s ease-in-out;
    /* Smooth opacity fade */
    z-index: -1;
    /* Behind the image */
}

/* Hover State for Wrapper */
.profile-wrapper:hover::after {
    opacity: 1;
    /* Fade in */
}

.profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.2);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    will-change: transform;
    background-color: #fff;
    /* Fallback */
}

/* Scale Image on Hover */
.profile-wrapper:hover .profile-photo {
    transform: scale(1.005);
}

.orb-1 {
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, rgba(255, 210, 140, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -15%;
    right: -10%;
}

.orb-2 {
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, rgba(255, 210, 140, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -15%;
    right: -10%;
    animation-delay: -3s;
}

.orb-3 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(210, 190, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
    top: 25%;
    left: 25%;
    animation-delay: -7s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 60px) scale(1.1);
    }
}

/* --- KOREAN FONT OVERRIDES --- */
body.kr-mode,
body.kr-mode h1,
body.kr-mode h2,
body.kr-mode h3,
body.kr-mode .serif-italic,
body.kr-mode .credential-highlight,
body.kr-mode .project-title,
body.kr-mode .project-desc,
body.kr-mode .service-card h3,
body.kr-mode .service-card p,
body.kr-mode .bio-text,
body.kr-mode .bio-quote,
body.kr-mode .footer-info,
body.kr-mode .footer-brand,
body.kr-mode .nav-link,
body.kr-mode .copyright {
    font-family: var(--font-kr) !important;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 400;
}

.gold-text {
    color: var(--accent-gold);
    font-weight: 600;
}

.serif-italic {
    font-family: var(--font-serif);
    font-style: italic;
}

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

a:hover {
    color: var(--accent-gold);
}

/* --- TRANSITION UTILITIES --- */
.text-fade-element {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.switching-lang .text-fade-element {
    opacity: 0;
    transform: translateY(5px);
}

/* --- FLOATING COMMAND DECK (Navigation) --- */
.nav-deck {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-deck:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    transform: translateX(-50%) translateY(-2px);
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-main);
    opacity: 0.6;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-link:hover {
    opacity: 1;
    color: var(--accent-gold);
}

.nav-divider {
    width: 1px;
    height: 15px;
    background-color: var(--text-main);
    opacity: 0.2;
}

.lang-toggle {
    font-weight: 600;
    opacity: 1;
    color: var(--text-main);
    cursor: pointer;
}

.lang-inactive {
    font-weight: 300;
    opacity: 0.4;
}

/* --- UTILITIES --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
}

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

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    perspective: 1000px;
}

.logo-container {
    margin-bottom: 2rem;
    color: #1a1a1a;
    text-align: center;
    opacity: 0;
    animation: fadeInLogo 2s ease-out forwards;
    position: relative;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.logo-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    filter: blur(30px);
}

.logo-main {
    font-family: var(--font-logo);
    font-size: clamp(3.5rem, 9vw, 6rem);
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
    background: linear-gradient(45deg, #1a1a1a, #4a4a4a);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-family: var(--font-logo);
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    letter-spacing: 0.3em;
    display: block;
    color: var(--text-muted);
    font-weight: 400;
}

@keyframes fadeInLogo {
    to {
        opacity: 1;
    }
}

/* --- SECTIONS --- */
section {
    /* CASCADING PADDING FOR RESPONSIVE LUXURY */
    padding: 10rem 8vw;
    /* Default for Laptops */
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    scroll-margin-top: 100px;
    /* NAV JUMP FIX */
}

@media (min-width: 1400px) {
    section {
        padding: 10rem 15vw;
    }

    /* Full Gallery Mode for Big Screens */
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    margin: 0 auto;
}

/* --- ABOUT --- */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.credential-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    padding: 10rem 2rem;
    /* Increased padding for more height */
    margin: 4rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;

    /* Cinematic Integration */
    background-image: url('../images/gallery/Live Sound 2.jpeg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    background-color: rgba(255, 255, 255, 0.85);
    /* Heavy tint to keep text readable */
}

.credential-box.box-violin {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    padding: 10rem 2rem;
    /* Increased padding for more height */
    margin: 4rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;

    background-image: url('../images/gallery/2025 Vn DP.jpeg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    background-color: rgba(255, 255, 255, 0.85);
    /* Slightly heavier tint */
}

.credential-box.box-studio {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    padding: 10rem 2rem;
    /* Increased padding for more height */
    margin: 4rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;

    background-image: url('../images/gallery/Live Sound 4.jpeg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    background-color: rgba(255, 255, 255, 0.85);
    /* Slightly heavier tint */
}

.credential-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: skewX(-25deg);
    animation: shimmer 6s infinite;
}

@keyframes shimmer {

    0%,
    80% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.credential-highlight {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-main);
    line-height: 1.5;
}

.bio-text {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1.15rem;
    white-space: pre-line;
    line-height: 2;
}

.bio-quote {
    color: var(--text-muted2);
    font-family: var(--font-roman);
    font-weight: 500;
    font-size: 1.3rem;
    font-style: italic;
}

/* --- SERVICES (The Quartet) --- */
.services-grid {
    display: grid;
    /* Tighter minmax to trigger 2-column layout sooner */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 3.5rem 2rem;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 50px rgba(197, 160, 89, 0.15);
    border-color: var(--accent-gold);
}

.service-number {
    font-family: var(--font-logo);
    font-size: 2.5rem;
    color: var(--accent-gold);
    opacity: 0.4;
    margin-bottom: 1.5rem;
    display: block;
    transition: opacity 0.3s;
}

.service-card:hover .service-number {
    opacity: 1;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.02em;
}

.service-card p {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* --- PORTFOLIO --- */
.portfolio-list {
    list-style: none;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-item {
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.portfolio-item:last-child {
    border-bottom: none;
}

.portfolio-link {
    display: block;
    cursor: default;
}

.portfolio-link.clickable {
    cursor: pointer;
}

.portfolio-link:hover .project-title {
    color: var(--accent-gold);
    transform: scale(1.02);
}

.portfolio-link:hover .project-desc {
    color: var(--text-main);
}

.project-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.8rem;
    transition: all 0.4s ease;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.4s ease;
}

/* --- FOOTER --- */
footer {
    background-color: var(--midnight);
    color: #fff;
    padding: 8rem 2rem 10rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-top: 4rem;
}

.footer-brand {
    font-family: var(--font-logo);
    font-size: 2rem;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    color: #ffd68a;
}

.footer-info {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3rem;
    line-height: 2;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.social-links a,
.social-links span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    color: #fff;
    padding-bottom: 5px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.social-links a:hover,
.social-links span:hover {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
}

/* --- SELECTION COLOR --- */
::selection {
    background: var(--accent-gold);
    color: #fff;
}

/* --- TOAST NOTIFICATION (Glassmorphism Upgrade) --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 14px 24px;
    position: fixed;
    z-index: 2000;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-main);
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.05em;
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {
        bottom: 50px;
        opacity: 0;
    }

    to {
        bottom: 120px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 120px;
        opacity: 1;
    }

    to {
        bottom: 50px;
        opacity: 0;
    }
}

/* --- UTILITY FOR SUBTITLES --- */
.bio-subtitle {
    font-size: 0.7em;
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    section {
        padding: 6rem 2rem;
    }

    /* Resize Profile Photo for Mobile */
    .profile-wrapper {
        width: 180px;
        height: 180px;
    }

    /* Restore Padding for Mobile */
    .logo-main {
        font-size: 13vw;
    }

    .logo-sub {
        letter-spacing: 0.15em;
    }

    .credential-highlight {
        font-size: 1.2rem;
    }

    .service-card {
        padding: 3rem 1.5rem;
    }

    .orb-1,
    .orb-2,
    .orb-3 {
        opacity: 0.7;
    }

    .nav-deck {
        padding: 0.6rem 1rem;
        gap: 1rem;
        bottom: 1.5rem;
        width: 85%;
        justify-content: space-between;
    }

    .nav-link {
        font-size: 0.75rem;
    }
}