/*
====================================
MAIN STYLESHEET
====================================
Purpose: Global styles, resets, and base styles
Author: Kamakhya Narayan Keshari
Last Updated: 2025
====================================
*/

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Body Styles */
body {
    font-family: 'Mono', monospace;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styles */
::selection {
    background-color: #000000;
    color: #ffffff;
}

/* Focus Styles for Accessibility */
button:focus,
a:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Utility Classes */
.tw-transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Reveal Animation Classes */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-hero-text {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.reveal-hero-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-hero-img {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.reveal-hero-img.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Header Styles */
.header-links {
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.header-links:hover {
    color: #666666;
}

.header-links::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #000000;
    transition: width 0.3s ease;
}

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

.header-links-hero {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-links-hero:hover {
    color: #f0f0f0;
}

.header-links-hero::after {
    background-color: #ffffff;
}

header.scrolled {
    background-color: rgba(9, 9, 11, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

header.scrolled .header-links-hero,
header.scrolled > a {
    color: #ffffff;
    text-shadow: none;
}

header.scrolled .header-links-hero::after {
    background-color: #ffffff;
}

header.scrolled #collapse-btn {
    color: #ffffff;
}

/* Mobile Menu Styles */
header > .collapsible-header {
    display: flex;
    gap: 1rem;
    width: 100%;
    background-color: inherit;
    place-content: center;
    overflow: hidden;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.animated-collapse {
    transition: width 0.3s ease, opacity 0.3s ease;
}

.opacity-100 {
    opacity: 1 !important;
}

@media not all and (min-width: 1024px) {
    header .collapsible-header {
        position: fixed;
        right: 0;
        flex-direction: column;
        opacity: 0;
        height: 100vh;
        min-height: 100vh;
        height: 100dvh;
        width: 0;
        justify-content: space-between;
        padding: 5%;
        place-items: end;
        background-color: #ffffff;
        color: #000000;
        overflow-y: auto;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
        z-index: 40;
    }

    .portfolio-site header .collapsible-header {
        background-color: #09090b;
        color: #ffffff;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
    }

    .portfolio-site header .header-links {
        color: #ffffff;
    }

    header .header-links {
        color: #000000;
    }
}

@media (max-width: 1024px) {
    .lg\:tw-hidden {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .max-md\:tw-flex-col {
        flex-direction: column !important;
    }
    
    .max-md\:tw-w-full {
        width: 100% !important;
    }
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
