/* ===== CSS Variables ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #f59e0b;
    --background: #ffffff;
    --background-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --radius: 12px;
    --transition: all 0.3s ease;
    --navbar-bg: rgba(255, 255, 255, 0.95);
}

/* ===== Dark Mode Variables ===== */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #fbbf24;
    --background: #0f172a;
    --background-alt: #1e293b;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --navbar-bg: rgba(15, 23, 42, 0.95);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    position: relative;
}

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

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

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

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

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

/* ===== Nav Actions & Theme Toggle ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
}

.theme-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--background-alt) 0%, var(--background) 100%);
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-greeting {
    font-size: 18px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-name {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 500;
    color: var(--text);
    margin-bottom: 24px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

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

/* ===== Section Styles ===== */
.section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 17px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card {
    background: var(--background-alt);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--gradient);
    color: white;
    border-radius: 10px;
    margin-bottom: 16px;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-card p {
    color: var(--text-light);
}

.info-sub {
    font-size: 14px;
    margin-top: 4px;
}

/* ===== Experience Section ===== */
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

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

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

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

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--background-alt);
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline-content {
    background: var(--background);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px var(--shadow);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.timeline-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.timeline-date {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.timeline-company {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.timeline-list {
    list-style: disc;
    padding-left: 20px;
}

.timeline-list li {
    margin-bottom: 10px;
    color: var(--text-light);
}

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

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

.project-card {
    background: var(--background);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--shadow);
    border-color: var(--primary-light);
}

.project-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--gradient);
    color: white;
    border-radius: 12px;
    margin-bottom: 20px;
}

.project-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.project-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

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

.project-tags span {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
}

/* ===== Skills Section ===== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px;
}

.skills-category h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
}

.skills-grid {
    display: grid;
    gap: 16px;
}

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

.skill-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.skill-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

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

/* ===== Contact Section ===== */
.contact-intro {
    text-align: center;
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: -30px auto 50px;
}

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

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    background: var(--background-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

a.contact-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.contact-card svg {
    color: var(--primary);
    margin-bottom: 16px;
}

.contact-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-card p {
    color: var(--text-light);
}

/* ===== Footer ===== */
.footer {
    padding: 30px 0;
    background: #1e293b;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

[data-theme="dark"] .footer {
    background: #020617;
}

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

    .skills-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--background);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

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

    .hero {
        padding: 100px 24px 60px;
    }

    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

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

    .timeline-header {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .btn {
        width: 100%;
    }

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