/* ===========================
   Global Variables & Reset
   =========================== */

:root {
    /* Blue Theme Colors */
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --primary-blue-light: #60a5fa;

    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.875rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

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

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo span {
    color: var(--primary-blue);
    pointer-events: none;
}

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

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

/* Theme Toggle Button */
.theme-toggle {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: rotate(15deg);
}

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

.theme-toggle:hover svg {
    fill: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Backdrop */
.menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* ===========================
   Container & Layout
   =========================== */

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

.section {
    padding: 5rem 0;
    padding-top: 7rem;
    min-height: calc(100vh - 70px);
    margin-top: 70px;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

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

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

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===========================
   Cards
   =========================== */

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.card-title {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===========================
   Grid Layouts
   =========================== */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ===========================
   Skills & Tags
   =========================== */

.skill-category {
    margin-bottom: 2rem;
}

.skill-category h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: scale(1.05);
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    padding-top: 120px;
    margin-top: 0;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content .role {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-content .tagline {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    border: 5px solid var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: var(--primary-blue-light);
}

/* ===========================
   Project Cards
   =========================== */

.project-card {
    position: relative;
    overflow: hidden;
}

.project-card .tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-badge {
    background-color: var(--bg-secondary);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--primary-blue);
}

.project-links {
    margin-top: 1.5rem;
}

/* ===========================
   Timeline (Experience)
   =========================== */

.timeline {
    position: relative;
    padding-left: 2rem;
}

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-blue);
    border: 3px solid var(--bg-primary);
}

.timeline-date {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-company {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.timeline-description {
    color: var(--text-secondary);
}

.timeline-description ul {
    list-style: none;
    padding-left: 0;
}

.timeline-description li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

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

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--primary-blue);
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 24px;
    height: 24px;
    fill: var(--primary-blue);
}

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

.contact-details p {
    margin: 0;
    color: var(--text-secondary);
}

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

footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
}

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


@media (max-width: 968px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .hero {
        padding-top: 100px;
    }
}

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

    h2 {
        font-size: 2rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -80%;
        width: 70%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background-color: var(--bg-card);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        border-right: 1px solid var(--border-color);
        box-shadow: var(--shadow-xl);
        z-index: 1000;
    }

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

    .mobile-menu-toggle {
        display: flex;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .role {
        font-size: 1.25rem;
    }

    .hero {
        padding-top: 100px;
    }

    .section {
        padding: 3rem 0;
        padding-top: 5rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .navbar {
        padding: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .profile-photo {
        width: 140px;
        height: 140px;
    }
}

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

    .hero-content h1 {
        font-size: 2rem;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .hero-content .role {
        font-size: 1.125rem;
    }

    .hero {
        padding-top: 90px;
    }
}