/* Import Component Libraries */
@import 'components/buttons.css';
@import 'components/cards.css';
@import 'components/modals.css';
@import 'components/typography.css';
@import 'components/animations.css';
@import 'components/accessibility.css';

:root {
    /* Colors */
    --bg : #1A1A2E;
    --sec: #4F8C8B;
    --acc: #F1c40F;
    --text: #F4F4F4;
    --prime: #333333;
    
    /* Semantic Colors */
    --success: #4CAF50;
    --success-dark: #45a049;
    --success-light: rgba(76, 175, 80, 0.2);
    
    --error: #F44336;
    --error-dark: #D32F2F;
    --error-light: rgba(244, 67, 54, 0.2);
    
    --warning: #FF5722;
    --warning-dark: #D84315;
    --warning-light: rgba(255, 87, 34, 0.2);
    
    --info: #2196F3;
    --info-dark: #1976D2;
    --info-light: rgba(33, 150, 243, 0.2);
    
    --caution: #FF9800;
    --caution-dark: #F57C00;
    
    /* Extended Palette */
    --purple: #9C27B0;
    --purple-dark: #7B1FA2;
    --indigo: #673AB7;
    --indigo-dark: #512DA8;
    --blue: #3F51B5;
    --blue-dark: #303F9F;
    --gold: #FFD700;
    --gold-dark: #FFA000;
    --pink: #E91E63;
    --pink-dark: #C2185B;
    --light-green: #8BC34A;
    --light-green-dark: #689F38;
    --amber: #FFC107;
    --amber-dark: #FF8F00;
    --cyan: #00BCD4;
    --cyan-dark: #0097A7;
    --aqua: #00FFFF;
    --red-orange: #ff4500;
    --tomato: #ff6347;
    --bright-blue: #0080ff;
    --royal-blue: #4169e1;
    
    /* Hero Banner Text Colors */
    --hero-text-warm: #FFB84D;
    --hero-text-light: #FFF5E6;
    --hero-text-accent: #FFD699;
    
    /* Overlay System */
    --overlay-subtle: rgba(0, 0, 0, 0.1);
    --overlay-light: rgba(0, 0, 0, 0.3);
    --overlay-medium: rgba(0, 0, 0, 0.5);
    --overlay-dark: rgba(26, 26, 46, 0.75);
    --overlay-heavy: rgba(0, 0, 0, 0.95);
    
    /* Text Variants */
    --text-light: #ffffff;
    --text-semi: rgba(255, 255, 255, 0.5);
    --bg-dark: #000000;
    
    /* Accent Variants */
    --accent-light: rgba(241, 196, 15, 0.2);
    --accent-medium: rgba(241, 196, 15, 0.3);
    --secondary-light: rgba(79, 140, 139, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Section Padding */
    --section-padding: 2rem;
    --section-padding-mobile: 1rem;
    
    /* Margin Conventions */
    --margin-xs: 0.25rem;
    --margin-sm: 0.5rem;
    --margin-md: 1rem;
    --margin-lg: 1.5rem;
    --margin-xl: 2rem;
    --margin-xxl: 3rem;
    
    /* Component Margins */
    --margin-section: var(--margin-xl);
    --margin-component: var(--margin-lg);
    --margin-element: var(--margin-md);
    --margin-text: var(--margin-sm);
    
    /* Breakpoints */
    --breakpoint-xs: 480px;  /* Extra small devices (portrait phones) */
    --breakpoint-sm: 576px;  /* Small devices (landscape phones) */
    --breakpoint-md: 768px;  /* Medium devices (tablets) */
    --breakpoint-lg: 992px;  /* Large devices (desktops, small laptops) */
    --breakpoint-xl: 1200px; /* Extra large devices (large desktops) */
    --breakpoint-xxl: 1400px; /* XX-large devices (larger desktops) */
    
    /* Animation System */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-extra-slow: 1s ease;
    
    /* Transform Scales */
    --scale-hover: 1.05;
    --scale-active: 0.95;
    --scale-focus: 1.1;
    
    /* Animation Durations */
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    --duration-pulse: 2s;
    --duration-flow: 3s;
   }

*{
    margin: 0;
    padding: 0;
}

body {
    color: var(--text); 
    background: radial-gradient(ellipse 150% 150% at 50% 50%, #172A45, #0A1128);
    width: 100%;
    font-family: 'Arial', sans-serif;
    text-align: center;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 80px;
}

@media (max-width: 480px) {
    body {
        padding-bottom: 20px;
    }
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../media/graphics/global-bg-noise.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.1; 
    pointer-events: none;
}


/* Typography Hierarchy */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--margin-xl);
    color: var(--text);
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--margin-lg);
    color: var(--acc);
    text-align: left;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--margin-md);
    color: var(--acc);
    text-align: left;
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--margin-text);
    color: var(--acc);
}

h5 {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--margin-text);
    color: var(--text);
}

h6 {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--margin-text);
    color: var(--text);
}

p, li {
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: var(--margin-lg);
    text-align: left;
    color: var(--text);
}

ul {
    margin-left: 100px;
}

.modal-body ul {
    margin-left: 20px;
}

#navObj {
    position: fixed;
    top: 5px;
    left: 5px;
    width: 80px;
    height: 80px;
    z-index: 20;
    overflow: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

#logo {
    position: fixed;
    top: 5px;
    left: 5px;
    width: 80px;
    height: 80px;
    z-index: 20;
    cursor: pointer;
    object-fit: contain;
}

#nav {
    display: none;
    position: fixed;
    top: 100px;
    left: 15px;
    z-index: 20;
}

#nav>hr {
    width: 50px;
    height: 1px;
    margin-bottom: 20px;
    background-color: var(--acc);
    border: none;
}

.navItem {
    margin-bottom: 20px;
    color: var(--acc);
    cursor: pointer;
    transition: all var(--transition-normal);
    padding: 8px 12px;
    border-radius: 4px;
    position: relative;
}

.navItem:hover,
.navItem:focus {
    color: var(--text);
    background: rgba(241, 196, 15, 0.1);
    transform: translateX(5px);
    outline: 2px solid var(--acc);
}

.navItem.active {
    color: var(--text);
    background: rgba(241, 196, 15, 0.2);
    border-left: 3px solid var(--acc);
}

.navItem.active::before {
    content: '▶';
    position: absolute;
    left: -15px;
    color: var(--acc);
}



.break {
    clear: both;
}

#hero-bg {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#hero-canvas {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    touch-action: none;
    pointer-events: none;
}

#hero {
    position: absolute;
    top: 45vh;
    z-index: 1;
    width: 90%;
    display: block;
    padding: 5%;
    margin: auto;
    z-index: 10;
}

.section {
    width: 90%;
    display: block;
    padding: var(--section-padding);
    margin: auto;
    z-index: 10;
}

.highlight {
    color: var(--acc); 
}

.sc_item {
    position: relative;
    display: inline-block;
    width: 20%;
    margin: var(--margin-component);
    border: 1px solid var(--acc);
    box-shadow: 2px 2px 10px var(--text-semi);
    cursor: pointer;
    transition: all var(--transition-slow);
}

.sc_item:hover {
    transform: scale(var(--scale-hover));
    box-shadow: 4px 4px 15px var(--acc);
}

.sc_img {
    width: 100%;
    z-index: 1;
    transition: all var(--transition-slow);
}

/* .sc_img:hover {
    filter: brightness(1.5);
} */

.sc_text {
    position: absolute;
    left: 0;
    right: 0;
    top: 20%;
    width: 90%;
    margin: auto;
    z-index: 10;
}

.proj_desc {
    display: none;
}

.card-showcase:hover .proj_desc,
.sc_item:hover .proj_desc {
    display: block;
}

.demo_container {
    width: 100%;
    left: 0;
}

#demo {
    width: 80%;
    height: 80vh;
    margin-left: -10%;
    border: 1px solid var(--error);
}


/* Standard Breakpoints for Responsive Design */

/* Example Media Queries */

/* Extra small devices (portrait phones, less than 480px) */
@media (max-width: 480px) {
    /* Styles for extra small devices */
    .section {
        padding: var(--section-padding-mobile);
    }
    
    p, li {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 30px;
    }
    
    .sc_item {
        width: 80%;
        margin: 10% 5%;
    }
    
    .sc_item:hover {
        width: 85%;
        margin: 10% 2.5%;
    }
    
    ul {
        margin-left: 20px;
    }
    
    .contact-form-container {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 85% !important;
        padding: 15px !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        max-width: none !important;
        position: fixed !important;
    }
    
    .contact-form-container h2 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    #contact-form {
        gap: 15px !important;
    }
    
    /* Navigation mobile portrait fixes */
    .navItem {
        margin-bottom: 2px !important;
        padding: 3px 6px !important;
        font-size: 13px !important;
        display: flex !important;
        align-items: center !important;
        min-height: 36px !important;
    }
    
    #nav > hr {
        margin-bottom: 2px !important;
        height: 0.5px !important;
    }
    
    #nav {
        top: 75px !important;
    }
    
    #contact-form input,
    #contact-form textarea {
        padding: 10px !important;
        font-size: 14px !important;
    }
    
    .btn-cta {
        width: 90% !important;
    }
}

/* Small devices (landscape phones, 480px to 576px) */
@media (min-width: 481px) and (max-width: 576px) {
    /* Styles for small devices */
    p, li {
        font-size: 18px;
        line-height: 28px;
        margin-bottom: 35px;
    }
    
    .sc_item {
        width: 70%;
        margin: 8% 5%;
    }
    
    .sc_item:hover {
        width: 75%;
        margin: 8% 2.5%;
    }
    
    ul {
        margin-left: 30px;
    }
    
    .contact-form-container {
        top: 10%;
        width: 92%;
        padding: 25px;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .contact-form-container h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .btn-cta {
        width: 90%;
    }
}

/* Medium devices (tablets, 577px to 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    /* Styles for medium devices */
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    p, li {
        font-size: 18px;
        line-height: 30px;
        margin-bottom: 40px;
    }

    #hero {
        padding: 10px;
        width: 75%;
    }

    #showcase {
        padding: 0;
        margin-left: 0;
    }
    
    .sc_item {
        width: 35%;
        margin: 3%;
    }
    
    .sc_item:hover {
        width: 42%;
        margin: 4%;
    }
    
    ul {
        margin-left: 50px;
    }
}

/* Large devices (desktops, 769px to 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    /* Styles for large devices */
    p, li {
        font-size: 22px;
        line-height: 32px;
        margin-bottom: 45px;
    }
    
    .sc_item {
        width: 30%;
        margin: 4.5%;
    }
    
    .sc_item:hover {
        width: 32%;
        margin: 3.5%;
    }
    
    ul {
        margin-left: 70px;
    }
}

/* Large screens (tablets landscape and up, 769px and above) */
@media (min-width: 769px) {
    #nav p.navItem {
        margin-bottom: 35px !important;
        padding: 18px 24px !important;
        font-size: 22px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
    }
    
    #nav > hr {
        margin-bottom: 35px !important;
        width: 90px !important;
        height: 2px !important;
    }
}



/* Contact Form Overlay */

#contactObj {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#footerObj {
    position: fixed;
    bottom: 5px;
    right: 5px;
    width: 230px;
    height: 65px;
    z-index: 20;
    overflow: hidden;
    background: transparent;
    border: none;
}

.contact-form-container {
    position: absolute;
    top: 5%;
    left: 0;
    right: 0;
    margin: auto;
    background: linear-gradient(135deg, rgba(79, 140, 139, 0.1), rgba(26, 26, 46, 0.9));
    border: 1px solid var(--acc);
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px var(--overlay-medium), 0 0 20px var(--accent-light);
}

.contact-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--acc);
    font-size: 30px;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.contact-close:hover {
    color: var(--text);
}

.contact-form-container h2 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--acc);
    font-size: 28px;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#contact-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#contact-form input,
#contact-form textarea {
    background: rgba(244, 244, 244, 0.05);
    border: 1px solid var(--secondary-light);
    border-radius: 8px;
    padding: 15px;
    color: var(--text);
    font-size: 16px;
    transition: all var(--transition-normal);
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--acc);
    box-shadow: 0 0 10px var(--accent-medium);
    background: rgba(244, 244, 244, 0.1);
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: var(--text-semi);
}

#contact-form button {
    background: linear-gradient(135deg, var(--sec), var(--acc));
    border: none;
    border-radius: 8px;
    padding: 15px;
    color: var(--bg);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 10px;
    min-width: 150px;
}

#contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-medium);
    background: linear-gradient(135deg, var(--acc), var(--text));
}

#contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#scroll-arrow {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border: 2px solid var(--acc);
    border-radius: 50%;
    cursor: pointer;
    color: var(--acc);
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

#scroll-arrow:hover {
    background: var(--accent-medium);
    transform: translateX(-50%) scale(var(--scale-focus));
}

/* Mobile viewport fix for orientation changes */
@media screen and (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
    }
    
    #hero-bg, #hero-canvas {
        width: 100vw !important;
        height: 100vh !important;
        min-width: 100vw;
        max-width: 100vw;
    }
}

/* Accessibility Enhancements */

/* Focus States */
*:focus {
    outline: 2px solid var(--acc);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --bg: #000000;
        --text: #ffffff;
        --acc: #ffff00;
        --sec: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Skip Navigation */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--acc);
    color: var(--bg);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-nav:focus {
    top: 6px;
}

/* Screen Reader Only */
.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;
}

/* Pattern Indicators for Color-Blind Users */
.pattern-dots::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, currentColor 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.3;
    pointer-events: none;
}

.pattern-stripes::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, currentColor 2px, currentColor 4px);
    opacity: 0.2;
    pointer-events: none;
}




/* Contact Form Button States */
#contact-form button.error {
    background: linear-gradient(135deg, var(--error), var(--error-dark));
    animation: shake 0.3s ease;
}

#contact-form button.success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mobile adjustments for button states */
@media (max-width: 480px) {
    #contact-form button {
        font-size: 14px !important;
        padding: 12px !important;
        min-width: 120px;
    }
    
    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-3px); }
        75% { transform: translateX(3px); }
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #contact-form button {
        font-size: 15px;
        padding: 13px;
    }
}
