/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    /* Colors */
    --primary-purple: #301633;
    --secondary-purple: #BF90C0;
    --background-pink: #F9E3FC;
    --soft-black: #121212;
    --soft-white: #EAEAEA;
    --clean-white: #FFFFFF;

    /* Spacing & Layout */
    --navbar-h: 88px;
    --container-width: 1200px;
    --section-spacing: 4rem;
    --radius-md: 8px;
    --radius-lg: 16px;
}

/* Modern Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-pink);
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    color: var(--soft-black);
    line-height: 1.6;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
/* Fonts Imports are in HTML head, but classes here for reference */

h1,
h2,
h3 {
    font-family: "Lobster Two", sans-serif;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h4,
h5,
h6 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    /* text-transform: uppercase; REMOVED */
    letter-spacing: 0em;
    /* Reduced spacing for normal text */
    font-size: 0.85rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-purple);
    display: block;
}

/* ... existing code ... */

/* Responsive Video Wrapper */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background: #000;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Utilities Specific --- */

.skills-list {
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.skills-list li {
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-white {
    color: var(--clean-white);
}

.text-black {
    color: var(--soft-black);
}

/* Custom Font Utilities */
.skævtekst {
    transform: rotate(27deg) translateY(-21px);
    display: inline-block;
    margin: 5px;
}

.skævtekst-2 {
    transform: rotate(27deg) translateY(32px);
    display: inline-block;
    margin: 15px;
}

.skævtekst-3 {
    transform: rotate(-18deg) translateY(14px);
    display: inline-block;
}

.skævtekst-4 {
    transform: rotate(18deg) translateY(24px);
    display: inline-block;
}

.skævtekst-5 {
    transform: rotate(14deg) translateY(24px);
    display: inline-block;
}

.header-1 {
    color: var(--soft-black);
    font-size: 2em;
    margin: 0;
    font-family: "Lobster Two", sans-serif;
}

.header-2 {
    color: var(--clean-white);
    font-size: 2.2em;
    margin: 0;
    font-family: "Lobster Two", sans-serif;
}

.header-3 {
    color: var(--clean-white);
    font-size: 2.5em;
    margin: 0;
    font-family: "Lobster Two", sans-serif;
    text-transform: none;
    /* Disable h5 uppercase inheritance */
}

/* =========================================
   3. LAYOUT UTILITIES (Grid/Flex)
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.d-flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-4 {
    gap: 2rem;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

/* Grid System replacing Bootstrap Row/Col */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-cols-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .md-block {
        display: block !important;
    }

    .md-none {
        display: none !important;
    }
}

/* Helpers for spacing */
.m-0 {
    margin: 0;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-0 {
    margin-bottom: 0;
}

.my-1 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 2rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* =========================================
   4. COMPONENTS
   ========================================= */

/* --- Navbar --- */
.navbar {
    background-color: var(--background-pink);
    padding: 1.35rem 2rem;
    box-shadow: 0 -16px 26px rgba(0, 0, 0, 0.22), 0 6px 14px rgba(0, 0, 0, 0.10);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-weight: 600;
    /* Lighter weight as requested */
    color: var(--primary-purple);
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-purple);
}

.nav-link.active {
    color: var(--primary-purple);
    font-weight: 700;
    display: inline-block;
    /* Required for transform animation */
    animation: floatActive 3s ease-in-out infinite;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    /* Offset to make it clear as requested */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-purple);
}

/* Dropdown */
.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 101;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--soft-black);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: var(--background-pink);
}

/* Hamburger Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-purple);
    transition: 0.3s;
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--background-pink);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        display: none;
        align-items: center;
        text-align: center;
        /* JS toggles 'open' class */
    }

    .nav-menu.open {
        display: flex;
    }

    .dropdown:hover .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        transform: none;
        display: block;
    }

    .dropdown-menu {
        opacity: 1;
        visibility: visible;
        display: none;
    }

    /* Show if parent clicked in JS? handling hover on mobile is tricky, simple click might be better */
}


/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-primary {
    background: var(--primary-purple);
    color: var(--clean-white);
    border: 2px solid var(--clean-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 83, 185, 0.4);
}


/* --- Cards (for Projects) --- */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-family: "Lobster Two", sans-serif;
    text-transform: none;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--soft-black);
}

.card-text {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

/* --- Hero / Index-ATF --- */
.index-atf {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-style: italic;
    padding: 20px 2.5rem;
    background-color: var(--secondary-purple);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Sit content on the bottom edge */
    position: relative;
    gap: 3rem;
    flex-wrap: nowrap;
    /* Keep items side-by-side for overlapping effect */
    min-height: 250px;
}

.index-atf::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.logo-top {
    width: 30vh;
    margin-left: 30px;
    transition: transform 0.2s;
    transform: rotate(14deg) translateY(24px);
    /* Standard tilted effect */
}

.logo-top:hover {
    transform: rotate(14deg) translateY(22px) scale(1.02);
}

#picture-of-self {
    max-width: 30vh;
    height: auto;
    transform: translateY(35px);
    /* Overlap onto navbar */
    z-index: 90;
    /* Sit behind navbar */
    flex-shrink: 0;
}

#landing-quote {
    font-size: 1.2rem;
    max-width: 450px;
    margin-bottom: 2.5rem;
    /* Space it up since we are flex-end */
}

/* Responsive ATF Tweaks */
@media (max-width: 690px) {

    .index-atf {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: auto;
        padding-bottom: 2rem;
        gap: 1.5rem;
    }

    #picture-of-self {
        display: none !important;
        /* Override d-none !important */
        max-width: 150px;
        transform: none;
        /* Reset rotation/offset */
        z-index: 1;
        margin: 0;
    }

    #landing-quote {
        display: block !important;
        /* Override potential utilities */
        text-align: center;
        margin: 0;
        font-size: 1rem;
        max-width: 90%;
    }

    .logo-top {
        margin: 0;
        /* Keep rotation if desired, or reset */
    }
}

/* --- Section Wrapper --- */
.section-wrapper {
    padding: 4rem 2rem;
    background: linear-gradient(to bottom, var(--primary-purple) 0%, var(--primary-purple) 60%, var(--soft-black) 100%);
    color: var(--clean-white);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    min-height: 50vh;
}

/* --- Custom Carousel --- */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 500px;
    /* Limit height */
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.carousel-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    pointer-events: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 0 1rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.6);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(to bottom, var(--primary-purple), var(--soft-black));
    border-radius: 37%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.play-overlay i {
    color: white;
    font-size: 2rem;
}

.carousel-slide:hover .play-overlay {
    opacity: 0.9;
}

/* --- Skills Section --- */
#skills-section {
    padding: 4rem 15%;
    background-color: var(--soft-black);
    color: var(--clean-white);
}

/* --- Project Modal (Custom) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    position: relative;
    padding: 0;
    /* content brings padding */
    color: var(--soft-black);
}

.modal-header {
    background: var(--background-pink);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.modal-body {
    padding: 1.5rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

/* --- Utilities Specific --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--clean-white);
    color: var(--soft-black);
    padding: 8px 12px;
    z-index: 2000;
}

.skip-link:focus {
    left: 10px;
    top: 10px;
}

#scrollToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    border: 2px solid var(--clean-white);
    color: var(--clean-white);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#scrollToTop.show {
    display: flex;
}

/* Animations */
@keyframes skewWave {
    0% {
        transform: skew(10deg, 0deg);
    }

    100% {
        transform: skew(-10deg, 0deg);
    }
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(90deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: rotate(15deg);
    }
}

@keyframes floatActive {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

#skew-wave1 {
    animation: skewWave 10.3s infinite;
}

#andev-logo {
    animation: wiggle 20s infinite;
}

/* Responsive Tweaks */
@media (max-width: 700px) {
    #landing-quote {
        display: none;
    }

    #picture-of-self {
        display: none;
    }

    #skills-section {
        padding: 4rem 1rem;
    }
}

/* --- Contact Section --- */
#contact-section {
    background: white;
    border-radius: 8px;
    color: var(--soft-black);
    padding: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    margin-top: 3rem;
}

#contact-section a {
    display: inline-block;
    margin: 8px 0;
    transition: transform 0.2s ease;
}

#contact-section a:hover {
    transform: translateX(5px);
    /* Subtle hover effect */
    color: var(--secondary-purple);
}

/* Custom Link Style for Text */
/* Custom Link Style for Text */
.link-hover-white {
    display: inline-block;
    color: var(--clean-white) !important;
    font-weight: 600;
    text-decoration: underline;
    transition: transform 0.2s ease, color 0.2s ease;
}

.link-hover-white:hover {
    transform: translateX(5px);
    color: var(--secondary-purple) !important;
}

#main-content {
    position: relative;
    z-index: 10;
    /* Mirrored and boosted from navbar: navbar has 0 -16px 26px rgba(0,0,0,0.22) and 0 6px 14px rgba(0,0,0,0.10) */
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4), 0 -8px 15px rgba(0, 0, 0, 0.15);
}

/* --- Footer --- */
.footer {
    background-color: var(--background-pink);
    position: relative;
    z-index: 5;
    /* Stays below main-content to receive the shadow */
    padding: 2.5rem 1rem;
}

/* --- Diamond Cut Effect --- */
/* The parent container needs to handle the drop-shadow filter because clip-path on the child cuts off box-shadow */
.card-tl,
.card-tr,
.card-bl,
.card-br {
    box-shadow: none !important;
    /* Remove standard box-shadow */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: filter 0.3s ease, transform 0.2s ease;
}

.card-tl:hover,
.card-tr:hover,
.card-bl:hover,
.card-br:hover {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

/* 
   Clip-path coordinate system: (x y) 
   0% 0% = top left
   100% 100% = bottom right
*/

/* Custom Link Style for Text (Dark) */
.link-hover {
    display: inline-block;
    color: var(--primary-purple);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.link-hover:hover {
    transform: translateX(5px);
    color: var(--secondary-purple);
    text-decoration: underline;
}