/* =========================================
   Khadee - Personal Website Styles
   ========================================= */

:root {
    /* Color Palette */
    --bg: #0B0F0E;
    --surface: #0E2F23;
    --text: #F5F7F6;
    --muted: #A7B8B2;
    --accent: #00E676; /* Mint Neon */
    --accent-glow: rgba(0, 230, 118, 0.4);
    --accent2: #E53935; /* Red Accent */
    --border: rgba(245, 247, 246, 0.12);
    
    /* Spacing & Layout */
    --max-width: 1120px;
    --nav-height: 80px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    /* Typography */
    --font-main: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* =========================================
   Reset & Base Styles
   ========================================= */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtle radial glow background */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(14, 47, 35, 0.4) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(229, 57, 53, 0.08) 0%, transparent 25%);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* =========================================
   Typography & Utilities
   ========================================= */

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    color: var(--muted);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, var(--text), var(--muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-subtitle {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 400;
    display: block;
}

/* =========================================
   Components: Buttons & Cards
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--accent-glow);
    background-color: #33eb91;
}

.card {
    background: rgba(14, 47, 35, 0.4);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 230, 118, 0.3);
    transform: translateY(-4px);
}

/* =========================================
   Navigation
   ========================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 15, 14, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    transition: transform 0.3s ease;
}

.brand-avatar:hover {
    transform: rotate(10deg) scale(1.1);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    z-index: 1002;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.hamburger .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

/* Hamburger Active State (X) */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--accent);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

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

.nav-btn {
    display: inline-flex;
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-btn {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        max-width: 300px;
        background: rgba(14, 47, 35, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out);
        z-index: 1001;
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--text);
    }
    
    .nav-links a:hover {
        color: var(--accent);
    }
}

/* =========================================
   Hero Section
   ========================================= */

.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.typing-text {
    font-family: monospace;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: inline-block;
    border-right: 2px solid var(--accent);
    white-space: nowrap;
    overflow: hidden;
    animation: blink 0.75s step-end infinite;
    /* Typewriter animation applied via JS class for trigger */
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent) }
}

.bio-line {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.btn-hero {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 14px 32px;
    font-size: 1rem;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
}

.btn-hero:hover {
    background-color: var(--accent);
    color: #000;
    box-shadow: 0 0 30px var(--accent-glow);
}

/* =========================================
   Sections
   ========================================= */

section {
    padding: 6rem 0;
}

/* Highlights */
.highlight-card {
    padding: 1rem;
    overflow: hidden;
}

.highlight-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    transition: transform 0.5s ease;
}

.highlight-card:hover .highlight-img {
    transform: scale(1.02);
}

/* Links Section */
.link-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 1.25rem 2rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text);
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
    transform: translateX(8px);
}

.link-handle {
    color: var(--muted);
    font-family: monospace;
}

.arrow {
    color: var(--accent);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.link-card:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Contact Section */
.contact-card {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.mt-4 {
    margin-top: 2rem;
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    text-align: center;
    color: var(--muted);
}

footer a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

footer a:hover {
    color: var(--text);
}

/* =========================================
   Animations
   ========================================= */

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

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .link-card {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .arrow {
        display: none;
    }
}
