:root {
    --primary-color: #e67e22;
    --secondary-color: #d35400;
    --text-color: #4a3933;
    --bg-color: #fdf6e3;
    --accent-color: #ffd700;
    --section-padding: 5rem 0;
    --gradient-dark: #2c1810;
    --gradient-light: #8b4513;
    --nav-bg: rgba(253, 246, 227, 0.95);
    --card-bg: #fff5e6;
    --section-alt-bg: #f5e6d3;
}

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

html {
    scroll-behavior: smooth;
}

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);
}

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

/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(44, 24, 16, 0.1);
    z-index: 1000;
    height: auto;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.logo img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

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

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

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

/* Hero Section */
.hero {
    padding: calc(var(--section-padding) + 4rem) 0 var(--section-padding);
    background: linear-gradient(45deg, var(--gradient-dark), var(--gradient-light));
    text-align: center;
    color: white;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(230, 126, 34, 0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.5;
    }
}

.hero h1,
.hero .subtitle {
    color: white;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.highlight {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.cta-buttons {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

/* About Section */
.about {
    padding: var(--section-padding);
    background-color: var(--card-bg);
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: center;
}

.about-text {
    max-width: 600px;
}

.about-text p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

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

.skill-tag {
    background-color: rgba(230, 126, 34, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Projects Section */
.projects {
    padding: var(--section-padding);
    background-color: var(--section-alt-bg);
}

.projects h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(44, 24, 16, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e6ccb3;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(44, 24, 16, 0.15);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    margin-bottom: 1.2rem;
    color: var(--text-color);
    font-size: 1.4rem;
}

.project-content p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.5rem;
}

.project-tags span {
    background-color: rgba(230, 126, 34, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
    background-color: var(--card-bg);
    text-align: center;
}

.contact h2 {
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}

.social-link {
    color: var(--text-color);
    font-size: 2rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.social-link i {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
}

.social-link span {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px);
}

.social-link:hover i {
    transform: scale(1.1);
}

.social-link:hover span {
    opacity: 1;
    transform: translateY(0);
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.social-link:hover::after {
    width: 100%;
}

/* Footer */
footer {
    padding: 2rem 0;
    background-color: var(--gradient-dark);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 0;
        height: auto;
        min-height: 60px;
    }

    nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.2rem;
        margin-right: 0;
        min-width: auto;
    }

    .logo img {
        width: 25px;
        height: 25px;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 0.8rem;
        padding: 0.3rem;
        margin: 0;
    }

    nav ul li {
        padding: 0;
    }

    nav ul li a {
        font-size: 0.9rem;
        padding: 0.2rem 0.5rem;
    }

    .lang-switch {
        margin: 0;
        gap: 0.5rem;
    }

    .lang-btn {
        padding: 0.2rem 0.8rem;
        font-size: 0.8rem;
        min-width: 45px;
    }

    .hero {
        padding-top: calc(var(--section-padding) + 3rem);
        min-height: 80vh;
    }

    .hero h1 {
        font-size: 1.8rem;
        padding: 0 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }

    .subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        min-width: unset;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        min-height: 50px;
    }

    nav {
        padding: 0.3rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
}

.lang-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.lang-btn:hover:not(.active) {
    background-color: rgba(230, 126, 34, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    position: relative;
    background-color: var(--bg-color);
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    color: var(--text-color);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
    line-height: 1.4;
}

.modal-content h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem;
}

.feature-list p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.requirements-list {
    list-style: none;
    padding-left: 1rem;
    margin: 1rem 0;
}

.requirements-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.requirements-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.algorithm-steps {
    padding-left: 1.2rem;
    margin: 1rem 0;
}

.algorithm-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.project-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    margin: 1.5rem 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .modal-content {
        margin: 0;
        padding: 1.5rem;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .project-image {
        max-height: 300px;
        margin: 1rem 0;
    }

    .modal-content h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .modal-content h4 {
        font-size: 1.1rem;
        margin: 1.2rem 0 0.8rem;
    }

    .feature-list p {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 3% auto;
        padding: 1rem;
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .project-image {
        max-height: 250px;
        margin: 0.6rem 0;
    }

    .modal-content h4 {
        font-size: 1rem;
        margin: 1rem 0 0.6rem;
    }

    .modal-content p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-color);
}

.read-more {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.read-more:hover {
    color: var(--secondary-color);
}

@keyframes floatingEmoji {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.floating-emoji {
    position: absolute;
    font-size: 3rem;
    pointer-events: none;
    animation: floatingEmoji 10s linear infinite;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    filter: brightness(1.2);
}

.project-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-start;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    width: fit-content;
    border: 2px solid transparent;
}

.github-link:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.2);
}

.github-icon {
    font-size: 1.5rem;
    color: white;
    transition: color 0.3s ease;
}

.github-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.github-text span {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    transition: color 0.3s ease;
}

.github-text small {
    font-size: 0.75rem;
    opacity: 0.9;
    color: white;
    transition: color 0.3s ease;
}

.github-link:hover .github-icon,
.github-link:hover .github-text span,
.github-link:hover .github-text small {
    color: var(--primary-color);
}

.github-link:hover .github-icon i {
    transform: scale(1.1) rotate(360deg);
}

.github-icon i {
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .github-link {
        padding: 0.7rem 1.2rem;
    }

    .github-icon {
        font-size: 1.3rem;
    }

    .github-text span {
        font-size: 0.9rem;
    }

    .github-text small {
        font-size: 0.75rem;
    }
}