/* 
========================================
   Aahil Hassan Mir - Portfolio CSS
   Premium Redesigned Theme
========================================
*/

:root {
    /* Color Palette */
    --bg-color: #0d1117; /* Deep Space Dark */
    --bg-secondary: #161b22;
    --text-color: #f0f6fc;
    --text-muted: #8b949e;
    
    /* Accents */
    --accent-color: #00bcd4; /* Cyan */
    --accent-glow: rgba(0, 188, 212, 0.4);
    --secondary-accent: #0077b5; /* LinkedIn Blue */
    --gradient-primary: linear-gradient(135deg, var(--accent-color), #bc13fe);
    --gradient-subtle: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    
    /* Glassmorphism */
    --glass-bg: rgba(22, 27, 34, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(16px);
    
    /* Shadows */
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 45px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-slow: 0.8s ease-out;
}

/* =========================================
   Globals & Reset
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color); 
}
::-webkit-scrollbar-thumb {
    background: #30363d; 
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted); 
}

/* =========================================
   Typography
========================================= */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.3;
    color: var(--text-color);
}

.gradient-text {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: #fff;
}

/* Base Utility Classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* =========================================
   Layout & Glassmorphism
========================================= */
.container {
    padding-top: 120px;
    padding-bottom: 60px;
    max-width: 1000px;
    margin: auto;
    position: relative;
    z-index: 10;
    padding-left: 24px;
    padding-right: 24px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    z-index: 1;
}

/* =========================================
   Navigation Menu
========================================= */
.menu {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    transition: var(--transition-smooth);
    z-index: 1000;
    width: max-content;
    max-width: 90vw;
}

.menu.shrink {
    padding: 8px 16px;
    background: rgba(13, 17, 23, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 25px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.menu a i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.menu a:hover, .menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.menu a:hover i, .menu a.active i {
    opacity: 1;
}

.menu .highlight-link {
    background: rgba(0, 188, 212, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 188, 212, 0.2);
}

.menu .highlight-link:hover {
    background: rgba(0, 188, 212, 0.2);
    border-color: var(--accent-color);
}

.menu .social-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

/* =========================================
   Hero / Header
========================================= */
.profile-container {
    margin-bottom: 60px;
    padding: 40px;
}

.profile-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.profile-text {
    flex: 1;
    max-width: 600px;
}

.greeting {
    margin-bottom: 15px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.profile-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

.profile-text .subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.profile-text .tagline {
    font-size: 1.15rem;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Profile Image */
.profile-image-wrapper {
    flex-shrink: 0;
}

.profile-img-glow {
    position: relative;
    border-radius: 50%;
    padding: 8px;
    background: var(--gradient-subtle);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.profile-img-glow::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.5;
    animation: pulse 4s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.4; filter: blur(15px); }
    100% { transform: scale(1.05); opacity: 0.7; filter: blur(25px); }
}

.profile-img {
    border-radius: 50%;
    width: 220px;
    height: 220px;
    object-fit: cover;
    border: 4px solid var(--bg-color);
    background: var(--bg-color);
    display: block;
}

/* =========================================
   Buttons
========================================= */
.styled-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 30px;
    transition: var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
}

.styled-button.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(188, 19, 254, 0.3);
}

.styled-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(188, 19, 254, 0.5);
    color: white;
}

.styled-button.outline {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    backdrop-filter: blur(10px);
}

.styled-button.outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
    transform: translateY(-3px);
    color: white;
}

/* =========================================
   Sections & Layouts
========================================= */
.section {
    padding: 50px;
    margin-bottom: 40px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.section:hover {
    /* transform: translateY(-5px); */ /* Removed jitter to feel more solid */
    box-shadow: var(--shadow-lg);
    border-color: var(--glass-highlight);
}

.section-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.section-header.center {
    text-align: center;
    border-bottom: none;
    margin-bottom: 40px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    margin: 0;
}

.section-header h2 i {
    color: var(--accent-color);
}

.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.fill-height {
    height: 100%;
    margin-bottom: 0;
}

/* =========================================
   Skills Section
========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.skill-category h3 i {
    color: var(--text-muted);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    cursor: default;
    display: inline-block;
}

.skill:hover {
    background: rgba(0, 188, 212, 0.1);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.2);
}

/* =========================================
   Experience & Education Timeline
========================================= */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
    z-index: 2;
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.company {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 8px;
}

.timeline-content .date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 12px;
    font-weight: 600;
    background: rgba(0, 188, 212, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

/* =========================================
   Contact Section
========================================= */
.contact-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-highlight);
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    margin-bottom: 10px;
}

.contact-card:hover .contact-icon {
    color: var(--accent-color);
    transform: scale(1.1);
}

.contact-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

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

/* =========================================
   Footer & Utils
========================================= */
.footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.footer p {
    font-size: 0.9rem;
    margin: 0;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

/* =========================================
   Scroll Animations
========================================= */
.scroll-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    will-change: opacity, transform;
}

.scroll-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive Design
========================================= */
@media (max-width: 900px) {
    .profile-layout {
        flex-direction: column-reverse;
        text-align: center;
        gap: 30px;
    }
    
    .profile-text {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    
    .profile-img {
        width: 180px;
        height: 180px;
    }
    
    .two-col-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding-top: 100px;
    }
    
    .menu {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 12px 16px;
        width: calc(100% - 32px);
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .menu::-webkit-scrollbar { display: none; }
    
    .menu a {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    
    .profile-text h1 { font-size: 2.5rem; }
    
    .section { padding: 30px 25px; }
    
    .contact-links-grid {
        grid-template-columns: 1fr;
    }
}
