/* ============================================================
   style.css — Daniela Bazán Portfolio
   ============================================================ */

/* ── FONTS ──────────────────────────────────────────────── */

@font-face {
    font-family: 'acorn';
    src: url('./fonts/acorn.woff') format('woff');
}

@font-face {
    font-family: 'gt';
    src: url('./fonts/gt.woff') format('woff');
}

/* ── TOKENS ─────────────────────────────────────────────── */

:root {
    /* Typography */
    --titleFont: "acorn", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --bodyFont: "gt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

    /* Colors */
    --color-white: hsla(0, 0%, 100%, 1);
    --color-white30: hsla(0, 0%, 100%, .3);
    --color-rust: hsla(22, 62%, 76%, 1);
    --color-babyblue: hsla(206, 84%, 86%, 1);
    --color-backdrop: hsla(158, 23%, 18%, .7);
    --color-primary-border: var(--color-white);
    --color-opaque: hsla(0, 0%, 100%, .5);
    --color-light-border: rgba(0, 0, 0, .1);
    --color-dark-border: rgba(255, 255, 255, .1);

    /* Font scale */
    --font-h1: clamp(3.2rem, .5692rem + 8.238vw, 13.75rem);
    --font-h2: clamp(1.5rem, 1.0982rem + 1.7143vw, 2.8125rem);
    --font-h3: clamp(1.375rem, 1.1837rem + .8163vw, 2rem);
    --font-h4: clamp(1.375rem, 1.1837rem + .8163vw, 1.6rem);
    --font-h5: clamp(1rem, .9235rem + .3265vw, 1.25rem);
    --font-h6: clamp(1rem, .9617rem + .1633vw, 1.125rem);
    --font-body: clamp(1rem, .8852rem + .4898vw, 1.375rem);
    --font-link: clamp(.875rem, .7985rem + .3265vw, 1.125rem);
    --font-mini: clamp(.875rem, .8367rem + .1633vw, 1rem);
    --font-h2-display: clamp(1.875rem, 1.301rem + 2.449vw, 3.95rem);

    /* Base sizes */
    --14px: .875rem;
    --15px: .9375rem;
    --16px: 1rem;
    --17px: 1.0625rem;
    --18px: 1.125rem;
    --19px: 1.1875rem;
    --20px: 1.25rem;
    --21px: 1.3125rem;
    --24px: 1.5rem;
    --42px: 2.652rem;
    --64px: 4rem;

    /* Spacing scale */
    --spacing-xxl: max(130px, calc(130px + (260 - 130) * ((100vw - 375px) / (1600 - 375))));
    --spacing-xl: max(var(--64px), calc(var(--64px) + (128 - 64) * ((100vw - 375px) / (1600 - 375))));
    --spacing-l: max(var(--42px), calc(var(--42px) + (84 - 42) * ((100vw - 375px) / (1600 - 375))));
    --spacing-m: max(var(--24px), calc(var(--24px) + (48 - 24) * ((100vw - 375px) / (1600 - 375))));
    --spacing-s: max(var(--21px), calc(var(--21px) + (42 - 21) * ((100vw - 375px) / (1600 - 375))));
    --spacing-xs: max(var(--14px), calc(var(--14px) + (28 - 14) * ((100vw - 375px) / (1600 - 375))));
    --spacing-xxs: max(calc(var(--14px) / 2), calc((var(--14px) / 2) + (14 - 7) * ((100vw - 375px) / (1600 - 375))));

    /* Misc */
    --max-width: 1600px;
    --shadow-lg: 0px 50px 100px -20px rgba(0, 0, 0, .15);
    --zindex-nav: 1000;
    --radius-base: .75rem;
}

/* Dark theme overrides */
.dark:root {
    --color-white30: hsla(220, 20%, 20%, 0.30);
    --color-backdrop: hsla(210, 30%, 10%, 0.7);
    --color-primary-border: hsla(210, 20%, 30%, 0.3);
    --color-text-primary: rgb(195, 160, 171);
    --color-text-secondary: rgb(249, 245, 236);
    --color-opaque: hsla(210, 20%, 20%, 1);
    --color-light-border: hsla(238, 21%, 46%, 0.3);
}

/* ── RESET & BASE ───────────────────────────────────────── */

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

body,
html {
    position: relative;
    font-family: var(--bodyFont);
    font-size: var(--16px);
    background:
        linear-gradient(to bottom, transparent, hsla(210, 30%, 10%, 0.9) 70%),
        linear-gradient(135deg,
            hsla(210, 20%, 15%, 1),
            hsla(225, 30%, 25%, 1),
            hsla(340, 25%, 40%, 1),
            hsla(40, 10%, 70%, 1));
    background-attachment: fixed;
    background-size: cover;
    color: var(--color-text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--titleFont);
    font-weight: 700;
}

p {
    font-size: var(--font-body);
    line-height: 160%;
    color: var(--color-text-secondary);
}

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

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

a:focus {
    outline: none;
}

/* ── SHARED COMPONENTS ──────────────────────────────────── */

/* Button */
.btn {
    display: inline-block;
    text-decoration: none;
    background: var(--color-opaque);
    color: var(--color-text-primary);
    border-radius: 15px;
    border: .5px solid var(--color-text-primary);
    padding: 10px 15px;
    cursor: pointer;
    font-size: var(--font-link);
    transition: background .2s ease;
}

.btn:hover {
    background: transparent;
}

/* Page title */
.main-title {
    position: relative;
    padding: 6% 0 0;
    letter-spacing: -4px;
    text-align: center;
    font-size: var(--font-h1);
    line-height: 100%;
    font-family: var(--titleFont);
    font-weight: 700;
    margin-bottom: 3%;
    animation: slideDownAppear .2s ease-out;
}

.main-title-span {
    position: relative;
    z-index: 10;
}

.first-line,
.second-line {
    display: flex;
    justify-content: center;
    position: relative;
}

.star {
    position: absolute;
}

/* Description */
.description {
    padding: 0 var(--16px);
    display: flex;
    justify-content: center;
    position: relative;
}

.description-p {
    text-align: center;
    font-size: var(--font-body);
    color: var(--color-text-secondary);
    letter-spacing: -.3px;
    margin: 0;
    max-width: 51ch;
    line-height: 160%;
    animation: slideDownAppear .7s ease-out;
}

/* Content wrapper */
.content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4% 0;
    margin: 0 3%;
    color: var(--color-text-primary);
    animation: slideDownAppear .7s ease-out;
}

/* ── HEADER & NAV ───────────────────────────────────────── */

.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    z-index: var(--zindex-nav);
    transition: background-color .3s ease;
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: var(--max-width);
    padding: 10px 20px;
    margin: var(--20px) auto 0;
    position: relative;
    z-index: var(--zindex-nav);
    backdrop-filter: blur(8px);
}

.nav.scrolled {
    background: var(--color-backdrop);
    border-radius: 50px;
}

.nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-li {
    display: flex;
    position: relative;
}

.main-link {
    position: relative;
    margin: 0 5px;
    padding: calc(var(--16px) - 10px) var(--20px);
    font-size: var(--font-link);
    font-weight: 100;
    color: var(--color-white);
    text-decoration: none;
}

.main-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 100%;
    background-color: transparent;
    border-radius: 20px;
    z-index: -1;
    transition: background-color .2s ease;
}

.main-link.active::before,
.main-link:hover::before {
    background-color: var(--color-dark-border);
}

/* ── FOOTER ─────────────────────────────────────────────── */

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 12%;
    padding: 1rem 0;
    font-size: var(--font-link);
    color: var(--color-text-secondary);
}

.footer-name {
    flex: 1;
    text-align: left;
}

.cr-name {
    font-size: 15px;
}

.footer-links {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    flex: 1;
}

.ft-section {
    list-style: none;
    margin: 0;
}

.ft-tittle {
    color: var(--color-text-primary);
}

.ft-link {
    list-style: none;
    padding: calc(var(--16px) - 6px) 0;
    margin: 1rem;
}

.ft-link:hover {
    color: var(--color-text-primary);
}

/* ── HOME ───────────────────────────────────────────────── */

.star1 {
    top: 0;
    right: 5%;
    transform: translateY(-50%);
}

.star2 {
    bottom: -3.5rem;
    left: 8%;
    transform: translateX(-50%) translateY(50%);
}

.star3 {
    right: 28%;
    transform: translateY(-50%);
}

.animated-icon {
    opacity: 0;
    animation: scaleAppear 1s forwards;
    animation-delay: .5s;
}

.hero-subtitle {
    font-size: 0.9em;
}

.cards-content {
    display: flex;
    gap: 3rem;
    width: 100%;
}

.card-wrap {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    height: 34rem;
    width: 100%;
    background: var(--color-rust);
    border-radius: 64px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
    overflow: hidden;
    transition: transform .2s ease;
}

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

.card1 {
    width: 40%;
    color: hsla(210, 30%, 10%, 0.9);
}

.card2 {
    background: var(--color-babyblue);
    color: hsla(210, 30%, 10%, 0.9);
    width: 60%;
}

.card-info {
    text-align: right;
    padding: 3rem 4rem;
}

.card-info .card-category {
    font-size: var(--15px);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
}

.card-info h2 {
    font-size: var(--font-h2);
    line-height: 130%;
    font-family: var(--titleFont);
    font-weight: 700;
    margin: 0;
}

.card-img-holder {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.card-img-holder img {
    max-width: 80%;
    border-radius: 10px;
    height: auto;
    margin-bottom: 1rem;
}

/* ── ABOUT ──────────────────────────────────────────────── */

.profile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1% 6% 1% 11%;
    gap: 6%;
    animation: slideDownAppear 1s ease-out;
}

.pic-holder {
    flex: 1;
}

.pic-holder img {
    width: 95%;
    height: auto;
    border-top-left-radius: 200px;
    border-top-right-radius: 200px;
}

.profile-p {
    flex: 2;
}

.profile-p h2 {
    margin: var(--spacing-xs) 0;
    font-size: var(--font-h2-display);
    line-height: 110%;
}

.about-text {
    margin: 5% 1.8% 0 25%;
}

.about-text p {
    margin-right: 21%;
}

.values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8%;
    margin: 5%;
    padding: 7% 10% 10%;
    background: var(--color-white30);
    border-radius: var(--64px);
}

.count {
    font-family: var(--titleFont);
    font-size: var(--42px);
    opacity: .5;
}

.value-title {
    font-size: var(--font-h3);
    margin: 7% 0 0;
}

.more-about {
    display: flex;
    flex-direction: column;
    margin: 2% 30%;
}

.about-carousel-track {
    display: flex;
    gap: 2%;
    transition: transform 0.7s ease-in-out;
}

.carousel-slide {
    flex: 0 0 49%;
}

.carousel-slide img {
    width: 100%;
    height: 280px;
    /* altura para mobile */
    object-fit: cover;
    object-position: center;
    /* centrado, ni arriba ni abajo */
    border-radius: var(--18px);
    display: block;
}

@media (min-width: 768px) {
    .carousel-slide img {
        height: 450px;
        /* altura para desktop */
    }
}


/* ── PROJECTS ───────────────────────────────────────────── */

/* Card link — makes the whole card clickable */
.card-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.projects {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.project-wrap {
    flex: 1 1 calc(33.333% - 40px);
    display: flex;
    justify-content: center;
    transition: transform .2s ease;
}

.project-wrap:hover {
    transform: scale(1.05);
}

.card {
    display: flex;
    flex-direction: row;
    box-shadow: 0 0 0 1px var(--color-light-border);
    background-color: var(--color-white30);
    padding: 2rem;
    width: 100%;
    border-radius: 10px;
    gap: 1rem;
    cursor: pointer;
}

.card-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-column:first-child {
    flex: 2;
}

.card-column.image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-row {
    margin: 10px 0;
}

.card-row.title {
    font-size: var(--font-h5);
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
}

.card-row.text {
    flex-grow: 1;
    font-size: var(--font-link);
    color: var(--color-text-secondary);
    line-height: 140%;
}

.card-img {
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--color-light-border);
    height: auto;
    width: 100%;
}

/* ── PROJECT TEMPLATE ───────────────────────────────────── */

.project-title {
    padding-top: 8%;
    margin-bottom: 4%;
}

/* Visit Site button row */
.project-meta {
    display: flex;
    justify-content: center;
    padding: 0 var(--16px);
    margin-bottom: 3%;
    animation: slideDownAppear .7s ease-out;
}

/* Gallery */
.project-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin: 0 5% 4%;
    animation: slideDownAppear .7s ease-out;
}

.gallery-slider {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 1000px;
}

.gallery-track {
    flex: 1;
    overflow: hidden;
    border-radius: var(--18px);
    box-shadow: 0 0 0 1px var(--color-light-border);
    cursor: zoom-in;
}

.gallery-slide {
    display: none;
    position: relative;
}

.gallery-slide.active {
    display: block;
}

.gallery-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    object-position: top;
    display: block;
    border-radius: var(--18px);
    transition: opacity .2s ease;
}

.gallery-track:hover .gallery-img {
    opacity: .92;
}

/* "Click to expand" hint */
.gallery-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-backdrop);
    color: var(--color-text-secondary);
    font-size: var(--font-mini);
    padding: 5px 14px;
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    transition: opacity .2s ease;
}

.gallery-track:hover .gallery-hint {
    opacity: 1;
}

/* Slide counter */
.gallery-counter {
    font-size: var(--font-mini);
    color: var(--color-text-secondary);
    opacity: .6;
}

/* Gallery & lightbox arrows share base styles */
.gallery-arrow,
.lightbox-arrow {
    flex-shrink: 0;
    background: var(--color-opaque);
    color: var(--color-text-secondary);
    border: .5px solid var(--color-text-primary);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background .2s ease;
}

.gallery-arrow:hover,
.lightbox-arrow:hover {
    background: transparent;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: var(--color-backdrop);
    backdrop-filter: blur(20px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    overflow-y: auto;
    max-height: 100vh;
    width: 90%;
    max-width: 1000px;
    padding: 4rem 0 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    scrollbar-width: none;
}

.lightbox-content::-webkit-scrollbar {
    display: none;
}

.lightbox-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--18px);
    box-shadow: 0 0 0 1px var(--color-light-border);
}

.lightbox-close {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 2;
    background: var(--color-opaque);
    color: var(--color-text-secondary);
    border: .5px solid var(--color-text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background .2s ease;
}

.lightbox-close:hover {
    background: transparent;
}

.lightbox-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    flex-shrink: unset;
}

.lightbox-arrow--prev {
    left: 1.2rem;
}

.lightbox-arrow--next {
    right: 1.2rem;
}

body.lightbox-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Project body text */
.project-body {
    max-width: 900px;
    margin: 0 auto 4%;
    padding: 0 var(--16px);
    animation: slideDownAppear .9s ease-out;
}

.project-section {
    margin-bottom: 2.5rem;
}

.project-section-title {
    font-size: var(--font-h3);
    color: var(--color-text-secondary);
    margin: 0 0 .5rem;
}

.project-section p {
    margin: 0;
}

.project-back {
    display: flex;
    justify-content: center;
    margin-bottom: 4%;
}

/* ── NOTES ──────────────────────────────────────────────── */

.notes {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: 68%;
}

.card-column.img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.notes-img {
    border-radius: 50%;
    height: auto;
    width: 45%;
}

.note-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-opaque);
    z-index: 500;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(70px) saturate(1.3);
}

.note-content {
    position: relative;
    margin-top: 10%;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    border-radius: 15px;
    box-shadow: inset 0 0 0 1px var(--color-primary-border), var(--shadow-lg);
    backdrop-filter: blur(70px) saturate(1.3);
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--color-text-primary);
    border: none;
    padding: 10px 13px;
    cursor: pointer;
    border-radius: var(--radius-base);
    backdrop-filter: blur(40px) saturate(1.3);
    background: transparent;
    transition: border .2s ease;
}

.close-btn:hover {
    background: transparent;
    border: 1px solid var(--color-opaque);
}

.note-text {
    display: none;
    padding: 3% 15% 10%;
}

.note-title {
    text-align: center;
    letter-spacing: -2px;
    font-size: var(--font-h2-display);
    color: var(--color-text-secondary);
}

.note-text img {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    border-radius: 15px;
}

/* ── SERVICES ───────────────────────────────────────────── */
 
.services-intro {
    width: 100%;
    margin: 0 auto 5%;
    padding: 0 var(--16px);
    text-align: center;
    animation: slideDownAppear .7s ease-out;
}

.services-intro p {
    margin: 0;
}


.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}


.service-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    background-color: var(--color-white30);
    box-shadow: 0 0 0 1px var(--color-light-border);
    border-radius: 24px;
    padding: 2.5rem;
    min-height: 420px;
    transition: transform .2s ease;
}


.service-card:hover {
    transform: translateY(-5px);
}


.service-header {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}


.service-label {
    font-size: var(--font-mini);
    letter-spacing: 2px;
    opacity: .5;
    margin: 0;
}


.service-title {
    font-size: var(--font-h3);
    line-height: 120%;
    margin: 0;
}


.service-tagline {
    font-size: var(--font-link);
    color: var(--color-text-primary);
    margin: 0;
}


.service-description {
    font-size: var(--font-link);
    line-height: 160%;
    margin: 0;
    flex-grow: 1;
}


.service-includes-label {
    font-size: var(--font-mini);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: .5;
    margin: 0 0 1rem;
}


.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}


.service-list li {
    font-size: var(--font-link);
    line-height: 150%;
    margin-bottom: .4rem;
}


.service-list li::before {
    content: "•";
    margin-right: .6rem;
    opacity: .5;
}


.services-cta {
    width: 70%;
    margin: 6% auto;
    text-align: center;
}


.services-cta p {
    margin-bottom: 2rem;
}



@media (min-width: 48.0625rem) and (max-width: 64rem) {

    .services-grid {
        width: 90%;
    }

}


@media (max-width: 48rem) {

    .services-grid {
        grid-template-columns: 1fr;
        width: 90%;
    }


    .service-card {
        min-height: auto;
        padding: 2rem;
        border-radius: 20px;
    }


    .services-cta {
        width: 90%;
    }

}

/* ── CONTACT ─────────────────────────────────────────────── */

.contact-form {
    width: 80%;
    justify-content: center;
}

.form {
    box-shadow: 0 0 0 1px var(--color-light-border);
    background-color: var(--color-white30);
    border-radius: 64px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

form div {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

label {
    color: var(--color-text-primary);
    margin-top: .5rem;
}

input,
textarea {
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: .8rem;
    font-family: var(--bodyFont);
}

.submit {
    font-family: var(--bodyFont);
    cursor: pointer;
    width: 35%;
    color: var(--color-text-primary);
    border-radius: 15px;
    background-color: var(--color-opaque);
    border: .5px solid var(--color-text-primary);
    padding: 10px 15px;
    margin-top: 1rem;
    transition: background .2s ease;
}

.submit:hover {
    background: transparent;
}

#responseMessage {
    margin: 2rem;
}

/* ── ANIMATIONS ─────────────────────────────────────────── */

@keyframes scaleAppear {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideDownAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* ── MEDIA QUERIES ──────────────────────────────────────── */

/* ── Tablet (48rem–64rem) ── */
@media (min-width: 48.0625rem) and (max-width: 64rem) {

    /* Projects: 2 columns on tablet */
    .project-wrap {
        flex: 1 1 calc(50% - 20px);
    }

    /* Gallery slightly shorter */
    .gallery-img {
        height: 360px;
    }

    /* About adjustments */
    .about-text {
        margin-left: 12%;
    }

    .about-text p {
        margin-right: 10%;
    }

    .more-about {
        margin: 2% 15%;
    }

    /* Contact */
    .contact-form {
        width: 90%;
    }
}

/* ── Mobile (≤48rem) ── */
@media (max-width: 48rem) {

    /* Header */
    .header {
        left: 50%;
        transform: translateX(-50%);
        width: fit-content;
        margin: 0;
    }

    .nav {
        max-width: 100%;
        padding: 10px;
        margin: 1rem;
    }

    .main-link {
        margin: 0;
        padding: .5rem .8rem;
    }

    /* Titles */
    .main-title {
        padding-top: 21%;
        letter-spacing: 0;
    }

    .project-title {
        padding-top: 28%;
    }

    .description-p {
        margin: 16px;
    }

    .animated-icon {
        display: none;
    }

    /* Footer */
    .ft-link {
        margin: 0;
    }

    .cr-name {
        font-size: .5rem;
    }

    /* Home cards */
    .cards-content {
        flex-direction: column;
        align-items: center;
    }

    .card-wrap {
        width: 90%;
        height: 20rem;
        border-radius: 24px;
    }

    .card-info {
        padding: 2rem;
    }

    /* About */
    .profile {
        flex-direction: column;
        padding: 2rem 6% 0 6%;
    }

    .pic-holder img {
        border-radius: 5rem 5rem 0 0;
    }

    .about-text {
        margin: 0;
        padding: 0 6%;
    }

    .about-text p {
        margin: 0;
    }

    .values {
        display: flex;
        flex-direction: column;
        margin: 3%;
        padding: 7% 8% 10%;
        gap: 0;
    }

    .more-about {
        margin: 0;
        padding: 0 6%;
    }

    .about-images {
        flex-direction: column;
        gap: 1rem;
    }

    /* Projects: 1 column on mobile */
    .project-wrap {
        flex: 1 1 100%;
    }

    /* Gallery */
    .gallery-img {
        height: 260px;
    }

    .gallery-arrow,
    .lightbox-arrow {
        width: 36px;
        height: 36px;
        font-size: .9rem;
    }

    .lightbox-arrow--prev {
        left: .5rem;
    }

    .lightbox-arrow--next {
        right: .5rem;
    }

    .lightbox-content {
        width: 95%;
        padding: 3.5rem 0 1.5rem;
    }

    .project-body {
        padding: 0 1rem;
    }

    .project-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    /* Notes */
    .notes {
        width: 95%;
    }

    .notes-img {
        width: 90%;
    }

    /* Contact */
    .contact-form {
        width: 95%;
    }

    .form {
        border-radius: 10px;
        padding: 2rem;
    }

    .submit {
        width: 60%;
    }
}