:root {
    /* Professional Ocean-Inspired Palette */
    --primary-color: #0888D0;
    /* Ocean Blue - main accent */
    --primary-color-rgb: 8, 136, 208;
    --secondary-color: #18C3BA;
    /* Cyan - secondary accent */
    --secondary-color-rgb: 24, 195, 186;
    --accent-color: #005C78;
    /* Medium Blue - highlights */
    --accent-color-rgb: 0, 92, 120;
    --signal-color: #C2C41A;
    /* Lime - call-to-action */
    --signal-color-rgb: 194, 196, 26;

    /* Background Colors */
    --bg-deep: #0A0E14;
    /* Deep ocean background */
    --bg-dark: #14191F;
    /* Dark ocean depth */
    --bg-medium: #1E252D;
    /* Medium depth */
    --bg-surface: #2A3541;
    /* Surface water */

    /* Text Colors */
    --text-primary: #EFEFE3;
    --text-secondary: #D5D6CC;
    --text-muted: #9BA0A6;

    /* Glass/Transparency Effects */
    --glass-bg: rgba(239, 239, 227, 0.04);
    --glass-border: rgba(239, 239, 227, 0.08);

    /* Legacy color variables for compatibility */
    --light-color: #EFEFE3;
    --ocean-blue-deep: var(--bg-deep);
    --ocean-blue-dark: var(--bg-dark);
    --ocean-blue-mid: var(--bg-medium);
    --ocean-gray: var(--text-muted);
    --ocean-gray-dark: var(--bg-medium);
    --text-light: var(--text-primary);
    --black-rgb: 10, 14, 20;
    --ocean-blue-deep-rgb: 20, 25, 31;
    --ocean-blue-dark-rgb: 30, 37, 45;
    --ocean-gray-rgb: 155, 160, 166;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background:
        linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-dark) 30%, var(--bg-medium) 70%, var(--bg-surface) 100%),
        radial-gradient(circle at 20% 80%, rgba(var(--primary-color-rgb), 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(var(--secondary-color-rgb), 0.02) 0%, transparent 50%);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

/* Navigation */
.navbar {
    background: rgba(var(--black-rgb), 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-primary) !important;
}

.ocean-text {
    color: var(--text-primary);
    margin-right: 0.15rem;
}

.logo {
    height: 40px;
    /* Removed filter to ensure logo displays correctly */
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 8px rgba(var(--primary-color-rgb), 0.4);
}

/* Hero Section */
header {
    height: 100vh;
    position: relative;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-carousel .carousel-inner {
    height: 100%;
}

.hero-carousel .carousel-item {
    height: 100%;
}

.hero-image {
    height: 100vh;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

/* Custom cross-fade transitions for carousel */
.hero-carousel .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 3s ease-in-out;
    z-index: 1;
}

.hero-carousel .carousel-item.active {
    opacity: 1;
    z-index: 2;
}

.hero-content h1 {
    text-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.2);
}

.hero-content p {
    color: var(--text-secondary);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Sections */
section {
    padding: 100px 0;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.3;
}

#bio {
    border-bottom: none;
}

#bio::before {
    display: none;
}

#about {
    background: linear-gradient(-90deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-surface) 100%);
    position: relative;
}

/* Cards */
.card {
    transition: all 0.4s ease;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 15px 30px rgba(var(--primary-color-rgb), 0.08),
        0 0 20px rgba(var(--primary-color-rgb), 0.04);
    border-color: rgba(var(--primary-color-rgb), 0.25);
    background: rgba(var(--primary-color-rgb), 0.015);
}

.card-body {
    padding: 2rem;
}

/* Forms */
.form-control {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(var(--primary-color-rgb), 0.03);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow:
        0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.12),
        0 0 15px rgba(var(--primary-color-rgb), 0.08);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.15);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.2);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Services Section */
#services {
    background: linear-gradient(-90deg, var(--bg-deep) 0%, var(--bg-dark) 40%, var(--bg-medium) 100%);
    position: relative;
}

#services::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(var(--primary-color-rgb), 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(var(--accent-color-rgb), 0.05) 0%, transparent 50%),
        linear-gradient(45deg, transparent 0%, rgba(var(--secondary-color-rgb), 0.02) 50%, transparent 100%);
    pointer-events: none;
}

#services .card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(var(--primary-color-rgb), 0.15);
}

#services .card-body img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

#services .card:hover .card-body img {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px var(--primary-color));
}

/* Team Section */
#team {
    background: linear-gradient(90deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-dark) 100%);
    position: relative;
    padding: 80px 0;
}

#team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 70%, rgba(var(--secondary-color-rgb), 0.02) 0%, transparent 60%),
        radial-gradient(circle at 70% 30%, rgba(var(--accent-color-rgb), 0.02) 0%, transparent 60%);
    pointer-events: none;
}

#team .circular-headshot {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.2);
}

#team .circular-headshot:hover {
    transform: scale(1.08) translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(var(--secondary-color-rgb), 0.3);
}

#team .team-member-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

#team .team-member-link:hover {
    transform: translateY(-3px);
}

#team h5 {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

#team .col-lg-3 {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    #team .circular-headshot {
        width: 150px;
        height: 150px;
    }
}

.circular-headshot-large {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(var(--primary-color-rgb), 0.2);
}

/* Contact Section */
#contact {
    background: linear-gradient(-90deg, var(--bg-medium) 0%, var(--bg-dark) 50%, var(--bg-deep) 100%);
    position: relative;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(var(--signal-color-rgb), 0.03) 0%, transparent 70%),
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* Footer */
footer {
    background: var(--bg-deep);
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.2);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

/* Footer Links */
footer .hover-primary:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* Social Media Icons */
footer .social-icon {
    display: inline-block;
    transition: all 0.3s ease;
}

footer .social-icon:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.4);
}

/* Footer Logo Styling */
footer .ocean-text {
    color: var(--text-primary);
    margin-right: 0.15rem;
}

/* Footer column distribution and alignment */
footer .row.justify-content-center {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
}

footer .services-column,
footer .company-column {
    text-align: left;
    max-width: 250px;
}

footer .services-column ul,
footer .company-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

footer .services-column h6,
footer .company-column h6 {
    text-align: left;
    margin-bottom: 1rem;
}

/* Keep first column centered */
footer .col-lg-4.text-center:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 350px;
}

/* Footer Text Colors */
footer h5,
footer h6,
footer p,
footer a,
footer li a {
    color: var(--text-primary) !important;
}

footer .text-muted {
    color: var(--text-secondary) !important;
}

footer .text-light {
    color: var(--text-primary) !important;
}

main {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    text-shadow: 0 0 12px rgba(var(--primary-color-rgb), 0.2);
}

/* Video Background Styles */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(var(--black-rgb), 0.85) 0%, rgba(var(--black-rgb), 0.65) 50%, rgba(var(--black-rgb), 0.75) 100%),
        radial-gradient(circle at 30% 70%, rgba(var(--primary-color-rgb), 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(var(--accent-color-rgb), 0.03) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

/* Glow Effects */
.glow-text {
    text-shadow: 0 0 8px rgba(var(--primary-color-rgb), 0.3);
}

.glow-border {
    border: 1px solid rgba(var(--primary-color-rgb), 0.25);
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.08);
}

/* Animations */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.15);
    }

    50% {
        box-shadow: 0 0 25px rgba(var(--primary-color-rgb), 0.25);
    }
}

.pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
    }

    .hero-image {
        height: 70vh;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .btn-primary {
        padding: 0.75rem 1.5rem;
    }
}

/* Bio page specific styles */
.no-scroll {
    /* Ensure button styling is consistent */
    text-decoration: none !important;
}

.no-scroll:hover {
    text-decoration: none !important;
}

/* Ensure bio content is visible as fallback */
#bio .display-5,
#bio .lead,
#bio .funny-title-placeholder {
    min-height: 1.5em;
}

/* Bio text justification and paragraph spacing */
#bio .lead p {
    text-align: justify !important;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Funny title styling */
#team .fs-6 em,
#bio .fs-5 em {
    font-weight: 500;
    color: var(--secondary-color) !important;
}

/* Force white text color on bio pages - override Bootstrap defaults */
#bio,
#bio *,
#bio .display-5,
#bio h1,
#bio h2,
#bio h3,
#bio h4,
#bio h5,
#bio h6,
#bio .lead,
#bio p,
#bio em,
#bio .funny-title-placeholder,
#bio .funny-title-placeholder em {
    color: var(--text-primary) !important;
    color: #EFEFE3 !important;
}

/* Ensure proper contrast for loading states */
#bio [style*="opacity: 0.3"] {
    color: rgba(239, 239, 227, 0.8) !important;
}

/* Additional specificity for Bootstrap overrides */
section#bio .display-5,
section#bio .lead,
section#bio p,
section#bio h2 {
    color: #EFEFE3 !important;
}

/* Target any potential Bootstrap text utilities */
#bio .text-dark,
#bio .text-secondary,
#bio .text-muted {
    color: #EFEFE3 !important;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }

    .hero-section {
        background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-dark) 100%);
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Section Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
}