@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600&display=swap');

:root {
    --bg: #080b05;
    --border: rgba(222, 191, 123, 0.22);
    --text: #ece6d9;
    --muted: #bdb4a4;
    --accent: #d7b06a;
    --bg-image: url('../images/backgroundIduna.png');
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%),
        var(--bg-image);
    background-repeat: no-repeat, repeat-y;
    background-size: 100% 100%, 100% auto;
    background-position: center top, center top;
}

body.home-page,
body.projects-page,
body.contact-page {
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.62) 100%),
        var(--bg-image);
}

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

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: #e7c383;
}

.container {
    width: min(980px, calc(100% - 3rem));
    margin: 0 auto;
}

.top-nav {
    padding: 1.1rem 0;
    position: relative;
    z-index: 20;
}

.nav-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1.7rem, 5vw, 3.8rem);
}

.nav-link {
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: color 180ms ease;
}

.nav-link.is-active,
.nav-link:hover,
.nav-link:focus-visible {
    color: var(--accent);
}

.home-name {
    padding-top: clamp(1.5rem, 3.2vw, 2.6rem);
    padding-bottom: clamp(3rem, 4.5vw, 4.4rem);
}

.home-name h1 {
    margin: 0;
    font-size: clamp(2rem, 5.3vw, 4.3rem);
    font-weight: 500;
    line-height: 0.95;
    color: var(--accent);
    text-align: left;
    letter-spacing: 0.04em;
    position: relative;
    left: clamp(-6.8rem, -9vw, -5rem);
}

body.home-page #about.section {
    padding-top: clamp(1rem, 2.2vw, 1.7rem);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:is(.section-label, .section-separator) {
    width: min(1100px, calc(100% - 3rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-label {
    opacity: 0.85;
}

:is(.section-label, .section-separator)::before,
:is(.section-label, .section-separator)::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(to right, transparent, rgba(215, 176, 106, 0.5));
}

:is(.section-label, .section-separator)::after {
    background: linear-gradient(to left, transparent, rgba(215, 176, 106, 0.5));
}

.section-label span {
    color: var(--accent);
    font-family: 'Cinzel', Georgia, serif;
    letter-spacing: 0.22em;
    font-size: 0.88rem;
}

.page-main,
.section {
    padding: clamp(2.25rem, 5vw, 4rem) 0;
}

body.projects-page .page-main,
body.contact-page .page-main {
    padding-top: clamp(1.2rem, 2.8vw, 2rem);
}

body.contact-page {
    display: flex;
    flex-direction: column;
}

body.contact-page .page-main {
    flex: 1 0 auto;
    padding-bottom: clamp(0.8rem, 1.9vw, 1.35rem);
}

body.contact-page .section {
    padding: clamp(1rem, 2.2vw, 1.7rem) 0;
}

.home-main .section.container {
    text-align: center;
}

.page-intro {
    text-align: center;
}

h1,
h2,
h3 {
    margin: 0 0 0.8rem;
    font-family: 'Cinzel', Georgia, serif;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.15rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
}

h2 {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    margin-bottom: 1.35rem;
}

h3 {
    font-size: clamp(1.32rem, 3vw, 1.85rem);
}

p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.15rem);
}

body.home-page .home-about-copy {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.section-separator {
    color: var(--accent);
    opacity: 0.7;
}

.section-separator span {
    width: 7px;
    height: 7px;
    border: 1px solid rgba(215, 176, 106, 0.75);
    transform: rotate(45deg);
}

.project-card {
    display: flex;
    align-items: stretch;
    gap: clamp(1rem, 2.4vw, 1.8rem);
    padding: clamp(1.25rem, 2.9vw, 2.5rem);
    border-radius: 0;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    background-clip: border-box;
    background-origin: border-box;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
    transition: background 180ms ease, box-shadow 180ms ease;
    margin-bottom: 1.1rem;
}

.project-media {
    width: clamp(250px, 34vw, 430px);
    height: calc(clamp(250px, 34vw, 430px) * 9 / 16);
    object-fit: cover;
    object-position: center;
    filter: brightness(0.9) contrast(0.95) grayscale(0.2);
    display: block;
    border-radius: 0;
    border: 1px solid #000;
    box-shadow: inset 0 0 110px rgba(9, 20, 42, 0.56);
    flex-shrink: 0;
}

.project-card h3 {
    color: var(--accent);
    font-size: clamp(1.18rem, 2.3vw, 1.52rem);
    font-weight: 500;
    transition: color 180ms ease;
}

.project-card h3 a {
    color: inherit;
}

.project-card-link {
    display: inline-block;
}

.project-card > .project-card-link {
    display: block;
    width: clamp(250px, 34vw, 430px);
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}

.project-card > .project-card-link .project-media {
    width: 100%;
    height: 100%;
}

.project-card:hover .project-media,
.project-card:focus-within .project-media {
    border-color: #fff;
    filter: none;
}

.project-card:hover,
.project-card:focus-within {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.63)  0%, rgba(0, 0, 0, 0.34) 100%);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.42);
}

.project-card:hover h3,
.project-card:focus-within h3 {
    color: #fff;
}

#featured-projects .projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

#featured-projects .projects-grid .project-card {
    margin-bottom: 0;
    border-color: rgba(222, 191, 123, 0.14);
}

body.projects-page .project-card,
body.contact-page .project-card {
    border-color: rgba(222, 191, 123, 0.14);
}

body.projects-page .page-intro h1,
body.contact-page .page-intro h1 {
    color: var(--accent);
}

body.projects-page .page-main {
    width: min(1100px, calc(100% - 3rem));
}

body.projects-page .project-list {
    width: 100%;
    padding-bottom: clamp(0.35rem, 1vw, 0.8rem);
}

body.projects-page .project-list .project-card {
    width: 100%;
    margin-bottom: 0;
    padding-top: clamp(1.7rem, 3.5vw, 3rem);
    padding-bottom: clamp(1.7rem, 3.5vw, 3rem);
    padding-left: max(1.2rem, calc((100% - min(980px, calc(100% - 3rem))) / 2));
    padding-right: max(1.2rem, calc((100% - min(980px, calc(100% - 3rem))) / 2));
}

body.projects-page .project-list .project-media,
body.projects-page .project-list .project-card > .project-card-link {
    width: clamp(280px, 36vw, 470px);
}

body.projects-page .project-list .project-media {
    height: calc(clamp(280px, 36vw, 470px) * 9 / 16);
}

body.projects-page .project-list .project-card h3 {
    font-size: clamp(1.26rem, 2.5vw, 1.68rem);
}

body.projects-page .project-list .project-card p {
    font-size: clamp(1.03rem, 2.3vw, 1.19rem);
}

#featured-projects .projects-grid .project-card {
    flex-direction: column;
}

#featured-projects .projects-grid .project-media {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

#featured-projects .projects-grid .project-card > .project-card-link {
    width: 100%;
}

.project-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
}

.project-tags {
    color: #d9d1c3;
    font-size: 0.96rem;
    letter-spacing: 0.01em;
}

.button-link {
    width: fit-content;
    margin-top: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(215, 176, 106, 0.8);
    border-radius: 6px;
    color: var(--accent);
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button-link:hover,
.button-link:focus-visible {
    background: rgba(215, 176, 106, 0.13);
    border-color: #e7c383;
    color: #f0cf95;
}

body.contact-page .contact-links-section {
    display: flex;
    justify-content: center;
    margin-top: clamp(1rem, 2.5vw, 2rem);
}

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.95rem;
    margin-top: clamp(1rem, 2.5vw, 2rem);
}

body.contact-page .contact-action {
    margin-top: 0;
    min-width: 190px;
    padding: 0.72rem 1.5rem;
    font-size: 1.1rem;
    text-align: center;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: clamp(2rem, 5vw, 4rem);
}

body.contact-page .site-footer {
    margin-top: 0.75rem;
}

body.projects-page .site-footer {
    margin-top: clamp(0.35rem, 1vw, 0.8rem);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.85rem;
    padding: 1.2rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

body.contact-page .footer-inner {
    padding: 0.75rem 0;
}

.footer-inner > span {
    grid-column: 2;
    justify-self: center;
    text-align: center;
}

@media (max-width: 900px) {
    body {
        background-size: 100% 100%, 100% auto;
    }

    .project-card {
        flex-direction: column;
    }

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

    .project-media {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .section,
    .page-main {
        padding: 2.1rem 0;
    }

    .home-name h1 {
        text-align: center;
        left: 0;
    }

    .footer-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}