/* Global Styles */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-alt: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --primary-color: #60a5fa;
    --secondary-color: #a78bfa;
    --text-color: #f9fafb;
    --text-light: #d1d5db;
    --bg-color: #1f2937;
    --bg-alt: #111827;
    --border-color: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    transform: rotate(20deg);
}

.theme-icon {
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2rem;
    margin-top: 60px;
}

.hero-content {
    text-align: center;
    color: white;
}

.profile-image {
    margin-bottom: 2rem;
}

.image-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.initial {
    font-size: 3rem;
    font-weight: bold;
    color: white;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s backwards;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Sections */
.section {
    padding: 5rem 2rem;
    background-color: var(--bg-color);
}

.section-alt {
    background-color: var(--bg-alt);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: var(--text-light);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--border-color);
}

.timeline-item {
    margin-bottom: 6rem;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: calc(50% + 40px);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: calc(50% + 40px);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid var(--bg-alt);
    top: 20px;
}

.timeline-content {
    background-color: var(--bg-color);
    padding: 4rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.timeline-company {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-style: italic;
    font-size: 1.4rem;
}

.timeline-description {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.2rem;
}

.timeline-description ul {
    list-style-type: disc;
    margin-left: 2rem;
}

.timeline-description li {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.timeline-description li:last-child {
    margin-bottom: 0;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 968px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

.skill-category {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.skill-item {
    margin-bottom: 1rem;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.skill-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 1s ease;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-alt);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
}

.contact-item h3 {
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--bg-alt);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 1s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 60px;
        margin-right: 0;
        padding: 2rem;
    }
    
    .timeline-title {
        font-size: 1.8rem;
    }
    
    .timeline-company {
        font-size: 1.1rem;
    }
    
    .timeline-description {
        font-size: 1rem;
    }

    .footer .container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .nav-menu {
        display: none;
    }

    .hero {
        padding: 1rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

.mypicture {
  border-radius: 50%;
  width: 200px;
  height: 200px;
  object-fit: cover;
}

/* Custom Tooltip Styles */
.timeline-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.info-trigger,
.skills-trigger {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.info-trigger:hover,
.skills-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.skills-trigger {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.custom-tooltip {
    position: absolute;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90vw;
    max-height: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    overflow: hidden;
}

.custom-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px 10px 0 0;
}

.tooltip-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.tooltip-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tooltip-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tooltip-content {
    padding: 1.5rem;
    max-height: 420px;
    overflow-y: auto;
    color: var(--text-color);
}

.tooltip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tooltip-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.6;
}

.tooltip-list li:last-child {
    border-bottom: none;
}

.tooltip-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 1.4;
}

.tooltip-content p {
    line-height: 1.8;
    margin: 0;
}

/* Custom scrollbar for tooltip */
.tooltip-content::-webkit-scrollbar {
    width: 8px;
}

.tooltip-content::-webkit-scrollbar-track {
    background: var(--bg-alt);
    border-radius: 4px;
}

.tooltip-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.tooltip-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Skills Tags in Tooltip */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.skill-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.2s ease;
    display: inline-block;
}

.skill-tag:hover {
    transform: scale(1.05);
}