/* ===========================
   Darren Udaiyan - Artist Portfolio
   Elegant Dark Theme
   =========================== */

:root {
    --color-bg: #0a0a0a;
    --color-bg-elevated: #141414;
    --color-bg-card: #1a1a1a;
    --color-text: #e8e4df;
    --color-text-muted: #9a9590;
    --color-accent: #c9a96e;
    --color-accent-light: #dfc08a;
    --color-border: #2a2622;
    --color-border-light: #3d3832;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    text-align: justify;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===========================
   Navigation
   =========================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-brand {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

.nav-brand:hover {
    color: var(--color-accent);
}

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

.nav-links a {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition);
}

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

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

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

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

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

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

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    height: 60vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1410 50%, #0a0a0a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(201, 169, 110, 0.06) 0%, transparent 70%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='none' stroke='rgba(201,169,110,0.03)' stroke-width='0.5'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    animation: fadeInUp 1.2s ease-out;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: 300;
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

.page-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.page-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ===========================
   About Section
   =========================== */
.about-section {
    padding: 6rem 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-text);
}

.about-text em {
    color: var(--color-accent-light);
    font-style: italic;
}

/* ===========================
   Essay / Page Text
   =========================== */
.page-text {
    padding: 4rem 0;
}

.essay-text {
    max-width: 800px;
    margin: 0 auto;
}

.essay-text h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.essay-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.85;
}

.essay-text p.lead {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--color-accent-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.essay-text em {
    color: var(--color-accent-light);
}

/* Blockquote */
.artist-quote {
    margin: 3rem 0;
    padding: 2rem 2.5rem;
    border-left: 2px solid var(--color-accent);
    background: var(--color-bg-elevated);
    border-radius: 0 4px 4px 0;
}

.artist-quote p {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.artist-quote p:last-child {
    margin-bottom: 0;
}

/* ===========================
   Gallery
   =========================== */
.gallery-section {
    padding: 4rem 0 8rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: var(--color-bg-card);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition), opacity var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.03);
    opacity: 0.9;
}

/* ===========================
   Lightbox
   =========================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.lightbox.active {
    opacity: 1;
}

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

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color var(--transition);
}

.lightbox-close:hover {
    color: var(--color-accent);
}

/* ===========================
   Music Section
   =========================== */
.music-section {
    padding: 2rem 0 8rem;
}

.music-player-list {
    max-width: 800px;
    margin: 0 auto;
}

.music-track {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color var(--transition), background var(--transition);
}

.music-track:hover {
    border-color: var(--color-border-light);
    background: var(--color-bg-elevated);
}

.track-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.track-number {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--color-accent);
    min-width: 28px;
}

.track-name {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text);
}

.music-track audio {
    flex: 1;
    height: 40px;
    min-width: 0;
    border-radius: 20px;
    background: #2a2622;
    filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(1.1);
}

/* ===========================
   CV Section
   =========================== */
.cv-section {
    padding: 2rem 0 8rem;
}

.cv-content {
    max-width: 800px;
    margin: 0 auto;
}

.cv-block {
    margin-bottom: 4rem;
}

.cv-heading {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--color-accent);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.cv-item {
    display: flex;
    gap: 2rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
}

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

.cv-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    min-width: 100px;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.cv-detail {
    font-size: 0.95rem;
    line-height: 1.6;
}

.cv-detail strong {
    color: var(--color-text);
}

.cv-detail p {
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.cv-detail em {
    color: var(--color-accent-light);
}

.cv-representation {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
}

/* ===========================
   Contact Section
   =========================== */
.contact-section {
    padding: 2rem 0 8rem;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.85;
}

.contact-text h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-accent);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.contact-card {
    margin: 2.5rem 0;
    padding: 2.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.contact-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.contact-detail {
    padding: 1.25rem 1.5rem;
    background: var(--color-bg-elevated);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 4px 4px 0;
    margin: 1.5rem 0;
    font-size: 1.1rem;
}

.contact-detail a {
    font-size: 1.2rem;
    font-weight: 500;
}

.contact-note {
    font-size: 0.95rem !important;
    color: var(--color-text-muted);
    font-style: italic;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-list li {
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.service-list li strong {
    color: var(--color-accent);
}

.contact-closing {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-accent);
    text-align: center;
    margin-top: 3rem;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.footer-text.small {
    font-size: 0.8rem;
}

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

/* Fade in on scroll */
.gallery-item,
.cv-block,
.music-track {
    animation: fadeInUp 0.6s ease-out backwards;
}

.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.3s; }
.gallery-item:nth-child(5) { animation-delay: 0.4s; }
.gallery-item:nth-child(6) { animation-delay: 0.5s; }

.music-track:nth-child(2) { animation-delay: 0.05s; }
.music-track:nth-child(3) { animation-delay: 0.1s; }
.music-track:nth-child(4) { animation-delay: 0.15s; }
.music-track:nth-child(5) { animation-delay: 0.2s; }
.music-track:nth-child(6) { animation-delay: 0.25s; }
.music-track:nth-child(7) { animation-delay: 0.3s; }
.music-track:nth-child(8) { animation-delay: 0.35s; }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 2rem 0;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s ease, opacity 0.4s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links li {
        padding: 0.75rem 0;
    }

    .nav-links a {
        font-size: 1rem;
    }

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

    .music-track {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .track-info {
        min-width: auto;
    }

    .music-track audio {
        width: 100%;
    }

    .cv-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cv-date {
        min-width: auto;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .page-header {
        padding: 8rem 0 3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .gallery-grid {
        gap: 1rem;
    }

    .contact-card {
        padding: 1.5rem;
    }
}
