:root {
    /* Modern App Palette */
    --primary-color: #2563EB;
    /* Royal Blue */
    --primary-light: #60A5FA;
    --primary-dark: #1E40AF;
    --accent-color: #FBBF24;

    --bg-body: #F3F4F6;
    --bg-surface: #FFFFFF;

    --text-main: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;

    /* Design Tokens */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-primary: 0 10px 25px -5px rgba(37, 99, 235, 0.4);

    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Poppins', sans-serif;

    --container-width: 1100px;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-main);
    position: relative;
    display: inline-block;

}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    margin: 0.5rem auto 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- HEADER --- */
.header-container {
    position: fixed;
    top: 1.5rem;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-container.scrolled {
    top: 0;
    padding: 0;
}

.nav-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.header-container.scrolled .nav-wrapper {
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    background: rgba(255, 255, 255, 0.85);
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.nav-list-desktop {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    font-weight: 400;
}

.nav-link.active {
    font-weight: 600;
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* Mobile Menu */
/* Mobile Menu */
.mobile-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1001;
    visibility: hidden;
    /* Ensure hidden off-screen */
    transition: visibility 0.4s;
}

.mobile-overlay.active {
    pointer-events: all;
    visibility: visible;
}

/* The Backdrop Blur (optional, distinct from the sliding panel) */
.mobile-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active::before {
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    /* Full width for mobile */
    height: 100vh;
    /* changed from 100% to 100vh to ensure full viewport height */
    background-color: #ffffff !important;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Apple-style easing */
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1005;
    /* Ensure above everything */
}

.mobile-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-header {
    position: absolute;
    top: 2rem;
    right: 2rem;
    left: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.mobile-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    /* Larger font for full screen */
    font-weight: 500;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.mobile-links a.active {
    color: var(--primary-color);
    transform: scale(1.1);
}

.mobile-links a:hover {
    color: var(--primary-color);
    transform: translateX(10px);
}


@media (max-width: 768px) {
    .nav-list-desktop {
        display: none;
    }

    .menu-btn {
        display: block;
    }
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem;
    background:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
}

.hero-img-wrapper {
    position: relative;
    z-index: 5;
}

.hero-img {
    width: 100%;
    max-width: 440px;
    height: auto;
    border-radius: 40px;
    z-index: 2;
    position: relative;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
}

.hero-img-bg {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 40px;
    z-index: 1;
}

.hero-floating-card {
    position: absolute;
    bottom: 10%;
    left: -10%;
    background: white;
    padding: 1.25rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-floating-card strong {
    display: block;
    font-size: 1.1rem;
}

.hero-floating-card span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-light);
    border-radius: 12px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 8px;
    }

    100% {
        opacity: 0;
        top: 24px;
    }
}


@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-img-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-floating-card {
        left: -5%;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

/* --- EXPERIENCE --- */
.experience-section {
    background: #F8FAFC;
    padding-bottom: 6rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: -1.5rem;
}

/* Vertical Timeline Container */
.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 1rem;
}

/* The Vertical Center Line */
.timeline-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #E2E8F0;
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 0;
    /* Move to back */
}

/* Timeline Item Row */
.timeline-item {
    display: flex;
    justify-content: center;
    padding-bottom: 4rem;
    position: relative;
    width: 100%;
    z-index: 2;
    /* Ensure content is above line */
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Marker on the Line */
.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 5;
    top: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px #EFF6FF;
}

.timeline-item:hover .timeline-marker {
    background: var(--primary-color);
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
}

.marker-dot,
.marker-line {
    display: none;
    /* Hide old markers */
}

/* Content Box */
.timeline-content {
    width: 45%;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(229, 231, 235, 0.5);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
}

/* Positioning based on 'top' (Left) and 'bottom' (Right) classes from PHP */
.timeline-item.top {
    justify-content: flex-start;
}

.timeline-item.top .timeline-content {
    margin-right: auto;
    text-align: right;
    /* Align text towards center? Optional. Let's keep left for readability but align container. */
    text-align: right;
}

.timeline-item.top .timeline-content .timeline-company,
.timeline-item.top .timeline-content .timeline-date {
    justify-content: flex-end;
}

.timeline-item.top .timeline-skills {
    justify-content: flex-end;
}

.timeline-item.bottom {
    justify-content: flex-end;
}

.timeline-item.bottom .timeline-content {
    margin-left: auto;
    text-align: left;
}

/* Date inside content, styled */
.timeline-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-role {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-main);
}

.timeline-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #E2E8F0;
}

.skill-tag {
    font-size: 0.75rem;
    background: #EFF6FF;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-weight: 600;
}

/* Responsive: Collapse to single column on mobile */
@media (max-width: 900px) {
    .timeline-container::after {
        left: 20px;
        /* Line on left */
    }

    .timeline-item {
        justify-content: flex-start !important;
        padding-left: 3rem;
        /* Space for line */
    }

    .timeline-marker {
        left: 20px;
        transform: translateX(-50%);
    }

    .timeline-item:hover .timeline-marker {
        transform: translateX(-50%) scale(1.2);
    }

    .timeline-content {
        width: 100%;
        text-align: left !important;
    }

    .timeline-item.top .timeline-content .timeline-company,
    .timeline-item.top .timeline-content .timeline-date {
        justify-content: flex-start;
    }

    .timeline-item.top .timeline-skills {
        justify-content: flex-start;
    }
}

/* --- SKILLS --- */
.skills-section {
    background: white;
}

.skills-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-card-new {
    background: #F8FAFC;
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
}

.skill-card-new:hover {
    background: white;
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.1);
}

.skill-icon-outer {
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.skill-card-new h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* --- CONTACT --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: #EFF6FF;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}