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

:root {
    --primary-color: #FFE033;
    --dark-bg: #1a1a1a;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --white: #ffffff;
    --icon-pink: #FF8A8A;
    --icon-yellow: #FFD700;
    --icon-blue: #4A90D9;
    --icon-dark: #333;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--dark-bg);
    padding: 1rem 2rem;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.15);
    padding-left: 1rem;
}

.lang-switcher a {
    display: flex;
    align-items: center;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-switcher a img {
    width: 26px;
    height: 18px;
    border-radius: 3px;
    display: block;
}

.lang-switcher a:hover {
    opacity: 1;
    transform: scale(1.12);
}

.lang-switcher a.active {
    opacity: 1;
    cursor: default;
    pointer-events: none;
}

.btn-contact {
    background: var(--primary-color);
    color: var(--dark-bg) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
}

.btn-contact:hover {
    background: #f5d400;
    color: var(--dark-bg) !important;
}

.btn-cv {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    padding: 0.4rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cv:hover {
    background: var(--primary-color);
    color: var(--dark-bg) !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 4rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 3rem;
    position: relative;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.hero-title .typewriter {
    display: inline;
    white-space: pre-wrap;
}

.hero-title .cursor {
    display: inline-block;
    font-weight: 400;
    color: var(--primary-color);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero-subtitle {
    margin-top: 1rem;
    font-size: 1.35rem;
    color: var(--text-light);
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease 2.5s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease 2.8s forwards;
}

.hero-btn {
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn.primary {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.hero-btn.primary:hover {
    background: #f5d400;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 224, 51, 0.4);
}

.hero-btn.secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.hero-btn.secondary:hover {
    background: var(--text-dark);
    color: var(--white);
    transform: translateY(-2px);
}

.hero-image {
    flex: 0 0 auto;
    position: relative;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    z-index: -1;
    transition: var(--transition);
}

.hero-image-wrapper:hover .hero-image-decoration {
    top: -15px;
    right: -15px;
}

.profile-img {
    width: 500px;
    height: 550px;
    object-fit: cover;
    border-radius: var(--border-radius);
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* About Section */
.about {
    padding: 6rem 4rem;
    background: var(--white);
    content-visibility: auto;
    contain-intrinsic-size: auto 450px;
}

.about-container {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-images {
    display: grid;
    gap: 1rem;
}

.about-images img {
    border-radius: var(--border-radius);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Expertise Section */
.expertise {
    padding: 6rem 4rem;
    background: #fafafa;
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
}

.expertise-container {
    max-width: 1500px;
    margin: 0 auto;
}

.expertise-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.expertise-title-container h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.expertise-description {
    color: var(--text-light);
    line-height: 1.8;
}

.expertise-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.expertise-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.expertise-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-frontend {
    background: var(--icon-pink);
    color: var(--white);
}

.icon-backend {
    background: var(--icon-yellow);
    color: var(--dark-bg);
}

.icon-data {
    background: var(--icon-blue);
    color: var(--white);
}

.icon-ai {
    background: var(--icon-dark);
    color: var(--white);
}

.expertise-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.expertise-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Technologies Section */
.technologies {
    padding: 6rem 4rem;
    position: relative;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

.technologies-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.technologies-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.technologies-decoration {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.5;
}

.technologies-decoration.dot-1 {
    width: 24px;
    height: 24px;
    top: 2rem;
    right: 35%;
}

.technologies-decoration.dot-2 {
    width: 18px;
    height: 18px;
    top: 15%;
    right: -1rem;
}

.technologies-decoration.dot-3 {
    width: 16px;
    height: 16px;
    bottom: 15%;
    right: 5%;
}

.technologies-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.stack-column {
    display: flex;
    flex-direction: column;
}

.stack-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.stack-icon {
    font-size: 1.2rem;
}

.stack-label {
    font-size: 1.1rem;
    font-weight: 700;
}

.stack-label.main {
    color: var(--primary-color);
}

.stack-label.secondary {
    color: var(--primary-color);
}

.stack-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

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

.stack-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

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

.stack-card img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.technologies-bottom-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.bottom-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.bottom-badge-icon {
    font-size: 1rem;
}

@media (max-width: 1024px) {
    .technologies-grid {
        gap: 2rem;
    }

    .stack-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .technologies {
        padding: 4rem 1.5rem;
    }

    .technologies-title {
        font-size: 2rem;
    }

    .technologies-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .stack-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .technologies-bottom-badges {
        gap: 1rem;
    }
}

/* Tech Stack */
.tech-stack {
    padding: 2rem 0;
    background: var(--white);
    overflow: hidden;
    width: 100%;
    content-visibility: auto;
    contain-intrinsic-size: auto 100px;
}

.tech-scroll {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.tech-badges {
    display: flex;
    gap: 1.5rem;
    animation: techScroll 60s linear infinite;
    width: max-content;
    will-change: transform;
}

.tech-badges:hover {
    animation-play-state: paused;
}

@keyframes techScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f5f5f5;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tech-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tech-badge img {
    width: 20px;
    height: 20px;
}

/* Projects Section */
.projects {
    padding: 6rem 4rem;
    background: var(--dark-bg);
    color: var(--white);
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}

.projects-container {
    margin: 0 auto;
}

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

.projects-header h2 {
    font-size: 3rem;
    font-weight: 800;
}

.projects-header p {
    max-width: 400px;
    color: #999;
    margin-top: 1rem;
}

.carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #444;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

/* Prev buttons start disabled (scroll position is always 0 on load) */
.carousel-btn.prev,
.testimonial-btn.prev {
    opacity: 0.5;
    cursor: default;
}

.carousel-btn:hover {
    background: var(--white);
    color: var(--dark-bg);
    border-color: var(--white);
}

.projects-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 1rem;
}

.projects-carousel::-webkit-scrollbar {
    display: none;
}

.project-card {
    flex: 0 0 calc(33.333% - 1.33rem);
    min-width: 300px;
    cursor: pointer;
    transition: var(--transition);
}

.project-card:hover {
    transform: scale(1.02);
}

.project-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    aspect-ratio: 16/10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.project-card p {
    font-size: 0.85rem;
    color: #999;
}

/* Testimonials Section */
.testimonials {
    padding: 6rem 4rem;
    background: var(--white);
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.testimonials-container {
    max-width: 1500px;
    margin: 0 auto;
}

.testimonials-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.testimonials-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.testimonials-controls {
    display: flex;
    gap: 0.5rem;
}

.testimonial-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.testimonial-btn:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
}

.testimonials-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 1rem;
}

.testimonials-carousel::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    flex: 0 0 calc(33.333% - 1.33rem);
    min-width: 300px;
    background: #fafafa;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-author {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.testimonial-role {
    font-size: 0.85rem;
    color: #999;
}

/* CTA Section */
.cta {
    padding: 6rem 4rem;
    background: var(--primary-color);
    content-visibility: auto;
    contain-intrinsic-size: auto 350px;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-container h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.cta-container p {
    font-size: 1.1rem;
    color: var(--dark-bg);
    opacity: 0.8;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--dark-bg);
    color: var(--white);
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
}

.cta-button:hover {
    background: #333;
    transform: translateY(-2px);
}

.cta-cv {
    background: transparent;
    border: 2px solid var(--dark-bg);
    color: var(--dark-bg);
}

.cta-cv:hover {
    background: var(--dark-bg);
    color: var(--white);
}

/* Footer */
.footer {
    padding: 3rem 4rem;
    background: var(--dark-bg);
    color: var(--white);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.footer-brand .logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: #999;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: #999;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    font-size: 0.85rem;
    color: #666;
    text-align: right;
}

.footer-legal {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.5rem;
}

.footer-legal a {
    color: #555;
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 7rem 2rem 3rem;
        min-height: auto;
        gap: 2.5rem;
    }

    .hero-content {
        align-items: center;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .profile-img {
        width: 300px;
        height: 380px;
    }

    .hero-image-decoration {
        top: -15px;
        right: -15px;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .expertise-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .expertise-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-carousel {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 5.5rem 1.5rem 2.5rem;
        gap: 2rem;
    }

    .hero-title {
        font-size: clamp(2rem, 12vw, 3rem);
    }

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

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }

    .hero-btn {
        justify-content: center;
        width: 100%;
    }

    .profile-img {
        width: 260px;
        height: 330px;
    }

    .hero-image-decoration {
        top: -12px;
        right: -12px;
        border-width: 2px;
    }

    .about,
    .expertise,
    .projects,
    .testimonials,
    .cta {
        padding: 4rem 1.5rem;
    }

    .expertise-cards {
        grid-template-columns: 1fr;
    }

    .projects-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .projects-header h2 {
        font-size: 2rem;
    }

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

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

    .cta-container h2 {
        font-size: 1.75rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .copyright {
        text-align: center;
    }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {

    .about-content,
    .about-images {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .expertise-card,
    .project-card,
    .testimonial-card {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .expertise-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .expertise-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .expertise-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .expertise-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .project-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .project-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .project-card:nth-child(3) {
        animation-delay: 0.3s;
    }
}

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