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

:root {
    --primary: #8b0000;
    --secondary: #2c3e50;
    --accent: #e74c3c;
    --bg-dark: #1a1a1a;
    --bg-light: #f8f9fa;
    --text-light: #ecf0f1;
    --text-dark: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.03) 10px,
        rgba(255,255,255,0.03) 20px
    );
    animation: move 20s linear infinite;
}

@keyframes move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 2rem;
    max-width: 900px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero .subtitle {
    font-size: 1.8rem;
    color: #ecf0f1;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero .tagline {
    font-size: 1.2rem;
    color: #bdc3c7;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
}

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

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

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

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 2rem;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    vertical-align: middle;
    line-height: 1;
}

.lang-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1001;
    min-width: 120px;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
}

.lang-dropdown-content a {
    color: white;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    transition: background 0.3s;
    border-radius: 10px;
}

.lang-dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-dropdown-content a:first-child {
    border-radius: 10px 10px 0 0;
}

.lang-dropdown-content a:last-child {
    border-radius: 0 0 10px 10px;
}

.lang-dropdown-content.show {
    display: block;
}

/* Language Toggle */
.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

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

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

/* Mobile touch improvements */
@media (max-width: 768px) {
    .lang-btn {
        min-width: 44px; /* Minimum touch target size */
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .lang-dropdown-content {
        right: -1rem; /* Adjust position to avoid edge */
    }
}

/* Sections */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto;
}

/* About Section */
#about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.contact-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item a {
    color: var(--secondary);
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--accent);
}

.profile-text {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Experience Section */
.experience-grid {
    display: grid;
    gap: 2rem;
}

.experience-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 5px solid var(--primary);
    transition: transform 0.3s;
}

.experience-card:hover {
    transform: translateX(10px);
}

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

.experience-title {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: bold;
}

.experience-date {
    color: var(--accent);
    font-weight: 600;
}

.experience-company {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.experience-description {
    margin-bottom: 1rem;
}

.experience-description ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

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

.tag {
    background: var(--bg-light);
    color: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Skills Section */
#skills {
    background: var(--bg-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-light);
}

.skill-list li:last-child {
    border-bottom: none;
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.education-year {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: bold;
}

.education-title {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.education-institution {
    color: var(--accent);
}

.education-link {
    margin-top: 0.5rem;
}

.education-link a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
}

.education-link a:hover {
    text-decoration: underline;
}

/* Courses Section */
#courses {
    background: var(--bg-light);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.course-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.course-date {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.course-title {
    color: var(--secondary);
    font-weight: 600;
}

.course-provider {
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.course-link {
    margin-top: 0.5rem;
}

.course-link a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
}

.course-link a:hover {
    text-decoration: underline;
}

/* Portfolio Section */
#portfolio {
    background: var(--bg-light);
}

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

.portfolio-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: var(--text-light);
    text-align: center;
    padding: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.language-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.social-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

.github-link {
    font-weight: bold;
    color: var(--primary);
}

.github-link:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
    }

    nav {
        padding: 1rem 0;
    }

    nav ul {
        gap: 1rem;
        padding: 0 1rem;
    }

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


.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-20px); }
    60% { transform: translateX(-50%) translateY(-10px); }
}

.scroll-indicator::after {
    content: '↓';
    font-size: 2rem;
    color: white;
}