/*
Copyright (c) 2024-2026. Jericho Crosby (Chalwk)

core.css (script shared between pages)
*/

:root {
    --primary: #1e88e5;
    --primary-dark: #1565c0;
    --secondary: #42a5f5;
    --accent: #0d47a1;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --font-primary: 'Roboto', sans-serif;
    --font-mono: 'Source Code Pro', monospace;

    --section-padding: 5rem 0;
    --container-max: 1200px;

    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
    background-image:
    radial-gradient(circle at 10% 20%, rgba(30, 136, 229, 0.03) 0%, transparent 30%),
    radial-gradient(circle at 90% 70%, rgba(66, 165, 245, 0.03) 0%, transparent 30%),
    radial-gradient(circle at 30% 80%, rgba(13, 71, 161, 0.03) 0%, transparent 30%),
    repeating-linear-gradient(45deg, rgba(0,0,0,0.01) 0px, rgba(0,0,0,0.01) 2px, transparent 2px, transparent 8px);
}

body.menu-open {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--darker);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary-dark);
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

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

.section {
    padding: var(--section-padding);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent)) 1;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--darker);
    margin-left: 0.5rem;
    z-index: 1002;
    position: relative;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo i {
    margin-right: 0.5rem;
    color: var(--primary);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover i {
    transform: rotate(-15deg) scale(1.1);
}

.nav-desktop {
    display: flex;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin-right: 0.5rem;
    align-items: center;
}

.nav-links > li {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--dark);
    font-weight: 500;
    position: relative;
    padding: 0.2rem;
    display: flex;
    align-items: center;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition);
}

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

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-toggle:hover,
.dropdown-toggle:focus {
    color: var(--primary);
    outline: none;
}

.dropdown-toggle .fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown:hover .dropdown-toggle .fa-chevron-down,
.dropdown-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid var(--gray-light);
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu li {
    margin: 0;
    position: relative;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--dark);
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
    background: linear-gradient(90deg, rgba(30, 136, 229, 0.1), transparent);
    color: var(--primary);
    padding-left: 2rem;
}

.dropdown-menu a:hover::before,
.dropdown-menu a:focus::before {
    transform: translateX(0);
}

.dropdown-submenu {
    position: relative;
}

.submenu-toggle {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.submenu-toggle:hover,
.submenu-toggle:focus {
    background: linear-gradient(90deg, rgba(30, 136, 229, 0.1), transparent);
    color: var(--primary);
    outline: none;
}

.submenu-toggle .fa-chevron-right {
    font-size: 0.8rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-submenu:hover .submenu-toggle .fa-chevron-right,
.dropdown-submenu.active .submenu-toggle .fa-chevron-right {
    transform: rotate(90deg);
}

.submenu {
    position: absolute;
    top: -0.5rem;
    left: 100%;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px) scale(0.95);
    transform-origin: top left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border: 1px solid var(--gray-light);
}

@media (min-width: 769px) {
    .dropdown-submenu:hover .submenu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0) scale(1);
    }

    .dropdown-submenu.right-align .submenu {
        left: auto;
        right: 100%;
        transform-origin: top right;
    }
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1002;
    padding: 0.5rem;
    margin-right: 0.5rem;
    background: none;
    border: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    width: 20px;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    width: 20px;
}

.nav-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: 80px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-mobile.active {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

.nav-mobile-links {
    list-style: none;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-mobile-links > li > a,
.nav-mobile-links > li > .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    color: var(--dark);
    font-weight: 500;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(203, 213, 225, 0.3);
    margin-bottom: 0.25rem;
}

.nav-mobile-links > li > a:hover,
.nav-mobile-links > li > a:focus,
.nav-mobile-links > li > .dropdown-toggle:hover,
.nav-mobile-links > li > .dropdown-toggle:focus {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary);
    transform: translateX(5px);
    border-color: var(--primary);
    outline: none;
}

.nav-mobile-links > li > a i,
.nav-mobile-links > li > .dropdown-toggle i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-mobile-links > li.active > a .fa-chevron-down,
.nav-mobile-links > li.active > .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.nav-mobile .dropdown-menu {
    position: static;
    background: rgba(248, 250, 252, 0.9);
    box-shadow: none;
    border-radius: var(--radius);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 0.5rem;
    border: none;
}

.nav-mobile .dropdown.active .dropdown-menu {
    max-height: 400px;
    padding: 0.5rem 0;
}

.nav-mobile .dropdown-menu a,
.nav-mobile .dropdown-menu .submenu-toggle {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    color: var(--dark);
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    justify-content: flex-start;
}

.nav-mobile .dropdown-menu a:hover,
.nav-mobile .dropdown-menu a:focus,
.nav-mobile .dropdown-menu .submenu-toggle:hover,
.nav-mobile .dropdown-menu .submenu-toggle:focus {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary);
    transform: none;
}

.nav-mobile .submenu {
    position: static;
    background: rgba(248, 250, 252, 0.9);
    box-shadow: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 1rem;
    border: none;
}

.nav-mobile .dropdown-submenu.active .submenu {
    max-height: 300px;
    padding: 0.5rem 0;
}

.dropdown-toggle:focus,
.submenu-toggle:focus,
.nav-mobile a:focus,
.scroll-to-top:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-mobile {
        display: flex;
    }

    .header.active {
        background: rgba(255, 255, 255, 0.98);
    }
}

@media (min-width: 769px) {
    .nav-mobile {
        display: none !important;
    }
}

main {
    margin-top: 80px;
}

footer {
    background-color: transparent;
    padding: 2rem 0;
}

footer p {
    text-align: center;
    margin: 0 auto 15px;
    max-width: 800px;
    padding: 0 15px;
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons a {
    color: var(--gray);
    font-size: 1.4rem;
    line-height: 1;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 15px 15px;
}

.footer-copyright::before {
    content: "© 2024-2026. Jericho Crosby (Chalwk)";
    display: block;
    text-align: center;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    footer {
        margin-top: 40px;
        padding-top: 20px;
    }

    .footer-container {
        padding: 15px 10px;
    }

    .social-icons a {
        font-size: 1.2rem;
    }

    main {
        margin-top: 70px;
    }

    .header {
        padding: 0.75rem 0;
    }

    .logo {
        font-size: 1.3rem;
        margin-left: 0.25rem;
    }
}

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .nav-mobile-links {
        padding: 1.5rem;
    }

    .nav-mobile-links > li > a,
    .nav-mobile-links > li > .dropdown-toggle {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

@media (prefers-contrast: high) {
    .dropdown-menu,
    .submenu,
    .nav-mobile {
        border: 2px solid currentColor;
    }

    .nav-links a::after {
        height: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .nav-mobile {
        transition: none;
    }

    .scroll-to-top {
        transition: opacity 0.3s;
    }
}

@media print {
    .nav-desktop,
    .nav-mobile,
    .hamburger,
    .scroll-to-top {
        display: none !important;
    }
}