/* --------------------------------------------------------
   GLOBALT
   -------------------------------------------------------- */

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

body {
    margin: 0;
    padding: 0;
    background: #f4f1ec; /* Varm sandfarge */
    color: #1e1e1e;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

main {
    max-width: 720px;
    margin: 80px auto;
    padding: 0 20px 60px 20px;
}

/* --------------------------------------------------------
   TYPOGRAFI
   -------------------------------------------------------- */

h1 {
    font-size: 42px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #2e2e2e;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 40px;
    color: #555;
}

h3 {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 15px;
    color: #3a3a3a;
    font-weight: 500;
}

p {
    margin-bottom: 22px;
    font-size: 17px;
}

ul {
    margin-left: 20px;
    margin-bottom: 30px;
    padding-left: 0;
}

li {
    margin-bottom: 8px;
    list-style-position: inside;
}

/* --------------------------------------------------------
   ØVERSTE KVADRAT
   -------------------------------------------------------- */

#random-square {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(0,0,0,0.35);
    z-index: 200;
    cursor: pointer;
}

/* --------------------------------------------------------
   PORTRETT
   -------------------------------------------------------- */

.portrait-wrapper {
    float: right;
    margin-left: 30px;
    margin-bottom: 20px;
}

.portrait {
    width: 180px;
    height: auto;
    border-radius: 4px;
    opacity: 0.92;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    display: block;
}

/* --------------------------------------------------------
   KONTAKT / INLINE MENY
   -------------------------------------------------------- */

:root {
    --square-color: #ff6600;
    --square-size: 14px;
}

.contact-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 60px;
}

.contact-square {
    width: calc(var(--square-size) + 4px);
    height: calc(var(--square-size) + 4px);
    border: 2px solid var(--square-color);
    border-radius: 2px;
    flex-shrink: 0;
}

button.contact-text {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.1rem;
    text-align: left;
}

button.contact-text:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Meny under "Ta kontakt" */
.inline-menu {
    display: none;
    margin-top: 10px;
    padding-left: calc(var(--square-size) + 16px);
    font-size: 1rem;
    line-height: 1.8;
}

.inline-option {
    display: block;
    text-decoration: none;
    color: inherit;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.inline-option:hover {
    opacity: 1;
}

/* --------------------------------------------------------
   POPUP-MENY FRA KVADRAT
   -------------------------------------------------------- */

.popup-menu {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    min-width: 160px;
    background: #f4f1ec;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    padding: 8px 10px;
    z-index: 250;
}

.popup-option {
    display: block;
    padding: 4px 6px;
    text-decoration: none;
    color: #1e1e1e;
    font-size: 0.95rem;
    opacity: 0.9;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.popup-option:hover {
    opacity: 1;
    background: rgba(0,0,0,0.04);
}

/* --------------------------------------------------------
   MOBIL
   -------------------------------------------------------- */

@media (max-width: 600px) {
    main {
        margin-top: 40px;
    }

    h1 {
        font-size: 32px;
    }

    .portrait-wrapper {
        float: none;
        margin: 0 auto 30px auto;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .portrait {
        width: 100%;
        max-width: 250px;
    }
}
