/* --Setup-- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    /* Default litir */
    color: #1a1a1a;
    background-color: #fafafa;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* sections setup */
section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;

}
section.visible {
    opacity: 1;
    transform: translateY(0);
}
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -0.3px;
}
/* Styling fyrir Font Awesome icons, þar sem þau eru núna local */
.font-awesome{
  width: 1.01em;
  height: 1.01em;
  display: inline-block;
  vertical-align: middle;
}

/* --Language Button-- */
.language-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.13);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
}
.language-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.20);
}
.language-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.language-btn img {
    width: 19px;
    height: 12px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 3px;
}

/* --Intro-- */
.intro {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 60px 20px 100px;
    text-align: center;
}
.intro-content {
    max-width: 560px;
}
.intro h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.subtitle {
    font-size: 1.15rem;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    font-weight: 500;
}
.intro-text {
    font-size: 1.05rem;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 30px;
    line-height: 1.7;
}

.profile-picture {
    display: inline-block;
    border-radius: 10%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 28px;
    overflow: hidden;
    /* Bæti við padding til að láta wrapperinn líta út eins og hann sé með jafn langar hliðar
    padding-left: 1px;
    padding-right: 1px;
    */
}
.profile-picture img{
    display: block;
    width: 170px;
    height: 190px;
    border-radius: 10%;
    object-fit: cover;
    object-position: center calc(50% + 15px); /* Færi mynd niður */
    transform: translateZ(40px) scale(0.9);
}
/* Socal takkarnir, Github, LinkedIn og Email */
.social {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 1.25rem;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.13);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.social-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 1px 8px 30px rgba(0, 0, 0, 0.20);
}
.social-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* --Scroll indicator, animated-- */
.scroll-icon {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: rgba(0, 0, 0, 0.4);
    font-size: 1.5rem;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}


/* --About-- */
.about-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}
.about-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.about-card p {
    color: rgba(0, 0, 0, 0.65);
    font-size: 1.02rem;
    margin-bottom: 14px;
    line-height: 1.75;
}

/* --Projects-- */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.project-card {
    flex: 1 1 350px;
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 14px;
    padding: 22px 24px;
    text-decoration: none;
    color: #1a1a1a;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.project-card:hover {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.15);
}
.project-card:active {
    transform: scale(0.98) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.project-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-icon img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
}
.icon-zoom {
    transform: scale(1.35);
}

.project-info {
    flex: 1;
    min-width: 0;
}
.project-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.project-info p {
    font-size: 0.88rem;
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.4;
}

.project-arrow img{
    flex-shrink: 0;
    opacity: 0.3;
    font-size: 0.9rem;
    transition: transform 0.3s ease, color 0.3s ease;
}
/* ör hreyfist og breytir um lit við hover */
.project-card:hover .project-arrow img{
    transform: translateX(4px);
    opacity: 0.7;
    filter: brightness(0) saturate(100%) invert(39%) sepia(82%) saturate(1397%)
            hue-rotate(197deg) brightness(90%) contrast(92%);
}

/* --Contact-- */
.contact {
    text-align: center;
}

.contact p {
    color: rgba(0, 0, 0, 0.55);
    font-size: 1.05rem;
    margin-bottom: 28px;
}

/* Þarf að breyta */
.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 30px;
    color: #1a1a1a;
    background: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.13);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 1px 12px 35px rgba(0, 0, 0, 0.20);
}
.contact-btn:active {
    transform: scale(0.97);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* --Footer-- */
footer {
    text-align: center;
    padding: 20px;
    color: rgba(0, 0, 0, 0.35);
    font-size: 0.85rem;
}

/* --Responsive-- */
/* lítil tablets og stórir símar */
@media screen and (max-width: 600px) {
    .intro {
        padding: 50px 20px 90px;
    }
    .intro h1 {
        font-size: 2rem;
    }

    .profile-picture img {
        width: 140px;
        height: 150px;
    }

    .subtitle {
        font-size: 1rem;
    }
    .intro-text {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
    
    .about-card {
        padding: 26px 22px;
    }

    .project-card {
        padding: 18px 20px;
    }

    .contact-btn {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

/*Mobile*/
@media screen and (max-width: 380px) {
    .intro h1 {
        font-size: 1.7rem;
    }

    .social-btn{
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}
