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

:root {
    --maryilu-white: #FFFFFF;
    --maryilu-mist: #EEF5F7;
    --maryilu-steel: #A8BFCA;
    --maryilu-ink: #182028;
    --maryilu-gradient: linear-gradient(135deg, #FFFFFF 0%, #EEF5F7 34%, #A8BFCA 68%, #182028 100%);
    --maryilu-page-gradient: linear-gradient(180deg, #FFFFFF 0%, #EEF5F7 18%, #A8BFCA 44%, #182028 100%);
    --maryilu-gradient-soft: linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(238, 245, 247, 0.56) 42%, rgba(168, 191, 202, 0.24) 74%, rgba(24, 32, 40, 0.08) 100%);
    --text-primary-light: #1c1c1e;
    --text-primary-dark: #ffffff;
    --text-secondary-light: rgba(28, 28, 30, 0.62);
    --text-secondary-dark: rgba(255, 255, 255, 0.78);
    --glass-bg-light: rgba(255, 255, 255, 0.78);
    --glass-bg-dark: rgba(24, 32, 40, 0.22);
    --glass-line-light: rgba(255, 255, 255, 0.72);
    --glass-line-dark: rgba(255, 255, 255, 0.22);
    --shadow-soft: 0 20px 54px rgba(24, 32, 40, 0.14);
    --shadow-strong: 0 26px 70px rgba(24, 32, 40, 0.24);
    --radius-soft: 20px;
    --radius-card: 24px;
}

html {
    min-height: 100%;
    background: var(--maryilu-white);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text-primary-light);
    background: var(--maryilu-page-gradient);
    background-attachment: scroll;
    background-repeat: no-repeat;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
}

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

main {
    display: flow-root;
}

.skip-link {
    position: fixed;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 2000;
    transform: translateY(-160%);
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    color: #ffffff;
    background: var(--maryilu-ink);
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    transform: none;
}

:focus-visible {
    outline: 3px solid rgba(168, 191, 202, 0.46);
    outline-offset: 3px;
}

header {
    position: fixed;
    top: 1rem;
    left: 50%;
    z-index: 1000;
    width: calc(100% - 4rem);
    max-width: 1100px;
    transform: translateX(-50%);
    border: 1px solid var(--glass-line-light);
    border-radius: var(--radius-soft);
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        0 8px 40px rgba(24, 32, 40, 0.12),
        0 2px 8px rgba(24, 32, 40, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(40px) saturate(150%);
    transition: background 240ms ease, box-shadow 240ms ease, transform 240ms ease, border-color 240ms ease;
}

header.scrolled {
    transform: translateX(-50%) translateY(-2px);
    border-color: rgba(168, 191, 202, 0.32);
    background: rgba(255, 255, 255, 0.84);
    box-shadow:
        0 14px 46px rgba(24, 32, 40, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

nav {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.45rem 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.logo img {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(63, 8, 30, 0.16);
}

.logo h1 {
    color: var(--text-primary-light);
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: 0;
}

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

.nav-links a {
    position: relative;
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    color: rgba(28, 28, 30, 0.62);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary-light);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1px;
    transform: translateX(-50%);
    background: var(--maryilu-steel);
    transition: width 200ms ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(24, 32, 40, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
}

.menu-toggle span {
    display: block;
    width: 1.16rem;
    height: 2px;
    margin: 0.26rem auto;
    border-radius: 999px;
    background: var(--text-primary-light);
    transition: transform 180ms ease, opacity 180ms ease;
}

.section-light {
    color: var(--text-primary-light);
}

.section-light h1,
.section-light h2,
.section-light h3 {
    color: var(--text-primary-light);
}

.section-light p {
    color: var(--text-secondary-light);
}

.section-dark {
    color: var(--text-primary-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
    color: var(--text-primary-dark);
}

.section-dark p {
    color: var(--text-secondary-dark);
}

body.dark-scroll header {
    border-color: var(--glass-line-dark);
    background: rgba(24, 32, 40, 0.24);
    box-shadow: var(--shadow-strong);
}

body.dark-scroll .logo h1,
body.dark-scroll .nav-links a {
    color: rgba(255, 255, 255, 0.82);
}

body.dark-scroll .nav-links a:hover,
body.dark-scroll .nav-links a.active {
    color: #ffffff;
}

body.dark-scroll .menu-toggle span {
    background: #ffffff;
}

.hero {
    min-height: 100vh;
    margin-top: 120px;
    padding: 12rem 2rem 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 840px;
    margin: 0 auto;
    animation: fadeUp 0.8s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h2 {
    margin-bottom: 2rem;
    color: var(--text-primary-light);
    font-size: 4.7rem;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.05;
}

.hero-content p {
    max-width: 620px;
    margin: 0 auto 3rem;
    color: rgba(28, 28, 30, 0.62);
    font-size: 1.28rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.cta-button {
    position: relative;
    overflow: hidden;
    min-width: 160px;
    display: inline-flex;
    min-height: 4rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 18px;
    padding: 0 2rem;
    color: var(--text-primary-light);
    background: rgba(255, 255, 255, 0.22);
    box-shadow:
        0 6px 25px rgba(24, 32, 40, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(30px) saturate(150%);
    font-size: 1rem;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
    transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.cta-button::before,
.filter-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transition: left 0.55s ease;
}

.cta-button:hover::before,
.filter-btn:hover::before,
.filter-btn.active::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.32);
    box-shadow: var(--shadow-strong);
}

.cta-button-secondary {
    background: rgba(255, 255, 255, 0.15);
}

.gallery {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem 2rem;
    background: transparent;
}

.gallery h2,
.poetry h2,
.about h2,
.contact h2 {
    margin-bottom: 1rem;
    font-size: 3.3rem;
    font-weight: 620;
    letter-spacing: 0;
    text-align: center;
}

.section-subtitle {
    max-width: 640px;
    margin: 0 auto 2rem;
    text-align: center;
    font-size: 1.05rem;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.filter-btn {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    color: rgba(28, 28, 30, 0.68);
    background: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 4px 18px rgba(24, 32, 40, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(25px) saturate(140%);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 200ms ease, background 200ms ease, color 200ms ease;
}

.filter-btn:hover,
.filter-btn.active {
    transform: translateY(-2px);
    color: var(--text-primary-light);
    background: rgba(255, 255, 255, 0.28);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.artwork,
.poem-card,
.contact-info,
.about-content {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 8px 32px rgba(24, 32, 40, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(35px) saturate(140%);
}

.artwork {
    min-height: 620px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: transform 260ms ease, background 260ms ease, box-shadow 260ms ease;
}

.artwork:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-strong);
}

.artwork-image {
    position: relative;
    height: 360px;
    overflow: hidden;
    background: var(--maryilu-gradient-soft);
}

.artwork-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 280ms ease;
}

.artwork:hover .artwork-image img {
    transform: scale(1.04);
}

.artwork-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    color: rgba(24, 32, 40, 0.62);
    text-align: center;
    font-weight: 700;
}

.artwork-content {
    display: grid;
    gap: 1rem;
    flex: 1;
    padding: 1.5rem;
}

.artwork h3 {
    color: var(--text-primary-light);
    font-size: 1.45rem;
    font-weight: 650;
    letter-spacing: 0;
}

.artwork-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.artwork-meta span {
    border: 1px solid rgba(24, 32, 40, 0.12);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    color: rgba(28, 28, 30, 0.64);
    background: rgba(255, 255, 255, 0.24);
    font-size: 0.78rem;
    font-weight: 700;
}

.artwork-description {
    color: rgba(28, 28, 30, 0.68);
}

.artwork-actions {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
}

.artwork-actions a,
.artwork-actions button,
.text-link {
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    color: inherit;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.no-artworks {
    grid-column: 1 / -1;
    border-radius: var(--radius-card);
    padding: 2rem;
    color: rgba(28, 28, 30, 0.7);
    background: rgba(255, 255, 255, 0.32);
    text-align: center;
}

.poetry,
.about,
.contact {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem 2rem;
    background: transparent;
}

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

.poem-card {
    padding: 2rem;
    color: #ffffff;
}

.poem-card h3 {
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 1.4rem;
}

.poem-content {
    margin-bottom: 1.25rem;
    font-size: 1.08rem;
    font-style: italic;
}

.poem-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

.about-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.about-content p {
    margin-top: 1rem;
}

.about-content .text-link {
    display: inline-flex;
    margin-top: 1.5rem;
}

.contact-info {
    max-width: 650px;
    margin: 2rem auto 0;
    padding: 2rem;
}

.contact-info p {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
}

.contact-info p:last-child {
    border-bottom: 0;
}

.contact-info a,
footer a {
    color: #ffffff;
    font-weight: 750;
    text-underline-offset: 0.24em;
}

footer {
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.artwork-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    place-items: center;
    padding: 2rem;
    background: rgba(24, 32, 40, 0.72);
    backdrop-filter: blur(14px);
}

.artwork-modal-overlay.open {
    display: grid;
}

.artwork-modal {
    width: min(920px, 100%);
    max-height: min(760px, 88vh);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-strong);
}

.artwork-modal img {
    width: 100%;
    max-height: 55vh;
    object-fit: cover;
}

.artwork-modal-content {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
}

.modal-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(24, 32, 40, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    header {
        width: calc(100% - 1.25rem);
        border-radius: 16px;
    }

    nav {
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: calc(100% + 0.65rem);
        left: 0;
        right: 0;
        display: none;
        grid-template-columns: 1fr;
        gap: 0;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.54);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: var(--shadow-soft);
    }

    .nav-links.open {
        display: grid;
    }

    .nav-links a {
        min-height: 3.25rem;
        padding: 0 1rem;
        color: var(--text-primary-light);
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .hero {
        margin-top: 90px;
        padding: 8rem 1rem 6rem;
    }

    .hero-content h2 {
        font-size: 3.7rem;
    }

    .hero-content p {
        font-size: 1.12rem;
    }

    .gallery h2,
    .poetry h2,
    .about h2,
    .contact h2 {
        font-size: 2.7rem;
    }

    .hero-actions,
    .artwork-actions {
        flex-direction: column;
    }

    .cta-button,
    .artwork-actions a,
    .artwork-actions button {
        width: 100%;
    }

    .gallery,
    .poetry,
    .about,
    .contact {
        padding: 5.5rem 1rem;
    }

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

    .artwork {
        min-height: auto;
    }

    .artwork-image {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.25rem;
    }

    .hero-content h2 {
        font-size: 2.6rem;
    }

    .gallery h2,
    .poetry h2,
    .about h2,
    .contact h2 {
        font-size: 2.25rem;
    }

    .gallery-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.portfolio-custom-section {
    display: grid;
    grid-template-columns: minmax(15rem, 0.75fr) minmax(0, 1fr);
    gap: clamp(1.2rem, 4vw, 3rem);
    align-items: center;
    padding: 6rem clamp(1rem, 4vw, 4rem);
}

.portfolio-custom-media {
    min-height: clamp(18rem, 34vw, 30rem);
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.68);
    font-weight: 900;
}

.portfolio-custom-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portfolio-custom-copy h2 {
    margin: 0 0 1rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 0.95;
}

.portfolio-custom-copy p {
    margin: 0;
    max-width: 44rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
}

.portfolio-photo-box-section {
    grid-template-columns: minmax(0, 1fr);
}

.portfolio-photo-box-section .portfolio-custom-media {
    min-height: clamp(20rem, 54vw, 42rem);
}

.portfolio-text-box-section {
    grid-template-columns: minmax(0, 1fr);
}

.portfolio-text-box-section .portfolio-custom-copy {
    max-width: 58rem;
}

@media (max-width: 820px) {
    .portfolio-custom-section {
        grid-template-columns: 1fr;
        padding: 5rem 1rem;
    }
}
