/* Premium Design Overrides */

/* Prevent horizontal overflow on mobile */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

:root {
    /* Color Palette - Deep Luxury */
    --premium-bg: #050505;
    --premium-bg-secondary: #0a0a0a;
    --premium-glass: rgba(10, 10, 10, 0.85);

    /* Text Colors */
    --premium-text-main: #f0f0f0;
    --premium-text-muted: #a0a0a0;
    --premium-text-accent: #d4af37;
    /* Gold fallback/accent if needed, but using Burgundy mainly */

    /* Brand Overrides from User Preference */
    --brand-main: #800020;
    /* Your Burgundy */
    --brand-secondary: #A01030;
    /* Lighter Burgundy for hover */

    /* Typography - Updated for Readability */
    --font-heading: 'Inter', sans-serif;
    /* Clean, modern sans-serif for headers */
    --font-body: 'Inter', sans-serif;
    /* Consistent readability for body */
}

body {
    background-color: var(--premium-bg);
    color: var(--premium-text-main);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: normal;
}

h4,
h5,
h6 {
    letter-spacing: 0.1em !important;
    /* Reduced from 0.2em based on user feedback */
}

h2 {
    letter-spacing: 0.05em;
    /* Increased breathing room for section titles */
}

p,
.lead,
li {
    font-family: var(--font-body);
    font-weight: 400;
    /* Increased from 300 to 400 for better readability on dark mode */
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.85);
    /* Increased contrast */
}

/* Glassmorphism Navbar */
#mainNav {
    background: var(--premium-glass) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-toggler {
    font-family: var(--font-body);
    /* Ensure toggler uses Inter */
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

#mainNav .navbar-brand {
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* Buttons - Minimalist Premium */
.btn {
    border-radius: 0;
    /* Sharp edges */
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 1rem 2rem;
    transition: all 0.4s ease;
}

.btn-primary {
    background: transparent;
    border: 1px solid var(--brand-main);
    color: var(--brand-text-bright);
}

.btn-primary:hover {
    background: var(--brand-main);
    border-color: var(--brand-main);
    box-shadow: 0 0 20px rgba(128, 0, 32, 0.4);
    /* Glow effect */
}

/* Hero Section Refinements */
.masthead {
    /* Darker overlay for better contrast */
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.6) 50%,
            var(--premium-bg) 100%),
        url('../assets/img/bg-masthead.jpg');
    background-size: cover;
    background-position: center;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--premium-text-main);
    font-size: 1.1rem;
    /* Smaller, more elegant */
    opacity: 0.9;
}

/* Cards & Sections */
.bg-black {
    background-color: var(--premium-bg-secondary) !important;
}

.bg-light {
    background-color: #0f0f0f !important;
    /* Override light backgrounds to dark gray */
}

.text-black-50 {
    color: var(--premium-text-muted) !important;
}

/* Custom Spacing for "Breathing Room" */
.premium-section {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.about-section.premium-section {
    padding-bottom: 2rem;
    /* Reduced padding for About section to fix layout */
    background: linear-gradient(to bottom, #000000 0%, #0f0f0f 100%) !important;
}

/* Micro-interactions */
a {
    transition: color 0.3s ease;
}

.card-hover-effect {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-hover-effect:hover {
    transform: translateY(-5px);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: none;
    width: 3rem;
    height: 3rem;
    text-align: center;
    color: #fff;
    background: rgba(128, 0, 32, 0.5);
    /* Burgundy with transparency */
    line-height: 2.8rem;
    border-radius: 50%;
    z-index: 9999;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease-in-out;
}

.scroll-to-top:hover {
    background: #800020;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.scroll-to-top:focus {
    color: white;
}

/* Page Transitions */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: 90ms cubic-bezier(0.4, 0, 1, 1) both fade-out;
}

::view-transition-new(root) {
    animation: 210ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Header Logo Hover Effect (Matching Footer) */
.header-logo {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.8;
}

/* Smooth Image Fade for About Section */
.about-section img {
    width: 100%;
    /* Ensure full width */
    object-fit: cover;
    min-height: 400px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 50%, transparent 100%);
    display: block;
    margin: 0;
}

/* Fix font size in Project Text (Training Location) */
.project-text p {
    font-size: 1rem !important;
}

/* Fix Accent Line Color (For everyone and anyone) */
.featured-text {
    border-left-color: var(--brand-main) !important;
}