/**
 * Artist Portfolio - Main Stylesheet
 * A distinctive, artistic design system
 */

/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: var(--body-size, 16px);
}

body {
    font-family: var(--secondary-font, 'Raleway', sans-serif);
    background-color: var(--background-color, #FAFAFA);
    color: var(--text-color, #2D3436);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--primary-font, 'Playfair Display', serif);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, var(--heading-size, 48px));
}

h2 {
    font-size: clamp(2rem, 4vw, calc(var(--heading-size, 48px) * 0.75));
}

h3 {
    font-size: clamp(1.5rem, 3vw, calc(var(--heading-size, 48px) * 0.55));
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--secondary-color, #E17055);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color, #00B894);
}

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

.container-narrow {
    max-width: 900px;
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.site-logo {
    font-family: var(--primary-font, 'Playfair Display', serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color, #2D3436);
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-logo .subtitle {
    font-family: var(--secondary-font, 'Raleway', sans-serif);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.6;
}

/* ===== Navigation ===== */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.main-nav a {
    font-family: var(--secondary-font, 'Raleway', sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-color, #2D3436);
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color, #E17055);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

.nav-dropdown-menu a:hover {
    background: var(--background-color, #FAFAFA);
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary-color, #2D3436);
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s ease;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav.open {
        right: 0;
    }
    
    .main-nav a {
        font-size: 1.2rem;
    }
    
    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        padding: 0.5rem 0 0 1rem;
    }
}

/* ===== Hero / Homepage ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0.9) 100%);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease forwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.7;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

/* ===== Section Buttons (Homepage) ===== */
.section-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.section-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 24px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
}

.section-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section-btn:hover {
    transform: translateY(-8px);
    border-color: var(--secondary-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.section-btn:hover::before {
    opacity: 0.05;
}

.section-btn-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    transition: transform 0.5s ease;
}

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

.section-btn-title {
    font-family: var(--primary-font);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-btn-count {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
}

/* Color variations for section buttons */
.section-btn[data-type="animation"] .section-btn-icon { color: #E17055; }
.section-btn[data-type="puppetry"] .section-btn-icon { color: #00B894; }
.section-btn[data-type="characters"] .section-btn-icon { color: #6C5CE7; }
.section-btn[data-type="galleries"] .section-btn-icon { color: #FDCB6E; }

/* ===== Page Header ===== */
.page-header {
    padding: 10rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--background-color) 0%, white 100%);
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ===== Content Sections ===== */
.content-section {
    padding: 5rem 2rem;
}

.content-section:nth-child(even) {
    background: white;
}

/* ===== Image Grids ===== */
.image-grid {
    display: grid;
    gap: 1.5rem;
}

.image-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.image-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.image-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.image-grid.grid-6 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.image-grid-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

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

.image-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

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

@media (max-width: 768px) {
    .image-grid.grid-3,
    .image-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .image-grid.grid-2,
    .image-grid.grid-3,
    .image-grid.grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===== Gallery with Lightbox ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

.lightbox-nav:hover {
    background: var(--secondary-color);
    color: white;
}

/* ===== Character Page ===== */
.character-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 8rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.character-main-image {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.character-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.character-info h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
}

.character-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.character-thumbnail {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-thumbnail:hover {
    transform: scale(1.05);
}

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

@media (max-width: 900px) {
    .character-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .character-thumbnails {
        justify-content: center;
    }
}

/* ===== Animation Page ===== */
.animation-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    margin-bottom: 3rem;
}

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

.animation-process {
    margin-top: 4rem;
}

.animation-process h3 {
    text-align: center;
    margin-bottom: 2rem;
}

/* ===== Puppetry Page ===== */
.puppetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .puppetry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.puppetry-story {
    margin-top: 4rem;
    padding: 3rem;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* ===== About Page ===== */
.about-hero {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    position: sticky;
    top: 120px;
}

.about-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.about-content section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.about-content section:last-child {
    border-bottom: none;
}

@media (max-width: 900px) {
    .about-hero {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        position: static;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a1a2e 100%);
    color: white;
}

.contact-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.contact-section p {
    opacity: 0.8;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--secondary-font);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background: var(--secondary-color);
    color: white;
}

/* ===== Footer ===== */
.site-footer {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--primary-color);
    color: white;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== Thumbnail Grid (Category Page) ===== */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.thumbnail-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
}

.thumbnail-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.thumbnail-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

.thumbnail-card:hover .thumbnail-card-image img {
    transform: scale(1.05);
}

.thumbnail-card-content {
    padding: 1.5rem;
}

.thumbnail-card-title {
    font-family: var(--primary-font);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.thumbnail-card-excerpt {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.5;
}

/* ===== Holding Page ===== */
.holding-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
}

.holding-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    opacity: 0.5;
}

.holding-page h2 {
    margin-bottom: 1rem;
}

.holding-page p {
    opacity: 0.6;
    max-width: 500px;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.hidden { display: none; }
.visible { display: block; }

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
