/* --- Global Resets & Variables --- */
:root {
    --font-heading: 'Inknut Antiqua', serif;
    --font-body: 'acumin-pro', sans-serif;
    --color-text: #ffffff;
    --color-bg: #000000;
    --site-padding: 4vw;
    --mobile-site-padding: 6vw;
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 300;
    line-height: 1.5;
}

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

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

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* --- Header & Navigation --- */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 2.2vw var(--site-padding);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
}

.site-title a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 300;
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5vw;
}

.desktop-nav a {
    font-size: 1.1rem;
    font-weight: 300;
}

.header-actions {
    display: flex;
    align-items: center;
}

.button {
    display: inline-block;
    padding: 0.9em 1.7em;
    border: 2px solid var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: background-color 0.2s, color 0.2s;
}

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

/* --- Mobile Navigation --- */
.nav-toggle-label {
    display: none;
    cursor: pointer;
    width: 35px;
    height: 35px;
    position: relative;
    z-index: 102;
}

.burger {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.burger-line {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--color-text);
    transition: transform 0.3s ease;
}

.nav-toggle-checkbox {
    display: none;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 101;
}

.mobile-nav-overlay nav ul {
    list-style: none;
    text-align: center;
}

.mobile-nav-overlay nav .button {
    display: inline-block;
    padding: 0.9em 1.7em;
    border: 2px solid var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: background-color 0.2s, color 0.2s, opacity 0.4s ease, transform 0.4s ease;
    font-family: var(--font-body);
}

.mobile-nav-overlay nav li {
    margin-bottom: 5vh;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-toggle-checkbox:checked ~ .mobile-nav-overlay nav li {
    opacity: 1;
    transform: translateY(0);
}

.nav-toggle-checkbox:checked ~ .mobile-nav-overlay nav li:nth-child(1) { transition-delay: 0.1s; }
.nav-toggle-checkbox:checked ~ .mobile-nav-overlay nav li:nth-child(2) { transition-delay: 0.15s; }
.nav-toggle-checkbox:checked ~ .mobile-nav-overlay nav li:nth-child(3) { transition-delay: 0.2s; }
.nav-toggle-checkbox:checked ~ .mobile-nav-overlay nav li:nth-child(4) { transition-delay: 0.25s; }
.nav-toggle-checkbox:checked ~ .mobile-nav-overlay nav li:nth-child(5) { transition-delay: 0.3s; }

.mobile-nav-overlay nav a {
    font-size: 6vmin;
    font-family: var(--font-body);
}

.nav-toggle-checkbox:checked ~ .mobile-nav-overlay {
    opacity: 1;
    visibility: visible;
}

.nav-toggle-checkbox:checked ~ .header-container .nav-toggle-label .burger-line:first-child {
    transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle-checkbox:checked ~ .header-container .nav-toggle-label .burger-line:last-child {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: url('/images/stue-ugla.jpeg');
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: var(--site-padding);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.20);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    white-space: pre-wrap;
}

/* --- Portfolio Section --- */
.portfolio-section {
    padding: 4vw;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1800px;
    margin: 0 auto;
}

.portfolio-item {
    display: block;
    text-align: left;
}

.portfolio-image {
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    opacity: 0.8;
}

.portfolio-text {
    margin-top: 20px;
}

.portfolio-text h3 {
    font-size: 1.5rem;
}

/* --- Footer --- */
.site-footer {
    padding: 4vw;
    background-color: var(--color-bg);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1800px;
    margin: 0 auto;
}

.footer-column h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-column p {
    line-height: 1.8;
}

.footer-column p:first-child {
    margin-bottom: 1rem;
}

.footer-column a {
    text-decoration: underline;
    text-underline-offset: 3.45px;
}

.footer-column a:hover {
    text-decoration: underline;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .site-header {
        padding: var(--mobile-site-padding);
    }

    .site-title a {
        font-size: 24px;
    }

    .desktop-nav, .header-actions .button {
        display: none;
    }

    .nav-toggle-label {
        display: flex;
    }

    .hero-section {
        min-height: auto;
        height: 100vh;
        max-height: 550px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .footer-column:nth-child(2) {
        order: 1;
    }

    .footer-column:nth-child(3) {
        order: 2;
    }
}