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

body {
    background: #f3f0e8;
    color: #222;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}



/* HEADER */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 5em;
    border-bottom: 1px solid #804229;
}

.logo a {
    color: #804229;
    text-decoration: none;
    font-size: 18px;
}

.menu {
    display: flex;
    gap: 30px;
}

.menu a {
    color: #804229;
    text-decoration: none;
    font-size: 14px;
}

.menu a:hover {
    color: #ff6b00;
}

html {
    scroll-behavior: smooth;
}

/* Fonter*/

body {
    font-family: 'Segoe UI';
    font-size: 16px;
    color: #333;
}

h1 {
    font-size: 5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: #804229;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif
}

h2 {
    color: #ff6b00;
    font-size: 3rem;
    font-weight: 100;
    font-family: 'Gill Sans';
}

h3 {
    color: #804229;
    font-size: 1.5rem;
    margin-bottom: 20px;
    margin-top: 0px;
}

h4 {
    font-size: 1.2rem;
    font-family: 'Segoe UI';
    margin: 0;
    font-weight: 500;
}

h5 {
    font-size: 0.9rem;
    font-weight: normal;
    font-style: italic;
    margin: 0;
    color: #804229;
}

p {
    font-size: 1rem;
    font-family: 'Segoe UI';
    font-weight: 400;
}

/* FARGETEMAER */

.upkip-page h2,
.upkip-page .portfolio-content h4 {
    color: #0693E3;
}

.boddi-page h2,
.boddi-page .portfolio-content h4 {
    color: #24CC94;
}

.safestay-page h2,
.safestay-page .portfolio-content h4 {
    color: #B7A5E7;
}

/* HERO */

.hero {
    padding: 10px 80px;
}



.intro p {
    margin-bottom: 15px;
}

.intro p:last-child {
    margin-bottom: 0;
}

/* -- INDEX -- */

/* ABOUT */

.about {
    display: grid;

    grid-template-columns: 20% 15% 15%;

    grid-template-areas:
        "photo intro skills"
        "photo tools tools";

    gap: 5%;

    align-items: start;

    justify-content: center;
}

.photo {
    grid-area: photo;
}

.photo img {
    width: 100%;
    height: auto;
    display: block;
}

.intro {
    grid-area: intro;
}

.skills {
    grid-area: skills;
}

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

/* TOOLS */

.tools {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 20px;
    margin-top: 50px;
}

.tools div {
    width: 40px;
    height: 40px;

    border: 3px solid #804229;
    border-radius: 8px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #804229;
    font-weight: bold;
}

.tools img {
    height: 44px;
    width: auto;
}

/* TIMELINE */

.timeline {
    position: relative;
    padding: 100px 8%;
    margin-top: 5em;
    margin-bottom: em;
}


.line {
    position: absolute;
    top: 143px;

    left: 0;
    right: calc(10% + 110px);

    height: 2px;
    background: #ff6b00;
}

.timeline-items {
    display: flex;
    justify-content: space-between;
}

.item {
    width: 150px;
    position: relative;
}

.year {
    color: #ff6b00;
    font-size: 14px;
}

.dot {
    width: 14px;
    height: 14px;

    background: #ff6b00;
    border-radius: 50%;

    margin: 12px 0 24px 0;
}

.item h3 {
    color: #ff6b00;
    margin-bottom: 10px;
    font-size: 16px;
}

.item p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* PORTFOLIO */

.portfolios {
    padding: 0em 120px;
}


.project-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding-bottom: 6em;
}

.portfolio>.project-grid:nth-last-child(2) {
    padding-bottom: 0;
}

.project-card {
    width: 30em;
    flex-shrink: 0;
}

.project-card h4 {
    margin-bottom: 15px;
    text-align: left;
}

.project-card img {
    width: 100%;
    display: block;
}

/* CV */
.cv {
    padding: 80px;
    max-width: 1200px;
    margin: 0 auto;
}


.cv-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
}

.profile {
    text-align: center;
}

.profile img {
    width: 180px;
    border-radius: 50%;
    margin-bottom: 30px;
}

.profile h3 {
    margin-top: 1em;
    margin-bottom: 0.4em;
}

.profile h3:first-of-type {
    margin-top: 0;
}

.profile p:last-of-type {
    margin-top: 3em;
}

.profile ul {
    list-style: none;
    padding: 0;
}

.cv-item {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.year {
    min-width: 80px;
    color: #ff6b00;
    font-weight: bold;
}

.divider1 {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.divider1 img {
    width: 80vw;
    display: block;
    margin: 0 auto;
    transform: rotate(180deg);
}

.divider {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.divider img {
    width: 80vw;
    display: block;
    margin: 0 auto;
}

.cv-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.profile img:last-of-type {
    width: 4em;
    height: auto;
    padding-top: 2%;
}

/* FOOTER */

footer {
    background: #804229;
    color: white;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 40px 80px;
}

.logo-footer a {
    color: #ffff;
    text-decoration: none;
    font-size: 18px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-left: 25px;
}

.menu-footer {
    display: flex;
    gap: 30px;
}

.menu-footer a {
    color: #ffff;
    text-decoration: none;
    font-size: 14px;
}

.menu-footer a:hover {
    color: #f3f0e8;
}

/* -- INDEX -- */

/* -- PORTFOLIO -- */

.portfolio {
    padding: 0em 120px;
}

.portfolio img {
    display: block;
    margin: 0 auto 0em auto;
    /* Midtstill bildet med auto-margins */
    width: 60%;
}


.portfolio-content h4 {
    color: #ff6b00;
    padding-bottom: 0.2em;
    padding-top: 8em;
}

.portfolio-content p {
    color: #804229;
    padding-bottom: 0.8em;
}

.portfolio-content ul {
    color: #804229;
}

.portfolio-content {
    text-align: left;
    max-width: 60%;
    margin-left: 20%;
}

.portfolio-content ul {
    padding-left: 0;
    margin-left: 0;
    list-style-position: inside;
}

.portfolio_div {
    display: flex;
    align-items: start;
    gap: 4rem;
    margin: 0 auto;
}

.portfolio_text {
    flex: 1;
}

.portfolio_div img {
    flex: 1;
    width: 45%;
    height: auto;
}

.color-grid {
    display: grid;
    gap: 40px;
    justify-content: center;
    margin-bottom: 50px;
}

.row-1 {
    grid-template-columns: repeat(8, 50px);
}

.row-2 {
    grid-template-columns: repeat(6, 50px);
}

.row-3 {
    grid-template-columns: repeat(4, 50px);
}

.row-5 {
    grid-template-columns: repeat(5, 50px);
}

.color {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.portfolio_img_3 {
    display: flex;
    align-items: flex-start;
    /* toppstill bildene */
    justify-content: space-between;
    /* mellomrom mellom */
    gap: 2rem;
    /* ekstra avstand */
    padding-top: 2em;
    padding-bottom: 2em;
}

.portfolio_img_3 img {
    width: 30%;
    height: auto;
    display: block;
}

.portfolio_img_2 {
    display: flex;
    align-items: flex-start;
    /* toppstill bildene */
    justify-content: space-between;
    /* mellomrom mellom */
    gap: 2rem;
    /* ekstra avstand */
    padding-top: 2em;
    padding-bottom: 2em;
}

.portfolio_img_2 img {
    width: 50%;
    height: auto;
    display: block;
}


.video-demo img {
    width: 100%;
    max-width: 600px;
    height: auto;
}



.rightul {
    position: relative;
    left: 25%;
    text-align: right;
    padding-bottom: 4em;
    margin-top: 8em;
}

.rightul h4 {
    padding-top: 0%;
}

.img-column {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

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

.carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
}

.carousel img {
    min-width: 70%;
    max-width: 70%;
    height: auto;
}

.carousel::-webkit-scrollbar {
    height: 10px;
}

.carousel::-webkit-scrollbar-track {
    background: #f3f0e8;
    border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb:hover {
    background: #e05f00;
}

/* Mobil */

@media screen and (max-width: 768px) {

    /* Header */
    header {
        padding: 20px 2em;
    }

    .menu {
        display: flex;
        gap: 20px;
    }

    /* Hero */
    .hero {
        text-align: left;
        padding: 2rem 0rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    main {
        padding-left: 8%;
        padding-right: 8%;
        box-sizing: border-box;
    }

    /* Om meg */

    .about {
        grid-template-columns: 1fr;

        grid-template-areas:
            "photo"
            "intro"
            "skills";

        gap: 2rem;
        justify-content: stretch;
        flex-direction: column;
        align-items: center;
    }


    .photo {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .photo img {
        display: block;
        margin: 0 auto;
    }

    .intro,
    .skills {
        width: 100%;
    }

    /* Verktøy */
    .tools {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-bottom: 3rem;
    }

    /* Tidslinje */
    .timeline {
        display: none;
    }


    .item {
        width: 100%;
    }

    /* Portefølje */
    .portfolios {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    .portfolios h3:not(:first-of-type) {
        padding-top: 2em;
    }

    .project-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding-bottom: 6em;
    }

    .project-card {
        width: 30em;
        flex-shrink: 0;
    }


    .project-card img {
        width: 100%;
        height: auto;
    }

    /* CV */

    .divider1 {
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }

    .divider1 img {
        width: 96vw;
        margin: 0 auto;
    }

    .divider {
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }

    .divider img {
        width: 96vw;
        margin: 0 auto;
    }

    .cv-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cv-bottom {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cv {
        padding: 8%;
    }

    .profile {
        width: 100%;
        margin-top: 2rem;
    }

    .experience {
        width: 100%;
    }


    .cv-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cv-item .year {
        margin-bottom: 0.5rem;
    }


    /* UNDERSIDER */

    .portfolio {
        padding: 0;
    }

    .portfolio img {
        width: 100%;
    }

    .portfolio-content {
        max-width: 100%;
        margin-left: 0;
    }

    .portfolio-content h4 {
        padding-top: 3rem;
    }

    .portfolio_div {
        flex-direction: column;
        gap: 2rem;
    }

    .portfolio_div img {
        width: 100%;
    }

    .portfolio_text {
        width: 100%;
    }

    .rightul {
        left: 0;
        text-align: left;
        margin-top: 3rem;
        padding-bottom: 2rem;
    }

    .rightul h4 {
        padding-top: 0;
        margin-top: 0, 4rem;
    }

    .rightul ul {
        padding: 0;
    }

    .portfolio_img_2,
    .portfolio_img_3 {
        flex-direction: column;
        gap: 1rem;
    }

    .portfolio_img_2 img,
    .portfolio_img_3 img {
        width: 100%;
    }

    .color-grid {
        gap: 15px;
    }

    .row-1,
    .row-2,
    .row-3,
    .row-5 {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    }
}

/* Footer */
footer {
    padding: 20px 2em;
}