/* ============================================
   SERGIO RAMOS - PORTFOLIO MINIMALISTA
   Elegante, moderno y responsivo
   ============================================ */

:root {
    --color-bg: #0a0a0a;
    --color-bg-alt: #111111;
    --color-bg-card: #151515;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --color-text-subtle: #555555;
    --color-border: #1a1a1a;
    --color-border-light: #2a2a2a;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-base: 0.4s ease;
    --transition-slow: 0.6s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

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

.section {
    padding: 120px 0;
}

.section__label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.section__title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 48px;
    max-width: 700px;
}

/* ========== Header ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 32px;
    transition: var(--transition-base);
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 32px;
}

.header.menu-open {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
    transition: none;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -1px;
}

.nav__list {
    display: flex;
    gap: 40px;
}

.nav__link {
    font-size: 14px;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: var(--transition-base);
}

.nav__link:hover {
    color: var(--color-text);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 4px;
}

.nav__toggle span {
    width: 24px;
    height: 1.5px;
    background: var(--color-text);
    transition: var(--transition-base);
}

.nav__close {
    display: none;
    position: absolute;
    top: 44px;
    right: 24px;
    font-size: 32px;
    color: var(--color-text);
    cursor: pointer;
}

/* ========== Hero ========== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(10, 10, 10, 0.4) 0%, rgba(10, 10, 10, 0.85) 100%),
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920') center/cover no-repeat;
    transform: scale(1.1);
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

.hero__title {
    font-size: clamp(48px, 12vw, 120px);
    font-weight: 700;
    letter-spacing: -4px;
    line-height: 1;
    margin-bottom: 16px;
}

.hero__subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--color-text-muted);
    font-weight: 400;
    margin-bottom: 48px;
}

.hero__btn {
    display: inline-block;
    padding: 16px 40px;
    border: 1px solid var(--color-text);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition-base);
}

.hero__btn:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.hero__scroll {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.5s;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 1.5px solid var(--color-text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.mouse__wheel {
    width: 3px;
    height: 8px;
    background: var(--color-text-muted);
    border-radius: 2px;
    animation: mouseScroll 2s ease-in-out infinite;
}

@keyframes mouseScroll {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(10px);
        opacity: 0.3;
    }
}

.hero__scroll span {
    font-size: 11px;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========== About ========== */
.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about__text {
    font-size: 18px;
    color: var(--color-text-muted);
    line-height: 1.8;
}

.tech__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tech__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: var(--transition-base);
}

.tech__item:hover {
    border-color: var(--color-border-light);
    transform: translateY(-4px);
}

.tech__item svg {
    width: 32px;
    height: 32px;
    color: var(--color-text);
}

.tech__item span {
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
}

/* ========== Experience ========== */
.experience__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.experience__card {
    padding: 40px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: var(--transition-base);
}

.experience__card:hover {
    border-color: var(--color-border-light);
}

.experience__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.experience__date {
    font-size: 12px;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.experience__company {
    font-size: 24px;
    font-weight: 600;
}

.experience__role {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.experience__description {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.experience__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.experience__tech span {
    font-size: 12px;
    padding: 6px 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-muted);
}

/* ========== Projects Section ========== */
.projects__header {
    text-align: center;
    padding: 80px 24px 48px;
    background: var(--color-bg-alt);
}

.projects__title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
    margin-bottom: 16px;
}

.projects__subtitle {
    font-size: 16px;
    color: var(--color-text-muted);
}

/* ========== Projects Carousel ========== */
.projects__carousel {
    position: relative;
    background: var(--color-bg-alt);
    padding: 0 80px 60px;
}

.carousel__container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
}

.carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease;
}

.carousel__slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.carousel__slide {
    transform: scale(1.1);
}

.slide__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.8) 0%, rgba(10, 10, 10, 0.2) 50%, transparent 100%);
}

.slide__info {
    position: absolute;
    bottom: 32px;
    left: 32px;
    z-index: 2;
}

.slide__number {
    display: inline-block;
    font-size: 14px;
    color: var(--color-text-muted);
    margin-right: 8px;
}

.slide__title-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.slide__title {
    display: inline;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 600;
    position: relative;
}

.slide__title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-text);
    transition: width 0.3s ease;
}

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

.slide__subtitle {
    display: block;
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 8px;
}

/* Carousel Arrows */
.carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-fast);
    color: var(--color-bg);
    cursor: pointer;
}

.carousel__arrow:hover {
    transform: translateY(-50%) scale(1.1);
}

.carousel__arrow--prev {
    left: 20px;
}

.carousel__arrow--next {
    right: 20px;
}

.carousel__arrow svg {
    width: 20px;
    height: 20px;
}

/* Carousel Dots */
.carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel__dot {
    width: 8px;
    height: 8px;
    background: var(--color-border-light);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.carousel__dot.active {
    background: var(--color-text);
    width: 24px;
    border-radius: 4px;
}

/* ========== Infinite Scroll Projects with Overlay Effect ========== */
.scroll-projects {
    position: relative;
}

.scroll-projects .projects__header {
    position: relative;
    z-index: 0;
}

.scroll-project {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Each project stacks on top of the previous (nth-child accounts for header) */
.scroll-project:nth-of-type(1) {
    z-index: 1;
}

.scroll-project:nth-of-type(2) {
    z-index: 2;
}

.scroll-project:nth-of-type(3) {
    z-index: 3;
}

.scroll-project:nth-of-type(4) {
    z-index: 4;
}

.scroll-project:nth-of-type(5) {
    z-index: 5;
}

.scroll-project__bg {
    position: absolute;
    inset: -50px;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transition: transform 0.1s linear;
}

.scroll-project__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.6) 50%, rgba(10, 10, 10, 0.3) 100%);
}

.scroll-project__content {
    position: relative;
    z-index: 2;
    padding: 0 80px;
    max-width: 600px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-project__number {
    display: block;
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.scroll-project__title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 12px;
}

.scroll-project__year {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.scroll-project__desc {
    font-size: 16px;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.scroll-project__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.scroll-project__tech span {
    font-size: 13px;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    color: var(--color-text);
}

/* ========== Click Indicator ========== */
.scroll-project__click-hint {
    position: absolute;
    top: 48px;
    right: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.4s ease;
}

.scroll-project:hover .scroll-project__click-hint {
    opacity: 1;
}

.click-hint__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    animation: pulse 2s ease-in-out infinite;
}

.click-hint__icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-text);
}

.click-hint__text {
    font-size: 14px;
    color: var(--color-text);
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.scroll-project:hover .click-hint__text {
    opacity: 1;
    transform: translateX(0);
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.1);
    }
}

/* Hover micro-interaction */
.scroll-project__click-hint:hover .click-hint__icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    animation: none;
}

/* Cursor pointer for entire project */
.scroll-project {
    cursor: pointer;
}



/* ========== Project Modal ========== */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
}

.modal__container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--color-bg-card);
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.project-modal.active .modal__container {
    transform: translateY(0);
}

.modal__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border: 1px solid var(--color-border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    z-index: 10;
    transition: var(--transition-fast);
}

.modal__close:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.modal__close svg {
    width: 24px;
    height: 24px;
}

.modal__content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    height: 100%;
}

.modal__gallery {
    background: var(--color-bg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gallery__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    min-height: 300px;
}

.gallery__main img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

.gallery__nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gallery__btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.gallery__btn:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.gallery__btn svg {
    width: 18px;
    height: 18px;
}

.gallery__thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    padding: 4px 0;
}

.gallery__thumb {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition-fast);
    flex-shrink: 0;
    border: 2px solid transparent;
}

.gallery__thumb.active {
    opacity: 1;
    border-color: var(--color-text);
}

.gallery__thumb:hover {
    opacity: 1;
}

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

.modal__info {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal__number {
    display: block;
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.modal__title {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 24px;
}

.modal__description {
    font-size: 16px;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 32px;
}

.modal__tech-label {
    font-size: 12px;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.modal__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal__tech span {
    font-size: 13px;
    padding: 8px 18px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    color: var(--color-text);
}

/* ========== Education Section ========== */
.education {
    background: var(--color-bg-alt);
}

.education__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.education__card {
    display: flex;
    gap: 24px;
    padding: 40px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: var(--transition-base);
}

.education__card:hover {
    border-color: var(--color-border-light);
}

.education__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    flex-shrink: 0;
}

.education__icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-text);
}

.education__content {
    flex: 1;
}

.education__date {
    display: inline-block;
    font-size: 12px;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.education__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.education__institution {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.education__description {
    font-size: 14px;
    color: var(--color-text-subtle);
    line-height: 1.6;
}

/* ========== Contact Section - New Design ========== */
.contact {
    background: var(--color-bg);
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact__left {
    max-width: 500px;
}

.contact__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 16px;
}

.contact__text {
    font-size: 16px;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact__methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact__method {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: var(--transition-base);
}

.contact__method:hover {
    border-color: var(--color-border-light);
    transform: translateX(8px);
}

.contact__method-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border-radius: 10px;
    flex-shrink: 0;
}

.contact__method-icon svg {
    width: 22px;
    height: 22px;
    color: var(--color-text);
}

.contact__method-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact__method-label {
    font-size: 12px;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact__method-value {
    font-size: 15px;
    color: var(--color-text);
    font-weight: 500;
}

.contact__right {
    padding-top: 48px;
}

.contact__social-label {
    font-size: 12px;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.contact__social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.contact__social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: var(--transition-base);
    text-align: center;
}

.contact__social-card:hover {
    border-color: var(--color-border-light);
    transform: translateY(-4px);
}

.contact__social-card svg {
    width: 32px;
    height: 32px;
    color: var(--color-text);
}

.contact__social-card span {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* ========== Footer ========== */
.footer {
    padding: 48px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer p {
    font-size: 13px;
    color: var(--color-text-subtle);
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .carousel__slide {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        /* Dynamic viewport height for mobile */
        background: var(--color-bg);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
        z-index: 1000;
        overflow: hidden;
    }

    .nav__menu.active {
        opacity: 1;
        visibility: visible;
    }

    .nav__list {
        display: flex;
        flex-direction: column;
        gap: 32px;
        text-align: center;
        padding: 0;
        margin: 0;
    }

    .nav__link {
        font-size: 24px;
    }

    .nav__toggle {
        display: flex;
        z-index: 1001;
        position: relative;
        transition: opacity 0.3s ease;
    }

    .header.menu-open .nav__toggle {
        opacity: 0;
        pointer-events: none;
    }

    .nav__close {
        display: block;
        position: fixed;
        top: 24px;
        right: 32px;
        z-index: 1002;
    }

    .about .container {
        grid-template-columns: 1fr;
        gap: 64px;
    }

    .tech__grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

    .education__card {
        padding: 24px;
    }

    .carousel__container {
        gap: 16px;
    }

    .carousel__btn {
        width: 44px;
        height: 44px;
    }

    .carousel__btn svg {
        width: 20px;
        height: 20px;
    }

    .slide__content h3 {
        font-size: 22px;
    }

    .panel__content {
        padding: 0 32px;
    }

    .contact__wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact__right {
        padding-top: 0;
    }

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

@media (max-width: 480px) {
    .section {
        padding: 80px 0;
    }

    .hero__title {
        letter-spacing: -2px;
    }

    .tech__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .tech__item {
        padding: 16px 8px;
    }

    .tech__item svg {
        width: 24px;
        height: 24px;
    }

    .tech__item span {
        font-size: 10px;
    }

    .experience__card {
        padding: 24px;
    }

    .education__card {
        flex-direction: column;
        gap: 16px;
    }

    .education__icon {
        width: 48px;
        height: 48px;
    }

    .education__title {
        font-size: 18px;
    }

    .contact__method {
        padding: 16px 20px;
        gap: 16px;
    }

    .contact__method-icon {
        width: 40px;
        height: 40px;
    }

    .contact__social-card {
        padding: 24px 16px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-light);
    border-radius: 4px;
}

::selection {
    background: rgba(255, 255, 255, 0.2);
}