/* --- BASE & TYPOGRAPHY STYLES --- */
body {
    background-color: #100000;
    color: #fff8e1;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

h1, h2, h3 {
    /* Adds a subtle glow effect to headings, enhancing the theme */
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* --- INTERACTIVE BACKGROUND --- */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* Places the background behind all other content */
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #100000; }
::-webkit-scrollbar-thumb {
    background-color: #d4af37; /* brand-gold */
    border-radius: 10px;
    border: 2px solid #100000;
}

/* --- SCROLL ANIMATION CLASSES --- */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
/* Pre-animation states for different effects */
.animate-on-scroll.slide-in-left { transform: translateX(-50px); }
.animate-on-scroll.slide-in-right { transform: translateX(50px); }
.animate-on-scroll.fade-in-up { transform: translateY(50px); }
.animate-on-scroll.scale-up { transform: scale(0.9); }
/* The state when the element becomes visible */
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}

/* --- UI COMPONENTS & EFFECTS --- */

/* Animated underline for section titles */
.title-underline {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}
.title-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #d4af37; /* brand-gold */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.2s;
}
.animate-on-scroll.visible .title-underline::after {
    transform: scaleX(1); /* Reveals the underline on scroll */
}

/* Glassmorphism effect for navigation and other overlays */
.glass-overlay {
    background: rgba(26, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: background 0.3s, border 0.3s, transform 0.3s;
}
.glass-overlay:hover {
    background: rgba(26, 0, 0, 0.7);
    border-color: rgba(212, 175, 55, 0.4);
}

/* Portfolio card hover effect */
.portfolio-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-size: cover;
    background-position: center;
}
.portfolio-card:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5); /* Adds a golden glow */
}

/* Simple border for separating sections */
section:not(#home) {
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
}

/* --- SPA PAGE TRANSITIONS --- */
.page-content {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}
.page-content.is-exiting {
    opacity: 0; /* Fades out the old content */
}

/* --- LIGHTBOX STYLES --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.lightbox-overlay.visible {
    opacity: 1;
}
#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out;
}
.lightbox-overlay.visible #lightbox-image {
    transform: scale(1);
}

/* --- MISCELLANEOUS STYLES --- */
.image-frame {
    border: 3px solid #d4af37;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.15);
}

.icon-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border: 2px solid #d4af37;
    border-radius: 9999px;
    color: #d4af37;
    background-color: transparent;
    transition: all 0.3s ease-in-out;
}
.icon-btn:hover {
    background-color: #d4af37;
    color: #100000;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}
.icon-btn svg {
    width: 28px;
    height: 28px;
}

/* Tooltip for copy-to-clipboard feedback */
.copy-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #d4af37;
    color: #100000;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}
.copy-tooltip.visible {
    opacity: 1;
    visibility: visible;
}