/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-dark: #0a0f1d;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    
    --primary: #6366f1; /* Indigo */
    --secondary: #8b5cf6; /* Purple */
    --accent: #22d3ee; /* Cyan */
    --accent-gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 211, 238, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

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

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

section {
    padding: 8rem 0 4rem;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

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

/* Glassmorphism Card Base */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.15);
}

/* Navigation Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 15, 29, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    position: relative;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    display: block;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    height: 2.5rem; /* Reserve vertical space for typewriter */
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

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

/* About Section */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-box {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-graphic {
    position: relative;
    display: flex;
    justify-content: center;
}

.about-graphic::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent-gradient);
    filter: blur(80px);
    opacity: 0.25;
    z-index: 1;
}

.avatar-container {
    width: 320px;
    height: 320px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.avatar-fallback {
    font-size: 5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Experience Section (Timeline) */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-dark);
    border: 3px solid var(--accent);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition);
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.right::after {
    left: -8px;
}

.timeline-item:hover::after {
    transform: scale(1.3);
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.timeline-date {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-role {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-block;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.timeline-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 16px 16px 0 0;
    opacity: 0.7;
    transition: var(--transition);
}

.project-card:hover::before {
    opacity: 1;
}

.project-status {
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

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

.tech-tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.project-links {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}

.project-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

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

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

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

.skill-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-badge:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Certifications Section */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.cert-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cert-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cert-issuer {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cert-date {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.achievement-card {
    position: relative;
    overflow: hidden;
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.achievement-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.achievement-org {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent);
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

.contact-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.contact-value {
    font-size: 1.05rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-status.success {
    color: #4ade80;
    display: block;
}

.form-status.error {
    color: #f87171;
    display: block;
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: rgba(10, 15, 29, 0.5);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Scroll Trigger Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Hamburger menu interactive transition */
.menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    section {
        padding: 6rem 0 3rem;
    }
    
    .about-wrapper,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-graphic {
        order: -1;
    }
    
    .projects-grid,
    .skills-grid,
    .certs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 4.5rem;
        left: 0;
        width: 100%;
        height: calc(100vh - 4.5rem);
        background: rgba(10, 15, 29, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 55px;
        padding-right: 25px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item::after {
        left: 22px;
        right: auto;
    }
    
    .timeline-item.right::after {
        left: 22px;
    }
    
    .projects-grid,
    .skills-grid,
    .certs-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

/* ElevenLabs Conversational AI Widget Style */
elevenlabs-convai {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

