/* ========================================
   CSS CUSTOM PROPERTIES (CSS Variables)
   ======================================== */
:root {
    /* Color Scheme - Light Mode */
    --primary-bg: rgb(232, 232, 232);
    --secondary-bg: #ffffff;
    --dark-bg: black;
    --dark-toggle: white;
    --white-color: white;
    --tertiary-bg: rgba(255, 255, 255, 0.9);
    --font-color: #1a1a1a;
    --font-secondary: #4a4a4a;
    --font-hover: #2c3e50;
    --border-color: #333333;
    --accent-color: #00827e;
    --accent-hover: #01504e;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;

    /* Shadows and Effects */
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --text-shadow-hover: 0 3px 6px rgba(0, 0, 0, 0.15);

    /* Layout */
    --header-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: rgba(255, 255, 255, 0.9);
    --section-bg: rgba(255, 255, 255, 0.8);
    --overlay-bg: rgba(0, 0, 0, 0.5);

    /* Preloader */
    --preloader:
        linear-gradient(0deg, rgb(0 0 0/50%) 30%, #0000 0 70%, rgb(0 0 0/100%) 0) 50%/8% 100%,
        linear-gradient(90deg, rgb(0 0 0/25%) 30%, #0000 0 70%, rgb(0 0 0/75%) 0) 50%/100% 8%;

    /* Typography Scale */
    --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);

    /* Spacing Scale */
    --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
    --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 1rem);
    --space-md: clamp(1rem, 0.8rem + 1vw, 2rem);
    --space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 3rem);
    --space-xl: clamp(2rem, 1.5rem + 2.5vw, 4rem);
    --space-2xl: clamp(3rem, 2rem + 5vw, 6rem);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --primary-bg: rgba(0, 0, 0, 0.87);
    --secondary-bg: #1a1a1a;
    --tertiary-bg: rgba(26, 26, 26, 0.9);
    --font-color: #f5f5f5;
    --font-secondary: #b0b0b0;
    --font-hover: #ffffff;
    --border-color: #e0e0e0;
    --dark-toggle: black;

    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.4);
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    --text-shadow-hover: 0 3px 6px rgba(0, 0, 0, 0.7);

    --header-bg: rgba(26, 26, 26, 0.95);
    --footer-bg: rgba(26, 26, 26, 0.9);
    --section-bg: rgba(26, 26, 26, 0.8);
    --overlay-bg: rgba(255, 255, 255, 0.1);

    --preloader-bg: linear-gradient(0deg, rgba(255, 255, 255, 0.5) 30%, transparent 0 70%, rgba(255, 255, 255, 1) 0) 50%/8% 100%,
        linear-gradient(90deg, rgba(255, 255, 255, 0.25) 30%, transparent 0 70%, rgba(255, 255, 255, 0.75) 0) 50%/100% 8%;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all var(--transition-normal);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--primary-bg);
    color: var(--font-color);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    font-weight: 400;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

body:has(.loader_sec) {
    overflow: hidden;
}

/* ========================================
   TYPOGRAPHY DEFAULTS
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--font-color);
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

h4 {
    font-size: var(--font-size-base);
    font-weight: 500;
}

h5 {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

h6 {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

p {
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--font-secondary);
    margin-bottom: var(--space-md);
}

/* Link Styles */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
}

a:hover,
a:focus {
    color: var(--accent-hover);
    outline: none;
}

a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

strong {
    color: var(--white-color);
}

[data-theme="light"] strong {
    color: var(--dark-bg);
}

/* ========================================
   BUTTON COMPONENTS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* Primary Button */
.btn-primary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    color: var(--font-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--font-color);
    color: var(--primary-bg);
    border-color: var(--font-color);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-lg);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-to-content {
    position: absolute;
    top: -100px;
    left: var(--space-md);
    background: var(--accent-color);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    z-index: var(--z-tooltip);
    transition: top var(--transition-normal);
}

.skip-to-content:focus {
    top: var(--space-md);
}

/* ========================================
   PRELOADER
   ======================================== */
.loader_sec {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--secondary-bg);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader {
    width: 50px;
    aspect-ratio: 1;
    display: grid;
    border-radius: 50%;
    background: var(--preloader);
    background-repeat: no-repeat;
    animation: animate 1s infinite steps(12);
}

.loader::before,
.loader::after {
    content: "";
    grid-area: 1/1;
    border-radius: 50%;
    background: inherit;
    opacity: 0.915;
    transform: rotate(30deg);
}

.loader::after {
    opacity: 0.83;
    transform: rotate(60deg);
}

@keyframes animate {
    100% {
        transform: rotate(1turn)
    }
}

/* ========================================
   WAVE ANIMATION
   ======================================== */
.waves {
    position: absolute;
    width: 100%;
    height: 50vh;
    bottom: 0;
    margin-bottom: -7px;
    z-index: -5;
}

.content {
    position: relative;
    height: 20vh;
    text-align: center;
    background-color: white;
}

/* Animation */

.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.mobile-header {
    display: none;
}

.mobile-header .logo img {
    height: 40px;
    width: auto;
    max-width: 250px;
}

@media (max-width: 400px) {
    .mobile-header .logo img {
        height: 30px;
    }
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--font-color);
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: var(--space-xs);
}

.main-navigation {
    height: 100vh;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close {
    display: none;
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--font-color);
    font-size: var(--font-size-xl);
    cursor: pointer;
    z-index: var(--z-modal);
}

.nav-list {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: clamp(20px, 4vh, 40px);
    list-style: none;
}

.nav-item {
    transform: rotate(-90deg);
    white-space: nowrap;
    display: inline-flex;
    min-height: 80px;
    height: fit-content;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.nav-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--font-color);
    text-shadow: var(--text-shadow);
    transition: all var(--transition-normal);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
    /* text-shadow: var(--text-shadow-hover); */
}

.nav-line {
    height: 2px;
    width: 70px;
    background-color: var(--font-color);
    min-height: 2px;

    &:first-child {
        margin-bottom: 2rem;
    }

    &:last-child {
        margin-top: 2.5rem;
    }
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    flex: 1;
    padding: var(--space-xl) var(--space-lg);
    height: 100%;
    width: calc(100% - 160px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    margin: 0 auto;
    gap: var(--space-lg);
}

section {
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
    padding: var(--space-sm);

    &::-webkit-scrollbar {
        width: 5px;
        color: var(--accent-color);
        background-color: var(--overlay-bg);
    }

    &::-webkit-scrollbar-thumb {
        background-color: var(--accent-color);
    }
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    height: 100vh;
    width: 80px;
    padding: var(--space-md) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    z-index: var(--z-toast);
    position: relative;
}

.theme-toggle,
.share-button,
.social-item {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--dark-toggle);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

[data-theme="dark"] .share-button {
    background: var(--secondary-bg);
}

.theme-toggle:hover,
.share-button:hover,
.social-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.theme-icon {
    font-size: var(--font-size-lg);
    color: var(--font-color);
    transition: all var(--transition-normal);
}

.social-media {
    transform: translateX(300px);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    transition: var(--transition-slow);
}

.social-media.show {
    transform: translateX(0);
}

.social-link,
.share-button i {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--font-color);
    font-size: var(--font-size-lg);
}

.copyright {
    display: none;
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--font-secondary);
}

.brand-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--accent-color);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 900px) {
    body {
        overflow: auto;
        overflow-x: hidden;
        flex-direction: column;
    }

    .waves {
        display: none;
    }

    .main-content {
        padding: 0 var(--space-md);
        grid-template-columns: 1fr;
        height: fit-content;
    }

    section {
        width: 100%;
        padding: var(--space-2xl) 0;
    }

    .mobile-header {
        display: flex;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        height: 80px;
        width: 100%;
        padding: 20px;
        background: var(--header-bg);
        backdrop-filter: blur(10px);
        z-index: var(--z-fixed);
        align-items: center;
        justify-content: space-between;
        box-shadow: var(--box-shadow);
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--secondary-bg);
        transition: left var(--transition-slow);
        z-index: var(--z-modal);
        backdrop-filter: blur(10px);
        align-items: flex-start;
        /* justify-content: flex-start; */
    }

    .main-navigation.show_nav {
        left: 0;
    }

    .mobile-menu-close {
        display: block;
    }

    .nav-list {
        padding-top: 100px;
        gap: var(--space-xl);
        height: 70%;
        justify-content: flex-start;
    }

    .nav-item {
        transform: none;
        min-height: unset;
    }

    .nav-line {
        display: none;

        &:first-child {
            margin-bottom: 0;
        }

        &:last-child {
            margin-top: 0;
        }
    }

    .nav-link {
        font-size: var(--font-size-2xl);
    }

    .theme-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: var(--z-toast);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .share-button {
        display: none;
    }

    /* .main-content {
        margin-left: 0;
        padding-top: calc(70px + var(--space-lg));
    } */

    .site-footer {
        justify-content: center;
        width: 100%;
        /* flex-direction: row;
        justify-content: space-around; */
        padding: var(--space-md);
        background: var(--footer-bg);
        /* backdrop-filter: blur(10px); */
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    }

    .social-media {
        position: fixed;
        right: 50%;
        bottom: 10vh;
        flex-direction: row;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(50%) scale(0.5);
        transition: all var(--transition-normal);
    }

    .theme-toggle.show {
        opacity: 1;
        visibility: visible;
        pointer-events: unset;
    }

    .social-media.show {
        opacity: 1;
        visibility: visible;
        pointer-events: unset;
        transform: translateX(50%) scale(1);
    }

    .copyright {
        display: block;

        p {
            margin: auto;
        }
    }

    .tagline {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        width: 100%;
    }
}


@media (max-width: 500px) {
    .mobile-header {
        padding: 10px;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
    }
}


/* Focus Management */
.focus-trap {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Print Styles */
@media print {

    .mobile-header,
    .main-navigation,
    .site-footer {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .mobile-header .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}