/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    /* Colors */
    --bg-dark: #0f0f13;
    --bg-darker: #08080a;
    --accent: #8a2be2;
    --accent-hover: #9b4dfa;
    --accent-glow: rgba(138, 43, 226, 0.4);
    --accent-glow-strong: rgba(138, 43, 226, 0.6);
    
    --text-main: #f5f5f7;
    --text-muted: #a1a1aa;
    
    --glass-bg: rgba(20, 20, 25, 0.6);
    --glass-border: rgba(138, 43, 226, 0.15);
    
    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background grid/pattern (Tech feel) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

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

strong {
    color: var(--text-main);
    font-weight: 600;
}

.code-span {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9em;
    background: rgba(138, 43, 226, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.accent {
    color: var(--accent);
}

/* ==========================================================================
   Utility Classes & Components
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

.section-spacing {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.section-line {
    height: 3px;
    width: 60px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 3px;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    outline: none;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow-strong);
}

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

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(138, 43, 226, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: var(--transition-base);
}

.glass-panel:hover {
    border-color: rgba(138, 43, 226, 0.3);
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.1);
}

/* Scroll Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all var(--transition-slow);
}

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

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition-base);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 15, 19, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    font-family: var(--font-heading);
    position: relative;
    display: flex;
    align-items: center;
}

.blink {
    animation: blinker 1s linear infinite;
    color: var(--accent);
}

@keyframes blinker {
    50% { opacity: 0; }
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-base);
    box-shadow: 0 0 8px var(--accent-glow);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-main);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(138,43,226,0.15) 0%, rgba(15,15,19,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 30px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent);
    position: relative;
    z-index: 2;
}

.profile-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: conic-gradient(from 0deg, transparent, var(--accent), transparent);
    border-radius: 50%;
    z-index: 1;
    animation: rotateGlow 4s linear infinite;
    filter: blur(10px);
}

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

.hero-name {
    font-size: 3.5rem;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.hero-title {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 25px;
    font-family: var(--font-mono);
}

.hero-summary {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 30px;
}

.about-bio {
    position: relative;
    font-size: 1.05rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bg-icon {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 120px;
    opacity: 0.03;
    z-index: 0;
}

.about-bio p {
    position: relative;
    z-index: 1;
}

.about-bio strong {
    color: var(--accent);
}

.panel-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.icon-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.icon-list i {
    color: var(--accent);
    font-size: 1.2rem;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(138, 43, 226, 0.08);
    color: var(--text-main);
    font-size: 0.85rem;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.tag i {
    color: var(--accent);
}

.tag:hover {
    border-color: var(--accent);
    background: rgba(138, 43, 226, 0.15);
}

.mt-gap {
    margin-top: 25px;
}

/* ==========================================================================
   Experience Timeline
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

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

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--accent);
    z-index: 2;
    transition: var(--transition-base);
}

.timeline-dot.glow {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow-strong);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow-strong);
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.timeline-role {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.timeline-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Achievements
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.achievement-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(138, 43, 226, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.2rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

/* ==========================================================================
   Education
   ========================================================================== */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.edu-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edu-item h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.edu-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.bullet-list {
    margin-top: 8px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.bullet-list li {
    list-style-type: disc;
    margin-bottom: 4px;
}

.mt-gap-small {
    margin-top: 15px;
}

/* ==========================================================================
   Hobbies 
   ========================================================================== */
.hobbies-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.8;
}

.video-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.video-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin: 0 auto 15px;
    max-width: 300px; /* Ideal constraint for vertical videos */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.custom-video {
    width: 100%;
    aspect-ratio: 9/16;
    max-height: 550px;
    object-fit: cover;
    display: block;
    background: #000;
}

.video-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.2);
    border-radius: var(--border-radius-lg);
    pointer-events: none;
    z-index: -1;
}

.video-caption {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 40px;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
    font-weight: 500;
}

.footer-link:hover {
    color: var(--accent);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
    .about-grid, .edu-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-name {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: rgba(15, 15, 19, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition-base);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline-dot {
        left: 4px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
