/* ===================================
   Reset & Base Styles
   =================================== */

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

:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --background: #ffffff;
    --background-alt: #f8fafc;
    --border-color: #e2e8f0;
    --accent: #0ea5e9;

    /* Spacing */
    --section-padding: 80px 20px;
    --container-max-width: 1200px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Transitions */
    --transition: all 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html {
    scroll-behavior: smooth;
}

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

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.25rem;
}

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

a:hover {
    color: var(--primary-dark);
}

p {
    margin-bottom: 1rem;
}

/* ===================================
   Container
   =================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Section
   =================================== */

.section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 3px;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 150px 20px 80px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: var(--font-weight-bold);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-medium);
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-location {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 0.85;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-style: italic;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.5s backwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.7s backwards;
}

.hero-cta .btn {
    flex: 1;
    min-width: 180px;
    max-width: 200px;
}

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

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

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

/* ===================================
   About Section
   =================================== */

.about-section {
    background-color: var(--background);
}

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

.about-content > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--background-alt);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card ul {
    list-style: none;
    padding: 0;
}

.service-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

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

/* ===================================
   Experience Section
   =================================== */

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

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent));
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--background-alt);
    z-index: 1;
}

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

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.timeline-date {
    display: inline-block;
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ===================================
   Projects Section
   =================================== */

.projects-section {
    background-color: var(--background);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.project-card {
    background: var(--background-alt);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.project-date {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

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

.project-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
    margin-top: 1rem;
}

.project-link:hover {
    transform: translateX(5px);
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-links .project-link {
    margin-top: 0;
}

/* ===================================
   Education Section
   =================================== */

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

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.education-card {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.education-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.education-date {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.education-degree {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.education-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ===================================
   Skills Section
   =================================== */

.skills-section {
    background-color: var(--background);
}

.skills-category {
    margin-bottom: 3rem;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-category h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.skill-item {
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: var(--font-weight-semibold);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.languages {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.language-item {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.language-item strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ===================================
   Tags
   =================================== */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
}

/* ===================================
   Contact Section
   =================================== */

.contact-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contact-section .section-title {
    color: white;
}

.contact-section .section-title::after {
    background: white;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

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

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: var(--font-weight-semibold);
    transition: var(--transition);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.contact-link:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

/* ===================================
   Footer
   =================================== */

.footer {
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 20px;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

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

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        gap: 0;
    }

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

    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
        color: var(--text-primary);
    }

    .nav-menu a:hover {
        background-color: var(--background-alt);
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-location {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
    }

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

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 2.5rem;
    }

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 60px 15px;
    }

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

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .service-card,
    .project-card,
    .education-card {
        padding: 1.5rem;
    }

    .timeline-content {
        padding: 1rem;
    }
}

/* ===================================
   Animations
   =================================== */

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

/* Add smooth reveal animations on scroll */
@media (prefers-reduced-motion: no-preference) {
    .timeline-item,
    .project-card,
    .education-card,
    .service-card {
        animation: fadeInUp 0.6s ease;
    }
}
