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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

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

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

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav-menu a:hover { color: var(--text-primary); }
.nav-menu a:hover::after { width: 100%; }

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px 60px;
}

.hero-bg-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.05;
    animation: float 20s infinite;
}

.particle:nth-child(1) { width: 400px; height: 400px; top: -100px; left: -100px; animation-delay: 0s; }
.particle:nth-child(2) { width: 300px; height: 300px; top: 50%; right: -80px; animation-delay: -5s; background: var(--accent); }
.particle:nth-child(3) { width: 500px; height: 500px; bottom: -150px; left: 30%; animation-delay: -10s; }
.particle:nth-child(4) { width: 200px; height: 200px; top: 20%; left: 60%; animation-delay: -15s; background: var(--accent); }
.particle:nth-child(5) { width: 350px; height: 350px; bottom: 10%; right: 20%; animation-delay: -8s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary-light);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(12px); }
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--primary-light);
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.info-card:hover {
    background: var(--bg-card-hover);
    transform: translateX(8px);
}

.info-icon {
    font-size: 1.8rem;
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
}

.info-card h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
    padding-left: 40px;
}

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

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

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--primary);
    z-index: 1;
}

.timeline-dot.current {
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
}

.timeline-content {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.timeline-content:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

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

.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-current {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border: 1px solid var(--accent);
}

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

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 16px;
}

.timeline-content ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-content li {
    position: relative;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.timeline-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* ===== Skills ===== */
.skills { background: linear-gradient(180deg, var(--bg-dark), #0c1524); }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.skill-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 14px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-light);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s;
}

.tag:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--primary);
}

/* ===== Education ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.edu-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.edu-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.edu-card.main-edu {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(6,182,212,0.08));
}

.edu-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.edu-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.edu-card h4 {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 12px;
}

.edu-year {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* ===== Certifications ===== */
.certifications {
    background: linear-gradient(180deg, #0c1524, var(--bg-dark));
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.cert-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.cert-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.cert-card.highlight {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(37,99,235,0.08));
}

.cert-year {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.cert-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

.cert-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Contact ===== */
.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-top: -40px;
    margin-bottom: 48px;
    font-size: 1.1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
    display: block;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.contact-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.contact-card p {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.timeline-item.reveal:nth-child(even) {
    transform: translateY(30px);
}

.skill-card.reveal:nth-child(1) { transition-delay: 0s; }
.skill-card.reveal:nth-child(2) { transition-delay: 0.05s; }
.skill-card.reveal:nth-child(3) { transition-delay: 0.1s; }
.skill-card.reveal:nth-child(4) { transition-delay: 0.15s; }
.skill-card.reveal:nth-child(5) { transition-delay: 0.2s; }
.skill-card.reveal:nth-child(6) { transition-delay: 0.25s; }
.skill-card.reveal:nth-child(7) { transition-delay: 0.3s; }
.skill-card.reveal:nth-child(8) { transition-delay: 0.35s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 40px;
        gap: 24px;
        transition: right 0.3s;
    }

    .nav-menu.active { right: 0; }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .section { padding: 60px 0; }
    .section-title { font-size: 1.8rem; margin-bottom: 40px; }

    .timeline { padding-left: 30px; }
    .timeline-dot { left: -30px; width: 14px; height: 14px; }
    .timeline::before { left: 6px; }

    .timeline-content { padding: 20px; }
}

@media (max-width: 480px) {
    .contact-grid { grid-template-columns: 1fr; }
    .education-grid { grid-template-columns: 1fr; }
    .cert-grid { grid-template-columns: 1fr; }
}
