/* --- PREMIUM GLOBAL VARIABLES --- */
:root {
    --bg-base: #050505;
    --glass-bg: rgba(20, 20, 20, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-red: #ff2e54;
    --accent-glow: rgba(255, 46, 84, 0.4);
    --gradient-red: linear-gradient(135deg, #ff2e54 0%, #ff6b81 100%);
    
    --text-main: #f0f0f0;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- UNIVERSAL RESET & SIZING FIX --- */
*, *::before, *::after {
    box-sizing: border-box; /* Crucial to stop horizontal scrolling */
}

/* --- BASE STYLES --- */
html {
    font-size: 16px; /* Desktop Base Scale */
}

body {
    font-family: var(--font-sans);
    margin: 0;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

/* Text Wrapping to Prevent Cut-offs */
p, h1, h2, h3, h4, h5, h6, li, span {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Ambient Background Glow */
.ambient-glow {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vh;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

/* --- GLASSMORPHISM UTILITIES --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.text-gradient {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

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

/* --- HOMEPAGE LAYOUT --- */
body.home-layout {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 85vh;
    min-height: 600px;
    border-radius: 24px;
    overflow: hidden;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- SIDEBAR --- */
.sidebar {
    flex: 0 0 320px;
    background: rgba(10, 10, 10, 0.4);
    border-right: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.profile-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 2rem;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 2px solid transparent;
}

.profile-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: var(--gradient-red);
    z-index: 1;
    animation: spin 4s linear infinite;
    opacity: 0.7;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.sidebar h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar .subtitle {
    color: var(--accent-red);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.connect-group { margin-top: 2.5rem; }

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-red);
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

/* --- CONTENT AREA --- */
.content {
    flex: 1;
    padding: 4rem;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.content::-webkit-scrollbar { width: 6px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { 
    background: rgba(255,255,255,0.1); 
    border-radius: 10px; 
}
.content::-webkit-scrollbar-thumb:hover { background: var(--accent-red); }

.content h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

.lead-text {
    font-size: 1.15rem;
    color: #fff;
    font-weight: 300;
}

.content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.content strong {
    color: #fff;
    font-weight: 600;
}

/* --- PREMIUM SKILLS GRID --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 760px) {
    .skills-grid { grid-template-columns: minmax(0, 1fr); }
}

.skill-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 46, 84, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 46, 84, 0.05);
    background: rgba(255, 255, 255, 0.04);
}

.card-icon {
    font-size: 1.5rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    color: #fff;
}

.skill-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-card ul li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.skill-card ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent-red);
    font-weight: bold;
}

/* --- TEXT BLOCKS & LISTS --- */
.premium-block {
    background: rgba(255, 255, 255, 0.01);
    border-left: 2px solid var(--accent-red);
    padding: 1rem 0 1rem 1.5rem;
    margin-top: 1.5rem;
}

.subsection-title {
    font-size: 1.1rem;
    color: #fff;
    margin: 2rem 0 1rem 0;
}

.project-list {
    list-style: none;
    padding: 0;
}

.project-list li {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.project-list li strong {
    display: block;
    color: var(--accent-red);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* --- EDUCATION SECTION --- */
.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.edu-header h2 { border: none; padding: 0; margin: 0; }

.date-badge {
    background: rgba(255, 46, 84, 0.1);
    color: var(--accent-red);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 46, 84, 0.2);
}

.degree { font-size: 1.2rem; color: #fff; margin-bottom: 0.25rem; }
.focus { color: var(--accent-red); font-weight: 600; margin-bottom: 0.25rem; }
.location { font-size: 0.9rem; color: var(--text-muted); }

/* --- BUTTONS --- */
.button-container {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap; /* Allows buttons to stack safely */
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
    text-align: center;
    white-space: normal; /* Fixes button text overlap */
    max-width: 100%;
}

.btn-primary {
    background: var(--gradient-red);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 46, 84, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(255, 46, 84, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* --- FLOATING NAV DOCK --- */
.nav-dock {
    position: fixed;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    border-radius: 40px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 2rem;
    z-index: 9999;
}

.nav-dock a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px; 
}

.nav-dock a:hover {
    color: var(--accent-red);
    transform: scale(1.2);
}

/* --- RESPONSIVE DESIGN (THE NATIVE "ZOOM" FIX) --- */
@media (max-width: 1200px) {
    .container { flex-direction: column; height: auto; max-height: 90vh; }
    .sidebar { flex: none; border-right: none; border-bottom: 1px solid var(--glass-border); padding: 2rem; }
    .content { padding: 2rem; }
    .nav-dock {
        top: auto; bottom: 1.5rem; left: 50%;
        transform: translateX(-50%);
        flex-direction: row; padding: 1rem 2rem;
    }
}

@media (max-width: 768px) {
    /* THIS SHRINKS THE GLOBAL SCALE NATIVELY - ACTS LIKE A ZOOM OUT */
    html { font-size: 12px; } 

    body.home-layout { padding: 1rem; padding-bottom: 6rem; }
    
    /* --- NEW FIX: SMALLER TOP BAR ON MOBILE --- */
    .sidebar { 
        padding: 1.5rem 1rem; /* Reduces empty space around the edges */
    }
    .profile-wrapper {
        width: 110px; /* Shrinks the profile picture */
        height: 110px;
        margin-bottom: 1rem; /* Brings the name closer to the picture */
    }
    .sidebar h1 {
        font-size: 1.5rem; /* Scales down your name slightly */
    }
    .sidebar .subtitle {
        font-size: 0.85rem; /* Scales down the title slightly */
    }
    .connect-group { 
        margin-top: 1.5rem; /* Brings social links closer to the text */
    }
    .social-links {
        margin-top: 1rem;
    }
    /* ------------------------------------------ */

    .button-container { flex-direction: column; }
    .content { padding: 1.5rem; }
    
    .container.column-layout {
        padding: 2rem 1rem 6rem 1rem;
    }
}

@media (max-width: 480px) {
    html { font-size: 11px; } /* Shrinks slightly more for smaller phones */
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

body.fade-out { opacity: 0; transition: opacity 0.4s ease-out; }

/* --- UTILITY FOR SUBPAGES (Projects & Details) --- */
.container.column-layout {
    display: flex; 
    flex-direction: column;
    align-items: stretch;
    width: 100%; /* Changed from 90% to 100% to stop mobile squishing */
    max-width: 1400px;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 4rem;
    margin: 4rem auto;
    min-height: 100vh;
}

.container.column-layout header,
.container.column-layout main {
    flex: none;
    width: 100%;
}

.column-layout .btn {
    flex: none;
    display: inline-flex;
    width: max-content;
    max-width: 100%;
}

/* Bulletproof Mobile Subpages */
@media (max-width: 1000px) {
    .container.column-layout {
        width: 100%;
        margin: 0; 
        padding: 3rem 1.5rem 6rem 1.5rem; 
        border-radius: 0; 
        border: none;
    }
}
/* --- DUAL-TRACK HIRING BLOCK --- */
.subtitle-sub {
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 4px 0 0 0;
    font-weight: 600;
}

.hire-block {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 46, 84, 0.22);
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 46, 84, 0.10) 0%, transparent 55%),
        rgba(20, 20, 20, 0.55);
}

.hire-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.hire-head h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
    flex-shrink: 0;
    animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18); }
    50%      { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0.05); }
}

.hire-tracks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.track {
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(12, 12, 12, 0.5);
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.track:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 46, 84, 0.35);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
}

.track h4 {
    margin: 0 0 0.85rem 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.track h4 i { color: var(--accent-red); }

.track p {
    margin: 0 0 1.4rem 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    flex-grow: 1;
}

.track-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.track-links .btn {
    padding: 0.7rem 1.3rem;
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    white-space: nowrap;
    flex: 0 0 auto;
    width: 100%;
}

.track-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.track-link i { font-size: 0.75rem; transition: transform 0.3s ease; }
.track-link:hover { color: var(--accent-red); }
.track-link:hover i { transform: translateX(4px); }

.track-links .btn i { margin-left: 7px; }

.hire-contact {
    margin: 1.5rem 0 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hire-contact a {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 600;
}

.hire-contact a:hover { text-decoration: underline; }

.hire-sep { padding: 0 8px; opacity: 0.5; }

@media (max-width: 600px) {
    .hire-block { padding: 1.4rem; }
    .track-links .btn { width: 100%; text-align: center; }
    .hire-contact .hire-sep { display: block; height: 0; overflow: hidden; padding: 0; }
}

.hire-avail {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.3);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .hire-avail { margin: 10px 0 0 0; }
}
