/* * {
    font-family: 'Montserrat';
} */

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
}

.MainImageBackground {
    min-height: 100vh;
    display: block;
    background-image: url('../Images/orangbackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* makes the image stay as you scroll */
}

.MainImageBackground::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20,20,20,0.45);
    backdrop-filter: blur(2px);
    z-index: 0;
}

.card-container,
.portfolio-card {
    background: rgba(30, 30, 30, 0.85);
    border-radius: 1.5em;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.37);
    padding: 2.5em 3em;
    max-width: 900px;
    width: 95%;
    color: white;
    position: relative;
    animation: fadeInCard 0.7s ease;
    margin: 2em auto; /* add margin for spacing from top/bottom */
    min-height: unset; /* let card grow with content */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: visible; /* allow page to scroll normally */
    z-index: 1;
    margin-top: 68px; /* or try 64px for more space */
}

.center-text {
    text-align: center;
    color: inherit;
}

a {
    color: #ffd700;
    text-decoration: none;
    margin: 0 0.5em;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    color: #fff;
}

nav a {
    transition: color 0.2s;
}

nav a:hover {
    color: #fff8ce;
}

.main-image {
    max-width: 100%;
    display: block;
    margin: 2em auto;
    border-radius: 1em;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}

.main-image:hover {
    transform: scale(1.03);
}

.profile-picture {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    margin: 1em auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    border: 3px solid #ffd700;
    position: absolute;
    top: -60px;
    left: 25px;
}

.profile-picture.popout {
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto -64px auto; /* negative bottom margin for overlap */
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 6px #ffd700;
    border: 4px solid #fff;
    z-index: 2;
    position: absolute;
    top: -60px;
    left: 25px;
}

.portfolio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    justify-content: center;
    margin-top: 2em;
}

.portfolio-item {
    background: rgba(255,255,255,0.05);
    border-radius: 1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 1.5em;
    width: 260px;
    max-width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.portfolio-item:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.portfolio-item img {
    border-radius: 0.75em;
    margin-bottom: 1em;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

#scrollTopBtn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #222;
    color: #ffd700;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 2em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    opacity: 0.7;
    z-index: 10;
    display: none;
}

#scrollTopBtn:hover {
    opacity: 1;
}

section {
  margin-bottom: 2em;
}

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(30px);}
    to { opacity: 1; transform: translateY(0);}
}