﻿/* ========================================
   SECTIONS - Portfolio Pedro Picoli
   ======================================== */

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: var(--z-content);
}

.hero__content {
    position: relative;
    max-width: 700px;
    padding-left: clamp(var(--space-6), 8vw, var(--space-32));
}

.hero__greeting {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

.hero__title {
    font-size: var(--text-5xl);
    font-weight: var(--font-weight-black);
    margin-bottom: var(--space-4);
    line-height: 1.2;
    /* Allow wrapping on mobile */
    /* Force GPU rendering to prevent shifts */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.hero__name {
    display: inline-block;
    font-size: clamp(3.5rem, 8vw, 8rem);
    /* Much larger font */
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    /* Force GPU rendering */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    /* Keep name in one line */
}

.hero__subtitle {
    margin-bottom: var(--space-0);
}

.hero__role {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    white-space: nowrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.2s;
    /* Moved delay up */
}

.hero__tagline {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-10);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.8s;
}

.hero__cta {
    display: flex;
    gap: var(--space-4);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 1s;
}

.hero__visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 40vw;
    max-width: 14.5vw;
    /* Was 500px - now scales with viewport width */
    pointer-events: none;
    background: none !important;
    /* Force transparency */
}

.hero__wireframe {
    width: 100%;
    height: auto;
    opacity: 0.7;
    filter: drop-shadow(0 0 30px var(--color-accent-glow));
    background: transparent !important;
    /* Force transparency */
}

.hero__scroll {
    position: absolute;
    bottom: var(--space-10);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.5s;
}

/* === About Section === */
.about {
    position: relative;
    padding-block: var(--section-padding);
    background: var(--color-bg-secondary);
    z-index: var(--z-content);
    min-height: 100vh;
}

/* Face Image - Fixed Left - LARGER */
.about__face-image {
    position: absolute;
    left: 8%;
    top: 47%;
    transform: translateY(-50%);
    width: 45vw;
    max-width: 2000px;
    z-index: 1;
    opacity: 0.88;
}

.about__face-image img {
    width: 90%;
    height: 62.5vh;
    /* Was 900px - now scales with viewport height */
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.4));
}

.about__container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 80vh;
}

.about__content {
    max-width: 550px;
    padding-left: var(--space-8);
    text-align: left;
}

.about__text {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-10);
    padding: var(--space-6);
    background: var(--color-bg-glass);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
}


/* === Timeline / Trajetória === */
.about__timeline {
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
    position: relative;
    padding-left: var(--space-6);
    border-left: 2px solid rgba(99, 102, 241, 0.3);
}

.about__timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -2px;
    width: 2px;
    background: linear-gradient(to bottom,
            transparent,
            var(--color-accent-primary),
            var(--color-accent-tertiary),
            transparent);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: var(--space-8);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(var(--space-6) * -1 - 6px);
    top: 6px;
    /* Alinhar com o ano/titulo */
    width: 12px;
    height: 12px;
    background: var(--color-accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent-primary);
    z-index: 2;
}

.timeline-year {
    display: block;
    font-family: var(--font-mono);
    color: var(--color-accent-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
    font-weight: var(--font-weight-medium);
}

.timeline-title {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.timeline-desc {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    font-size: var(--text-base);
}

/* === Skills Section (Orbits) === */
.skills {
    position: relative;
    padding-block: var(--section-padding);
    background: var(--color-bg-primary);
    z-index: var(--z-content);
    overflow: hidden;
    min-height: 100vh;
}

/* Body Image - Fixed Left - ALIGNED WITH FACE */
.skills__body-image {
    position: absolute;
    left: 9%;
    /* Same as face */
    top: 23%;
    width: 45vw;
    /* Same as face */
    max-width: 2000px;
    z-index: 1;
    opacity: 0.88;
}

.skills__body-image img {
    width: 90%;
    height: 62.5vh;
    /* Was 900px - now scales with viewport height */
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.4));
}

.skills__container {
    text-align: center;
    padding-top: var(--space-8);
    position: relative;
    z-index: 2;
    /* Above body image */
}

@media (min-width: 1024px) {
    .skills__container {
        padding-left: 30vw;
        /* Move content right to balance with body image */
    }
}

/* Larger orbits, centered, moved down */
.skills__orbits {
    position: relative;
    width: 600%;
    max-width: 932px;
    /* 600px * 1.22 = 732px */
    aspect-ratio: 1;
    margin: var(--space-12) auto 0;
    /* More space from top */
}

.orbit__center {
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
    width: 8.5vh;
    /* Was 122px - now scales with viewport */
    height: 8.5vh;
    /* Was 122px - now scales with viewport */
    z-index: 10;
}

.orbit__photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-accent-primary);
    box-shadow: var(--shadow-glow);
    animation: rotatePhoto 20s linear infinite;
}

@keyframes rotatePhoto {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.orbit__text {
    display: none;
    /* Removed */
}

.orbit {
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
    border: 1px dashed var(--color-border);
    border-radius: 50%;
}

.orbit--1 {
    width: 50%;
    height: 50%;
    animation: rotateOrbit 20s linear infinite;
}

.orbit--2 {
    width: 72%;
    height: 72%;
    animation: rotateOrbit 30s linear infinite reverse;
}

.orbit--3 {
    width: 94%;
    height: 94%;
    animation: rotateOrbit 40s linear infinite;
}

.orbit__icon {
    position: absolute;
    width: 36px;
    /* Reduced from 48px */
    height: 36px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-1);
    transition: all var(--duration-normal) var(--ease-out);
}

.orbit__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hover effect removed */

/* Orbit 1 - 6 items */
.orbit--1 .orbit__icon:nth-child(1) {
    left: 50.00%;
    top: 0.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 20s linear infinite reverse;
}

.orbit--1 .orbit__icon:nth-child(2) {
    left: 93.30%;
    top: 25.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 20s linear infinite reverse;
}

.orbit--1 .orbit__icon:nth-child(3) {
    left: 93.30%;
    top: 75.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 20s linear infinite reverse;
}

.orbit--1 .orbit__icon:nth-child(4) {
    left: 50.00%;
    top: 100.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 20s linear infinite reverse;
}

.orbit--1 .orbit__icon:nth-child(5) {
    left: 6.70%;
    top: 75.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 20s linear infinite reverse;
}

.orbit--1 .orbit__icon:nth-child(6) {
    left: 6.70%;
    top: 25.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 20s linear infinite reverse;
}

/* Orbit 2 - 10 items */
.orbit--2 .orbit__icon:nth-child(1) {
    left: 50.00%;
    top: 0.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(2) {
    left: 79.39%;
    top: 9.55%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(3) {
    left: 97.55%;
    top: 34.55%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(4) {
    left: 97.55%;
    top: 65.45%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(5) {
    left: 79.39%;
    top: 90.45%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(6) {
    left: 50.00%;
    top: 100.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(7) {
    left: 20.61%;
    top: 90.45%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(8) {
    left: 2.45%;
    top: 65.45%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(9) {
    left: 2.45%;
    top: 34.55%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

.orbit--2 .orbit__icon:nth-child(10) {
    left: 20.61%;
    top: 9.55%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 30s linear infinite;
}

/* Orbit 3 - 14 items */
.orbit--3 .orbit__icon:nth-child(1) {
    left: 50.00%;
    top: 0.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(2) {
    left: 71.69%;
    top: 4.95%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(3) {
    left: 89.09%;
    top: 18.83%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(4) {
    left: 98.75%;
    top: 38.87%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(5) {
    left: 98.75%;
    top: 61.13%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(6) {
    left: 89.09%;
    top: 81.17%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(7) {
    left: 71.69%;
    top: 95.05%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(8) {
    left: 50.00%;
    top: 100.00%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(9) {
    left: 28.31%;
    top: 95.05%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(10) {
    left: 10.91%;
    top: 81.17%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(11) {
    left: 1.25%;
    top: 61.13%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(12) {
    left: 1.25%;
    top: 38.87%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(13) {
    left: 10.91%;
    top: 18.83%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

.orbit--3 .orbit__icon:nth-child(14) {
    left: 28.31%;
    top: 4.95%;
    transform: translate(-50%, -50%);
    animation: rotateIcon 40s linear infinite reverse;
}

@keyframes rotateIcon {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotateOrbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotateText {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* === Platforms Section (Physics) === */
.platforms {
    position: relative;
    padding-block: var(--section-padding);
    background: var(--color-bg-secondary);
    z-index: var(--z-content);
}

.platforms__container {
    text-align: center;
}

.platforms__canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 400px;
    margin: var(--space-8) auto 0;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

#platforms-canvas {
    width: 100%;
    height: 100%;
}

/* === Projects Section === */
.projects {
    position: relative;
    padding-block: var(--section-padding);
    background: var(--color-bg-primary);
    z-index: var(--z-content);
}

.projects__container {
    text-align: center;
}

.projects__carousel {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-10);
}

.projects__carousel-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.projects__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-8);
    text-align: left;
    padding-bottom: var(--space-2);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projects__grid .project-card {
    flex: 0 0 calc(33.333% - calc(var(--space-8) * 2 / 3));
    min-width: 300px;
    max-width: 420px;
}

/* Mobile: ensure cards have space */
@media (max-width: 768px) {
    .projects__grid .project-card {
        min-width: 100%;
        /* Take full width of container */
        max-width: 100%;
    }
}

.projects__nav {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
    color: var(--color-text-primary);
}

.projects__nav:hover:not(:disabled) {
    background: var(--color-bg-tertiary);
    border-color: var(--color-accent-primary);
    transform: scale(1.05);
}

.projects__nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

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

/* === Contact Section === */
.contact {
    position: relative;
    padding-block: var(--section-padding);
    min-height: 80vh;
    display: flex;
    align-items: center;
    z-index: var(--z-content);
    overflow: hidden;
}

.contact__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-primary) 50%, var(--color-accent-primary) 200%);
    opacity: 0.5;
}

.contact__container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact__header {
    margin-bottom: var(--space-10);
}

.contact__title {
    font-size: var(--text-4xl);
}

.contact__text {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
}

/* Contact Form */
.contact__form-wrapper {
    width: 100%;
    background: var(--color-bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    text-align: left;
}

.form__label {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
}

.form__input,
.form__textarea {
    width: 100%;
    padding: var(--space-4);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--text-base);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.form__input:focus,
.form__textarea:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
}

.form__input::placeholder,
.form__textarea::placeholder {
    color: var(--color-text-muted);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: var(--space-4) 0;
}

.form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
}

.form__submit svg {
    transition: transform var(--duration-fast) var(--ease-out);
}

.form__submit:hover svg {
    transform: translateX(4px);
}

.form__disclaimer {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-2);
}

/* === Footer === */
.footer {
    padding: var(--space-8);
    text-align: center;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-primary);
    z-index: var(--z-content);
}

.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.footer__social {
    display: flex;
    gap: var(--space-4);
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-text-muted);
    transition: color var(--duration-fast) var(--ease-out);
}

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

.footer__text {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* === Responsive === */
@media (max-width: 1024px) {

    .about__face-image,
    .skills__body-image {
        display: none;
    }

    .about__container {
        justify-content: center;
    }

    .about__content {
        max-width: 100%;
        padding-left: 0;
        text-align: center;
    }

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

/* Hide hero visual, about face, and skills body on narrow screens (tablets, vertical monitors) */
@media (max-width: 1200px) {
    .hero__visual {
        display: none;
    }

    .about__face-image,
    .skills__body-image {
        display: none;
    }

    /* Center about content when face image is hidden */
    .about__container {
        justify-content: center;
    }

    .about__content {
        max-width: 100%;
        text-align: center;
    }

    /* Center skills content when body image is hidden */
    .skills__container {
        justify-content: center;
    }
}

@media (max-width: 768px) {

    .hero__content {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
        text-align: center;
    }

    .hero__name {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero__cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav__menu {
        display: none;
    }

    /* Skills section */
    .skills__orbits {
        max-width: 280px;
        margin: 0 auto;
        /* Center the orbit on mobile */
    }

    /* Center orbit and orbit__center on mobile only */
    .orbit,
    .orbit__center {
        left: 50% !important;
    }

    /* Prevent orbit from changing size on scroll */
    .skills__orbits {
        transform: none !important;
    }

    .orbit__icon {
        width: 28px;
        height: 28px;
    }

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

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

    /* Platforms/Aquarium adjustments */
    .platforms__canvas-wrapper {
        height: 400px !important;
    }

    /* Education cards */
    .education__grid {
        grid-template-columns: 1fr;
    }

    /* Contact form */
    .contact__form {
        padding: var(--space-6);
    }

    /* Captcha responsive fix */
    .h-captcha,
    .h-captcha iframe {
        max-width: 100% !important;
        width: 100% !important;
        transform-origin: 0 0;
    }

    /* Modal adjustments */
    .modal {
        padding: var(--space-4);
    }

    .modal-content {
        max-width: 95%;
        max-height: 85vh;
    }

    .modal-close {
        top: var(--space-2);
        right: var(--space-4);
        font-size: 32px;
    }
}

/* === Extra Small Devices (phones, 480px and down) === */
@media (max-width: 480px) {

    /* Hero section */
    .hero__name {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero__role {
        font-size: var(--text-lg);
    }

    .hero__tagline {
        font-size: var(--text-base);
    }

    .hero__cta {
        flex-direction: column;
        width: 100%;
    }

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

    /* About section */
    .about__text {
        font-size: var(--text-sm);
    }

    .about__stat-number {
        font-size: var(--text-3xl);
    }

    .about__stat-label {
        font-size: var(--text-xs);
    }

    /* Skills section */
    .skills__orbits {
        max-width: 240px;
        margin: 0 auto;
        /* Center on small screens */
    }

    /* Ensure orbit stays centered on very small screens */
    .orbit,
    .orbit__center {
        left: 50% !important;
    }

    .orbit__icon {
        width: 24px;
        height: 24px;
    }

    /* Platforms section */
    .platforms__canvas-wrapper {
        height: 350px !important;
    }

    /* Projects section */
    .project__card {
        padding: var(--space-4);
    }

    .project__title {
        font-size: var(--text-lg);
    }

    .project__description {
        font-size: var(--text-sm);
    }

    /* Education section */
    .education__card {
        padding: var(--space-4);
    }

    .education__logo {
        width: 40px;
        height: 40px;
    }

    .education__title {
        font-size: var(--text-base);
    }

    /* Contact form */
    .contact__form {
        padding: var(--space-4);
    }

    .form__input,
    .form__textarea {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Section titles */
    .section-title {
        font-size: var(--text-3xl);
    }

    .section-label {
        font-size: var(--text-xs);
    }
}

/* === Education Section === */
.education {
    position: relative;
    padding-block: var(--section-padding);
    background: var(--color-bg-secondary);
    z-index: var(--z-content);
}

.education__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-10);
}

.education__card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--duration-normal) var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    position: relative;
    overflow: hidden;
}

.education__card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-primary);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.1);
}

.education__header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.education__logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: white;
    border-radius: var(--radius-md);
    padding: 4px;
}

.education__logo--fill {
    object-fit: cover;
    background: transparent;
    padding: 0;
}

.education__logo--unisc {
    object-fit: contain;
    padding: 2px;
    background: white;
}

.education__info {
    flex: 1;
}

.education__institution {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
    font-family: var(--font-mono);
}

.education__degree {
    font-size: var(--text-2xl);
    /* Increased size slightly */
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-top: auto;
    text-align: center;
    width: 100%;
}

.education__title {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    line-height: var(--line-height-snug);
}

.education__credential-btn {
    margin-top: auto;
    background: transparent;
    border: 1px solid var(--color-accent-primary);
    color: var(--color-accent-primary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--duration-fast);
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

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

.education__credential-btn i {
    font-size: 0.9em;
}

/* === Certificate Modal === */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow-lg);
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-8);
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

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

/* === Certificates Status Styles === */
.education__degree--paused {
    /* Gold/Amber */
    padding: 10px 8px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    margin-top: 24px;
}

/* ========================================
   16:9 ASPECT RATIO ADJUSTMENTS
   (Standard monitors - NOT ultrawide 21:9)
   ======================================== */

/*
  Target: Standard 16:9 monitors (aspect ratio ~1.78)
  Purpose: Adjust positioning for narrower screens
  Note: Height values now use vh in base styles, so no height overrides needed
*/
@media (max-aspect-ratio: 2/1) and (min-width: 1200px) {

    /* === HERO SECTION === */
    /* Keep character on RIGHT - same as 21:9, just adjust size */
    .hero__visual {
        right: -6%;
        /* Move slightly more right than base 5% */
        width: 25vw;
        max-width: 20vw;
    }

    /* === ABOUT SECTION === */
    /* Adjust face image position for 16:9 */
    .about__face-image {
        width: 45vw;
        left: 10%;
    }

    /* No height override needed - base uses 62.5vh */

    /* === SKILLS SECTION === */
    /* Orbit should stay similar size proportionally */
    .skills__orbits {
        width: 35vw;
        /* Reduced from 55vw */
        max-width: 55vw;
        /* Reduced from 65vw */
        margin: var(--space-12) auto 0;
    }

    .orbit__icon {
        width: 3.5vh;
        /* Slightly larger icons */
        height: 3.5vh;
    }

    .orbit__center {
        left: 50%;
        /* Center the photo */
    }

    .orbit {
        left: 50%;
        /* Center each orbit ring */
    }

    /* Adjust body image position for 16:9 */
    .skills__body-image {
        width: 45vw;
        left: 10%;
    }

    /* No height override needed - base uses 62.5vh */

    /* Adjust content padding */
    .skills__container {
        padding-left: 40vw;
    }

    /* Shift navigation menu to the left for standard monitors */
    .nav__menu {
        margin-right: 5vw;
    }
}