/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #1a1a1a;
    --color-secondary: #4a4a4a;
    --color-text: #2a2a2a;
    --color-text-light: #6a6a6a;
    --color-bg: #ffffff;
    --color-bg-light: #f8f8f8;
    --color-border: #e0e0e0;
    --color-accent: #2563eb;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;
}

[data-theme="dark"] {
    --color-primary: #f0f0f0;
    --color-secondary: #b0b0b0;
    --color-text: #e0e0e0;
    --color-text-light: #a0a0a0;
    --color-bg: #1a1a1a;
    --color-bg-light: #242424;
    --color-border: #3a3a3a;
    --color-accent: #3b82f6;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: none;
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    
    .custom-cursor {
        display: none;
    }
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
    background: var(--color-primary);
    opacity: 0.6;
    mix-blend-mode: difference;
}

.custom-cursor.hover-title {
    width: 60px;
    height: 60px;
    opacity: 0.4;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #dda15e);
    background-size: 200% 200%;
    animation: rainbow-shift 3s ease infinite;
    mix-blend-mode: normal;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    color: var(--color-text);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .theme-toggle:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(26, 26, 26, 0.95);
}

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

.nav-logo {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: -0.3px;
}

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

.nav-menu a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 400;
    transition: background 0.3s ease, color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    position: relative;
    background: linear-gradient(90deg, transparent, transparent);
    -webkit-background-clip: text;
    background-clip: text;
}

.nav-menu a:hover {
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #dda15e);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-shift 3s ease infinite;
}

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

@keyframes rainbow-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    margin-top: 60px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--color-text-light);
    font-weight: 400;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Section Styles */
.section {
    padding: var(--spacing-2xl) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xl);
    letter-spacing: -0.5px;
}

/* About Section */
.about-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-xl);
    max-width: 1100px;
}

.about-content {
    flex: 0 0 auto;
    max-width: 600px;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

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

.about-image-wrapper {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.about-image {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .about-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.about-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .about-image:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Experience Timeline */
.experience-section {
    background: var(--color-bg-light);
}

.timeline {
    position: relative;
    max-width: 900px;
}

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

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: var(--spacing-xl);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    background: var(--color-bg);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.timeline-role {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.timeline-company {
    font-size: 1.125rem;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.timeline-location {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.timeline-description {
    list-style: none;
    margin-top: 1rem;
}

.timeline-description li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    font-weight: 300;
}

.timeline-description li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 600;
}

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

/* Education Section */
.education-content {
    max-width: 800px;
}

.education-item {
    background: var(--color-bg-light);
    padding: var(--spacing-lg);
    border-radius: 8px;
}

.education-degree {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.education-school {
    font-size: 1.125rem;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 1rem;
}

.education-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: var(--color-text-light);
}

.education-location {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.education-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.education-courses span {
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--color-text);
    font-weight: 400;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-lg);
}

.project-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: var(--spacing-lg);
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0;
    letter-spacing: -0.3px;
}

.project-year {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 400;
}

.project-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.project-results {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.result-item {
    display: flex;
    flex-direction: column;
}

.result-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.result-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 400;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-tech span {
    padding: 0.5rem 1rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--color-text);
    font-weight: 400;
}

/* Contact Section */
.contact-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-xl);
    max-width: 1100px;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    flex: 0 0 auto;
    max-width: 600px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 400;
    transition: background 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0;
    background: linear-gradient(90deg, transparent, transparent);
    -webkit-background-clip: text;
    background-clip: text;
}

.contact-value:hover {
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #dda15e);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-shift 3s ease infinite;
}

.contact-image-wrapper {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin-top: 0;
}

.contact-image {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .contact-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.contact-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .contact-image:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Footer */
.footer {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-light);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }

    .nav-menu a {
        font-size: 0.875rem;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

    .about-wrapper,
    .contact-wrapper {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .about-image-wrapper,
    .contact-image-wrapper {
        justify-content: center;
    }

    .about-image,
    .contact-image {
        width: 250px;
        height: 250px;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

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

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

    .timeline::before {
        left: -1px;
    }

    .timeline-item::before {
        left: -8px;
    }
}
