/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-primary: #f8f6f3;
    --text-secondary: #a8a4a0;
    --text-muted: #6b6764;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.35);
    --border: rgba(255, 255, 255, 0.08);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Available for Projects Button (Hero) ===== */
.btn-available {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: white !important;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: 999px;
    margin-bottom: 1rem;
    transition: var(--transition);
    box-shadow: 0 0 20px var(--accent-glow);
    opacity: 0;
    animation: fade-slide-in 0.8s ease-out 0.4s forwards;
}

.btn-available:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 25px var(--accent-glow);
}

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

html {
    scroll-behavior: smooth;
}

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

/* ===== Animated Background ===== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(167, 139, 250, 0.08), transparent);
    pointer-events: none;
    z-index: 0;
    animation: gradient-drift 15s ease-in-out infinite;
}

@keyframes gradient-drift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.02); }
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.nav.scrolled {
    padding: 0.75rem 3rem;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.nav-logo:hover {
    transform: scale(1.08);
    text-shadow: 0 0 20px var(--accent-glow);
}

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

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

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

.nav-links a:hover {
    color: var(--text-primary);
}

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

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

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

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 3rem 4rem;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: fade-slide-in 0.8s ease-out forwards;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fade-slide-in 0.8s ease-out 0.2s forwards;
}

.hero-title {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fade-slide-in 0.8s ease-out 0.35s forwards;
}

.hero-location {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fade-slide-in 0.8s ease-out 0.5s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-slide-in 0.8s ease-out 0.6s forwards;
}

@keyframes fade-slide-in {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    transform-origin: center;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 45px var(--accent-glow);
}

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

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

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

.btn-outline:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

.nav-cv {
    color: var(--accent) !important;
}

.nav-cv::after {
    display: none;
}

.contact-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 380px;
    max-height: 380px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.hero-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: 0 0 60px var(--accent-glow);
    position: relative;
    z-index: 1;
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: fade-bounce 2s ease-in-out infinite;
}

@keyframes fade-bounce {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    animation: arrow-bounce 1.5s ease-in-out infinite;
}

@keyframes arrow-bounce {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===== Sections ===== */
.section {
    padding: 6rem 3rem;
    position: relative;
    z-index: 1;
}

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

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

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin: 0 auto 3rem;
    text-align: center;
    position: relative;
    display: block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
    transition: transform 0.6s ease-out;
}

.section-title.active::after {
    transform: translateX(-50%) scaleX(1);
}

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

.about-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Timeline / Experience ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border);
}

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

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

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.timeline-content:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateX(8px);
}

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

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

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

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

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.project-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.project-card > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-card ul {
    list-style: none;
}

.project-card li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.project-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ===== Education ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.education-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.education-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-4px);
}

.education-badge {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.education-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.education-school {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.education-location {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.education-gpa {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 0.5rem;
}

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

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    transition: var(--transition);
}

.cert-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: scale(1.02);
}

.cert-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.cert-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

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

/* ===== Strengths ===== */
.strengths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

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

.strength-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-2px);
}

.strength-icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.75rem;
}

.strength-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.strength-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== Contact ===== */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.25);
}

.contact-icon {
    font-size: 1.2rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

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

/* ===== Reveal Animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image-wrapper {
        order: -1;
    }

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

    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-secondary);
        padding: 2rem;
        gap: 1rem;
    }

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

    .nav-toggle {
        display: flex;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 6rem 1.5rem 3rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }

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

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }
}
