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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    background: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============ VARIABLES ============ */
:root {
    --navy: #0f172a;
    --slate: #1e293b;
    --accent: #4f46e5;
    --accent-light: #818cf8;
    --accent-glow: rgba(79, 70, 229, 0.2);
    --accent-bg: #eef2ff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    --card-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
    --hover-shadow: 0 8px 32px rgba(79, 70, 229, 0.15);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
    padding: 0.75rem 0;
}

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

.nav-logo {
    font-size: 1.4rem;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-light), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-link {
    color: rgba(203, 213, 225, 0.9);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav.scrolled .nav-link {
    color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
    background: var(--accent-bg);
}

.nav.scrolled .nav-link:hover,
.nav.scrolled .nav-link.active {
    color: var(--accent);
}

.nav-cta {
    background: var(--accent) !important;
    color: white !important;
    margin-left: 0.5rem;
}

.nav-cta:hover {
    background: #4338ca !important;
    color: white !important;
}

.nav.scrolled .nav-cta {
    color: white !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: rgba(203, 213, 225, 0.9);
    border-radius: 2px;
    transition: var(--transition);
}

.nav.scrolled .nav-toggle span {
    background: var(--text);
}

/* ============ HERO ============ */
.hero {
    background: var(--navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.055) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.18), transparent 65%);
    pointer-events: none;
}

.hero-grid {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.3);
    color: var(--accent-light);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.2px;
}

.status-dot {
    font-size: 0.45rem;
    color: #22c55e;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.hero-name {
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    font-weight: 900;
    color: #f1f5f9;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 0.75rem;
}

.accent {
    background: linear-gradient(135deg, var(--accent-light), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 1.5rem;
    font-family: 'Fira Code', monospace;
    letter-spacing: 0.5px;
}

.hero-bio {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.85;
    margin-bottom: 2.25rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    border-color: rgba(129, 140, 248, 0.45);
    color: var(--accent-light);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--accent-light);
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.hero-socials {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.social-link:hover {
    border-color: var(--accent-light);
    color: var(--accent-light);
    background: rgba(79, 70, 229, 0.12);
    transform: translateY(-2px);
}

/* ===== HERO PHOTO ===== */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.photo-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 4px solid rgba(129, 140, 248, 0.45);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 60px rgba(79, 70, 229, 0.25);
}

.photo-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(129, 140, 248, 0.25);
    animation: spin-ring 28s linear infinite;
}

@keyframes spin-ring {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tech-badge {
    position: absolute;
    width: 44px;
    height: 44px;
    background: var(--slate);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    font-size: 1.2rem;
    z-index: 3;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    animation: float-badge 3s ease-in-out infinite;
}

.badge-1 { top: 10px; right: 15px; animation-delay: 0s; }
.badge-2 { bottom: 15px; right: 10px; animation-delay: 0.75s; }
.badge-3 { bottom: 15px; left: 10px; animation-delay: 1.5s; }
.badge-4 { top: 10px; left: 15px; animation-delay: 2.25s; }

@keyframes float-badge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hero-scroll a {
    color: #475569;
    font-size: 1.1rem;
    text-decoration: none;
    animation: bounce-down 2s ease-in-out infinite;
    display: block;
    transition: color var(--transition);
}

.hero-scroll a:hover {
    color: var(--accent-light);
}

@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
}

/* ============ SECTIONS ============ */
.section {
    padding: 6rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.contact-section {
    background: var(--navy);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    margin-bottom: 0.9rem;
}

.section-tag.light {
    background: rgba(79, 70, 229, 0.2);
    color: var(--accent-light);
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.section-title.light {
    color: #f1f5f9;
}

/* ============ ANIMATIONS ============ */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ TIMELINE ============ */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), rgba(79, 70, 229, 0.08));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

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

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 1.75rem;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--accent);
}

.section-alt .timeline-dot {
    border-color: var(--bg-alt);
}

.timeline-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.timeline-card:hover {
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

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

.job-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.company-name {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.company-tag {
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 0.35rem 0.8rem;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

.job-duties {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.job-duties li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.65;
}

.job-duties li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.58rem;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.7;
}

/* ============ SKILLS ============ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.skill-category {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.skill-category:hover {
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.skill-cat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.skill-cat-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.skill-cat-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
}

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

.skill-tag {
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1px;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: translateY(-1px);
}

.tag-blue   { background: #eff6ff; color: #2563eb; }
.tag-green  { background: #f0fdf4; color: #16a34a; }
.tag-orange { background: #fff7ed; color: #ea580c; }
.tag-purple { background: #faf5ff; color: #9333ea; }
.tag-slate  { background: #f8fafc; color: #475569; border: 1px solid var(--border); }

/* ============ EDUCATION ============ */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.25rem;
}

.edu-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.edu-card:hover {
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.edu-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.edu-info h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.edu-school {
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.edu-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.8rem;
}

.edu-year {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 0.2rem 0.75rem;
    border-radius: 100px;
    display: inline-block;
}

/* ============ CERTIFICATES ============ */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.cert-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.cert-card:hover {
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: var(--hover-shadow);
    transform: translateY(-4px);
}

.cert-img-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-alt);
}

.cert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cert-card:hover .cert-img {
    transform: scale(1.04);
}

.cert-info {
    padding: 1.25rem 1.5rem 1.5rem;
}

.cert-info h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.cert-issuer {
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cert-instructor {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ============ CONTACT ============ */
.contact-sub {
    color: #64748b;
    font-size: 1rem;
    max-width: 480px;
    margin: 0.9rem auto 0;
    line-height: 1.85;
}

.contact-cards {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 1.25rem 1.75rem;
    text-decoration: none;
    transition: var(--transition);
    min-width: 230px;
}

a.contact-card:hover {
    background: rgba(79, 70, 229, 0.15);
    border-color: rgba(129, 140, 248, 0.35);
    transform: translateY(-2px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: rgba(79, 70, 229, 0.18);
    color: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-label {
    font-size: 0.72rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.2rem;
}

.contact-value {
    font-size: 0.88rem;
    color: #cbd5e1;
    font-weight: 500;
}

.contact-socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.social-btn:hover {
    border-color: rgba(129, 140, 248, 0.5);
    color: var(--accent-light);
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #334155;
    font-size: 0.82rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding-top: 8rem;
        padding-bottom: 5rem;
    }

    .hero-visual {
        order: -1;
    }

    .photo-wrapper {
        width: 240px;
        height: 240px;
    }

    .profile-photo {
        width: 210px;
        height: 210px;
    }

    .hero-bio {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-socials {
        justify-content: center;
    }

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

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

@media (max-width: 640px) {
    .section {
        padding: 4rem 0;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-card {
        padding: 1.25rem;
    }

    .card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-cards {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-card {
        min-width: unset;
    }

    .nav-links {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        z-index: 1000;
        list-style: none;
        backdrop-filter: blur(12px);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links .nav-link {
        font-size: 1.2rem;
        padding: 0.75rem 2rem;
        color: #cbd5e1 !important;
        width: 100%;
        text-align: center;
    }

    .nav-links .nav-cta {
        margin-top: 0.5rem;
    }

    .nav-toggle {
        display: flex;
    }

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