:root {
    --bg-color: #07090F;
    --bg-alt: #0D111A;
    --text-main: #E2E8F0;
    --text-light: #94A3B8;
    --accent-color: #00F0FF;
    --accent-secondary: #7000FF;
    --gradient-primary: linear-gradient(135deg, #00F0FF 0%, #7000FF 100%);
    --card-bg: rgba(13, 17, 26, 0.6);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-hover-border: rgba(0, 240, 255, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
}

body {
    overflow-x: hidden;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Outfit', sans-serif;
}

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

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
}

.bg-alt {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Glassmorphism utility */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    border-color: var(--card-hover-border);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    gap: 0.5rem;
}

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

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.4);
}

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

.secondary-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(7, 9, 15, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

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

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

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

.menu-btn {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    margin: 6px 0;
    transition: 0.4s;
}

/* ===== Cinematic Video Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    padding: 6rem 2rem 2rem;
    z-index: 2;
}

/* Layer 1: Ambient blurred background video */
.hero-bg-video-wrapper {
    position: absolute;
    inset: -20px;
    z-index: 0;
    overflow: hidden;
}

.hero-bg-video {
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    object-fit: cover;
    filter: blur(20px) saturate(1.2);
    opacity: 0;
    transform: scale(1.15);
    transition: opacity 1.2s ease;
    will-change: opacity;
}

.hero.is-loaded .hero-bg-video {
    opacity: 0.35;
}

/* Layer 2: Cinematic gradient overlays */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(7,9,15,0.85) 0%,
            rgba(7,9,15,0.2) 35%,
            rgba(7,9,15,0.2) 65%,
            rgba(7,9,15,0.9) 100%);
    transition: opacity 0.6s ease;
}

.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(7,9,15,0.6) 100%);
}

/* Layer 3: Foreground video with glassmorphism frame */
.hero-video-container {
    position: relative;
    z-index: 3;
    width: 52%;
    max-width: 680px;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    will-change: opacity, transform;
}

.hero.is-loaded .hero-video-container {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.hero-video-glow {
    position: absolute;
    inset: -30px;
    border-radius: 32px;
    background: radial-gradient(ellipse at center,
        rgba(0,240,255,0.07) 0%,
        rgba(112,0,255,0.04) 40%,
        transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(25px);
    animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-video-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.05),
        0 0 60px rgba(0,240,255,0.04);
    animation: heroFloat 6s ease-in-out infinite;
}

.hero-fg-video {
    display: block;
    width: 100%;
    border-radius: 20px;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Layer 4: Hero Content */
.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.hero-headline {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #fff 0%, #E2E8F0 50%, rgba(0,240,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subheadline {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto 2rem;
}

/* CTA Group */
.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    position: relative;
    z-index: 6;
}

.social-links a {
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    border-color: rgba(0,240,255,0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,240,255,0.15);
}

/* Hero entrance animation */
.hero-animate {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: var(--anim-delay, 0s);
}

.hero.is-loaded .hero-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 2.5rem;
    right: 2.5rem;
    display: flex;
    gap: 0.6rem;
    z-index: 10;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease 1.5s, transform 0.5s ease 1.5s;
}

.hero.is-loaded .video-controls {
    opacity: 1;
    transform: translateY(0);
}

.video-control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    outline: none;
}

.video-control-btn:hover,
.video-control-btn:focus-visible {
    background: rgba(255,255,255,0.12);
    border-color: rgba(0,240,255,0.35);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(0,240,255,0.12);
}

.video-control-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Tap for Sound Badge */
.tap-sound-badge {
    position: absolute;
    bottom: 5.5rem;
    right: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 30px;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    z-index: 10;
    animation: tapPulse 2.5s ease-in-out infinite;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
}

.hero.is-loaded .tap-sound-badge {
    opacity: 1;
    transition-delay: 1.8s;
}

.tap-sound-badge.hidden {
    opacity: 0 !important;
    transform: scale(0.92);
    pointer-events: none;
}

@keyframes tapPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,240,255,0.25); }
    50% { box-shadow: 0 0 0 6px rgba(0,240,255,0); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* ===== Hero Responsive ===== */
@media (max-width: 992px) {
    .hero-video-container {
        width: 70%;
    }
    .hero-headline {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 5rem 1.5rem 2rem;
    }
    .hero-video-container {
        width: 88%;
        margin-bottom: 2rem;
    }
    .hero-headline {
        font-size: 1.7rem;
    }
    .hero-subheadline {
        font-size: 0.95rem;
    }
    .hero-label {
        font-size: 0.75rem;
    }
    .cta-group {
        flex-direction: column;
        align-items: center;
    }
    .video-controls {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    .tap-sound-badge {
        bottom: 4.5rem;
        right: 1.5rem;
    }
    .hero-video-glow {
        display: none;
    }
    .hero-bg-video {
        filter: blur(15px) saturate(1.1);
    }
}

@media (max-width: 480px) {
    .hero-video-container {
        width: 95%;
    }
    .hero-headline {
        font-size: 1.45rem;
    }
    .hero-video-frame {
        border-radius: 14px;
    }
    .hero-fg-video {
        border-radius: 14px;
    }
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.education-timeline {
    margin-top: 3rem;
    border-top: 1px solid var(--card-border);
    padding-top: 2rem;
}

.education-timeline h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    border-left: 2px solid var(--card-border);
}

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

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.timeline-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.timeline-item p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Experience */
.experience-card {
    max-width: 800px;
    margin: 0 auto;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.exp-title h3 {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.exp-title h4 {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 500;
}

.exp-date {
    background: rgba(112, 0, 255, 0.15);
    color: var(--accent-secondary);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(112, 0, 255, 0.3);
}

.exp-list {
    padding-left: 1.2rem;
}

.exp-list li {
    color: var(--text-light);
    margin-bottom: 0.8rem;
    line-height: 1.6;
    position: relative;
    list-style-type: disc;
}

.exp-list li::marker {
    color: var(--accent-color);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-date {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.5rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.project-details {
    padding-left: 1.2rem;
    margin-top: auto;
    margin-bottom: 1rem;
}

.project-details li {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.project-details li::marker {
    color: var(--accent-secondary);
}

.project-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    color: var(--accent-color);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    align-self: flex-start;
    padding-top: 1rem;
}

.project-link:hover {
    color: #fff;
}

.project-link svg {
    transition: var(--transition);
}

.project-link:hover svg {
    transform: translate(2px, -2px);
}

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

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h3::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-light);
    transition: var(--transition);
    cursor: default;
}

.skill-tags span:hover {
    border-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.15);
}

/* Certifications */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cert-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--text-light);
    transition: var(--transition);
}

.cert-item:hover {
    border-color: var(--accent-secondary);
    background: rgba(112, 0, 255, 0.05);
    color: #fff;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-text h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.info-text p, .info-text a {
    color: var(--text-light);
    font-size: 0.95rem;
}

.info-text a:hover {
    color: var(--accent-color);
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input, .form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.submit-btn {
    width: 100%;
    margin-top: 0.5rem;
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.form-status.success {
    display: block;
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.form-status.error {
    display: block;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Footer */
footer {
    background: var(--bg-alt);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
}

.footer-content .logo {
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Particles Canvas */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 250px;
        background: rgba(7, 9, 15, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
        border-left: 1px solid var(--card-border);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .menu-btn {
        display: block;
    }
    
    .menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .exp-header {
        flex-direction: column;
    }
}
