:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --accent-1: #4f46e5; /* Indigo */
    --accent-2: #ec4899; /* Pink */
    --accent-3: #06b6d4; /* Cyan */
}

/* Reset and ensure no horizontal scrolling ever happens */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* --- Ambient Background Lights --- */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: #000;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 { width: 400px; height: 400px; background: var(--accent-1); top: -10%; left: -10%; }
.orb-2 { width: 500px; height: 500px; background: var(--accent-2); bottom: -20%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: var(--accent-3); top: 40%; left: 40%; animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* --- True Glassmorphism --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 0 var(--glass-highlight), inset 1px 0 0 0 var(--glass-highlight);
    border-radius: 32px;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* --- Navigation --- */
.glass-nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 100;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.05em; background: linear-gradient(to right, #fff, #a1a1aa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glass-nav ul { display: flex; gap: 2.5rem; list-style: none; }
.glass-nav a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.3s ease; position: relative; }
.glass-nav a:hover, .glass-nav a.active { color: var(--text-primary); }

.glass-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--text-primary);
    border-radius: 50%;
}

/* --- Typography & Layout --- */
.container {
    max-width: 1100px;
    margin: 150px auto 100px;
    padding: 0 2rem;
    perspective: 1000px;
    flex: 1;
}

.badge { display: inline-block; padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); border-radius: 100px; margin-bottom: 2rem; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1rem; }
.gradient-text { background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 500; color: var(--text-secondary); margin-bottom: 2rem; }
p { font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; margin-bottom: 3rem; }

/* --- Premium Buttons --- */
.btn-group { display: flex; gap: 1rem; }
.btn { padding: 1rem 2rem; border-radius: 100px; font-weight: 600; text-decoration: none; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); display: inline-flex; align-items: center; justify-content: center; }
.btn-primary { background: var(--text-primary); color: var(--bg-color); }
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
.btn-secondary { background: var(--glass-bg); color: var(--text-primary); border: 1px solid var(--glass-border); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }

/* --- Entrance Animations --- */
.fade-up { opacity: 0; transform: translateY(40px); animation: fadeUpAnim 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeUpAnim { to { opacity: 1; transform: translateY(0); } }

/* --- Bento Box & Card Layouts --- */
.page-header { margin-bottom: 3rem; }
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 0 var(--glass-highlight), inset 1px 0 0 0 var(--glass-highlight);
    border-radius: 24px;
    padding: 2.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.glass-card:hover { border-color: rgba(255, 255, 255, 0.2); }
.glass-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-primary); }
.glass-card p { font-size: 1rem; margin-bottom: 0; flex-grow: 1; }

/* Timeline specific */
.timeline { border-left: 2px solid var(--glass-border); padding-left: 2rem; margin-top: 1.5rem; }
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-item::before { content: ''; position: absolute; left: -2.45rem; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-1); box-shadow: 0 0 10px var(--accent-1); }
.date-badge { color: var(--accent-3); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.5rem; display: block; }

/* --- Project Card Links --- */
.card-actions { margin-top: 1.5rem; display: flex; gap: 1rem; }
.btn-small { padding: 0.5rem 1.2rem; font-size: 0.85rem; border-radius: 100px; text-decoration: none; font-weight: 500; transition: all 0.3s ease; background: rgba(255, 255, 255, 0.05); color: var(--text-primary); border: 1px solid var(--glass-border); display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-small:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.4); transform: translateY(-2px); }

/* --- Footer --- */
.glass-footer { text-align: center; padding: 2rem 0; margin-top: auto; border-top: 1px solid var(--glass-border); background: rgba(0, 0, 0, 0.2); backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%); color: var(--text-secondary); font-size: 0.9rem; width: 100%; }


/* ========================================================
   📱 BULLETPROOF MOBILE & TABLET RESPONSIVENESS
   ======================================================== */

/* TABLETS (iPads, smaller laptops) */
@media (max-width: 992px) {
    .container { padding: 0 1.5rem; }
    .glass-panel { padding: 3rem; }
}

/* MOBILE PHONES */
@media (max-width: 768px) {
    /* Main Layout */
    .container { margin-top: 120px; padding: 0 1rem; }
    
    /* Nav Bar Fixes */
    .glass-nav { 
        width: 92%; 
        padding: 1rem; 
        border-radius: 20px; 
    }
    .nav-container { 
        flex-direction: column; /* Stack Logo and Links */
        gap: 0.8rem; 
    }
    .glass-nav ul { 
        gap: 1.2rem; 
        flex-wrap: wrap; /* Allows links to flow instead of squishing */
        justify-content: center; 
    }
    .glass-nav a { font-size: 0.85rem; }

    /* Cards and Panels */
    .glass-panel, .glass-card { 
        padding: 1.8rem; 
        border-radius: 20px; 
    }
    .bento-grid { 
        grid-template-columns: 1fr; /* Forces 1 straight column on mobile */
    }

    /* Buttons */
    .btn-group { 
        flex-direction: column; /* Stack buttons vertically */
        width: 100%; 
    }
    .btn { width: 100%; } /* Make buttons full width */

    /* Typography Tweaks */
    p { font-size: 1rem; margin-bottom: 2rem; }
    .glass-card h3 { font-size: 1.3rem; }

    /* Timeline Mobile Fix */
    .timeline { padding-left: 1.2rem; }
    .timeline-item::before { left: -1.6rem; width: 10px; height: 10px; }

    /* Contact Page List Wrap Fix */
    .glass-panel ul li {
        display: flex;
        flex-direction: column; /* Stacks label and info */
        margin-bottom: 1rem;
        line-height: 1.6;
        word-break: break-word; /* Prevents long emails from breaking layout */
    }
    .glass-panel ul li strong { 
        width: auto !important; /* Overrides inline width */
        margin-bottom: 0.2rem;
    }
}
