/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --accent-color: #14b8a6;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

section {
    padding: 80px 0;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

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

ul {
    list-style: none;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.nav-brand h2 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--text-medium);
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    padding-top: 80px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    animation: fadeInLeft 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.hero-social {
    display: flex;
    gap: 16px;
}

.hero-social a {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.hero-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-4px);
}

.hero-image {
    animation: fadeInRight 1s ease;
}

.profile-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.profile-placeholder {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.hero-scroll a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* ===================================
   Section Headers
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    font-family: 'Playfair Display', serif;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   About Section
   =================================== */
.about {
    background: var(--bg-white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

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

.about-intro {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 2px solid var(--border-color);
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--text-medium);
}

/* ===================================
   Education Section
   =================================== */
.education {
    background: var(--bg-light);
}

.education-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

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

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

.timeline-dot {
    position: absolute;
    left: -46px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-light);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.timeline-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.timeline-date {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.timeline-institution {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 12px;
}

.timeline-institution i {
    color: var(--primary-color);
    margin-right: 8px;
}

.timeline-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===================================
   Experience Section
   =================================== */
.experience {
    background: var(--bg-white);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.experience-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.experience-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 20px;
}

.card-date {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.card-company {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 16px;
}

.card-description {
    margin-bottom: 20px;
}

.card-description li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    color: var(--text-medium);
    line-height: 1.6;
}

.card-description li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

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

.tag {
    padding: 6px 12px;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===================================
   My Work Section
   =================================== */
.work {
    background: var(--bg-white);
}

.work-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.filter-btn {
    padding: 12px 24px;
    background: white;
    color: var(--text-medium);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.work-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.work-image {
    position: relative;
    overflow: hidden;
    background: var(--bg-light);
}

.work-image-placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    font-size: 4rem;
    color: white;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-btn {
    padding: 12px 24px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.work-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.work-content {
    padding: 24px;
}

.work-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.work-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.3;
}

.work-description {
    font-size: 0.9375rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 16px;
}

.work-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.work-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.work-meta i {
    color: var(--primary-color);
}

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

/* Work Modal */
.work-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.work-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

#modalBody {
    padding: 48px;
}

.modal-header {
    margin-bottom: 24px;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-family: 'Playfair Display', serif;
}

.modal-subtitle {
    font-size: 1.125rem;
    color: var(--primary-color);
    font-weight: 600;
}

.modal-section {
    margin-bottom: 32px;
}

.modal-section h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.modal-section p, .modal-section ul {
    font-size: 1rem;
    color: var(--text-medium);
    line-height: 1.8;
}

.modal-section ul {
    list-style: disc;
    padding-left: 24px;
}

.modal-section li {
    margin-bottom: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===================================
   Skills Section
   =================================== */
.skills {
    background: var(--bg-light);
}

.skills-content {
    display: grid;
    gap: 48px;
}

.skills-category {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.category-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.category-header h3 {
    font-size: 1.75rem;
}

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

.skill-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: var(--transition);
}

.skill-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(8px);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.skill-item:hover i {
    color: white;
}

.skill-item span {
    font-weight: 500;
}

/* ===================================
   Certifications Section
   =================================== */
.certifications {
    background: var(--bg-white);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.cert-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.cert-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.cert-card h4 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.cert-card p {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.6;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--bg-light);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.contact-item {
    display: flex;
    gap: 20px;
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.contact-details a,
.contact-details p {
    font-size: 1rem;
    color: var(--text-medium);
}

.contact-details a:hover {
    color: var(--primary-color);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 8px;
}

.footer-tagline {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ===================================
   Back to Top Button
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-image {
        order: -1;
    }

    .profile-placeholder {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 76px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 20px 0;
    }

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

    .nav-toggle {
        display: flex;
    }

    .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(7px, -6px);
    }
}

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .experience-grid,
    .certifications-grid,
    .work-grid {
        grid-template-columns: 1fr;
    }

    .work-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 10px 16px;
        font-size: 0.8125rem;
    }

    #modalBody {
        padding: 32px 20px;
    }

    .modal-title {
        font-size: 1.5rem;
    }
    }

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

    .contact-info {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}