:root {
    --bg-color: #0885c6; /* Lean Startup Signature Blue */
    --bg-dark-card: rgba(5, 40, 62, 0.45);
    --text-color: #ffffff;
    --text-muted: #e0f2fe;
    --accent-yellow: #ffc000; /* Warm Accent Yellow */
    --accent-yellow-hover: #ffd033;
    --glass-bg: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.22);
    --glass-card-bg: rgba(0, 30, 48, 0.4);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LANGUAGE TOGGLE ENGINE (Native CSS-Driven DK/EN)
   ========================================================================== */
body.lang-dk .lang-en { display: none !important; }
body.lang-en .lang-dk { display: none !important; }

/* Background Glowing Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
    animation: float 14s infinite alternate ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: #ffffff;
    top: -150px;
    left: -150px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-yellow);
    bottom: 25%;
    right: -100px;
    animation-delay: -6s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.08); }
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background: rgba(8, 133, 198, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-img {
    height: 85px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.03);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    opacity: 0.9;
}

.nav-link:hover {
    color: var(--accent-yellow);
    opacity: 1;
}

.nav-cta {
    padding: 0.55rem 1.4rem !important;
    font-size: 0.9rem !important;
}

/* Language Switcher Buttons */
.lang-switch-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 3px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.75;
}

.lang-btn.active {
    background: var(--accent-yellow);
    color: #000000;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover:not(.active) {
    opacity: 1;
}

/* ==========================================================================
   BUTTONS & TYPOGRAPHY
   ========================================================================== */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #000000;
    background: var(--accent-yellow);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    background: var(--accent-yellow-hover);
    box-shadow: 0 10px 24px rgba(255, 192, 0, 0.4);
}

.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.outline-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.large-btn {
    padding: 1rem 2.2rem;
    font-size: 1.05rem;
}

.gradient-text {
    color: var(--accent-yellow);
}

/* Container */
main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Glass Card Reusable Class */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3.5rem 3rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 5rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-tag {
    display: inline-block;
    background: rgba(255, 192, 0, 0.18);
    color: var(--accent-yellow);
    border: 1px solid rgba(255, 192, 0, 0.4);
    padding: 0.3rem 0.9rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.section-header h2 {
    font-size: clamp(2rem, 3.8vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.8rem;
}

.section-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 3.5rem 0 4.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981; /* Online green */
    box-shadow: 0 0 8px #10b981;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2.2rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-quick-props {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
}

.quick-prop {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #f1f5f9;
}

.prop-icon {
    font-size: 1.1rem;
}

/* Hero Portrait Frame - Seamless Foreground */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    width: 100%;
}

.photo-frame {
    position: relative;
    width: 100%;
    max-width: 560px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.person-img {
    width: 100%;
    height: auto;
    max-height: 620px;
    object-fit: contain;
    object-position: bottom;
    display: block;
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.3));
}

/* ==========================================================================
   ABOUT & VIDEO SECTION
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 3.5rem;
    align-items: center;
}

.video-container-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center; /* Crops off bottom instead of top */
    display: block;
}

.video-overlay-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.video-caption p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.bio-name {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.bio-title {
    font-size: 1.1rem;
    color: var(--accent-yellow);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.bio-text p {
    font-size: 1.05rem;
    color: #e2e8f0;
    margin-bottom: 1.2rem;
    line-height: 1.65;
}

/* CV & Thesis Download Buttons */
.about-downloads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.cv-download-btn, .thesis-link-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1rem 1.2rem;
    border-radius: 16px;
    text-decoration: none;
    color: #ffffff;
    transition: var(--transition);
}

.cv-download-btn:hover, .thesis-link-btn:hover {
    background: rgba(0, 0, 0, 0.45);
    border-color: var(--accent-yellow);
    transform: translateY(-3px);
}

.cv-download-btn .btn-icon, .thesis-link-btn .btn-icon {
    font-size: 1.8rem;
}

.cv-download-btn strong, .thesis-link-btn strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-color);
}

.cv-download-btn small, .thesis-link-btn small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.download-arrow {
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--accent-yellow);
    font-weight: 700;
}

/* ==========================================================================
   SKILLS & METRICS TRACK RECORD
   ========================================================================== */
.skills-section {
    margin-bottom: 5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem 1.6rem;
    position: relative;
    backdrop-filter: blur(12px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-yellow);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.metric-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-yellow);
    line-height: 1;
    margin-bottom: 0.8rem;
}

.metric-unit {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.metric-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.6rem;
    opacity: 0.75;
}

.metric-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.metric-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ==========================================================================
   PROCESS & FIXED PRICE ENGAGEMENT MODEL
   ========================================================================== */
.free-offer-banner {
    background: linear-gradient(135deg, rgba(0, 35, 55, 0.7), rgba(8, 133, 198, 0.4));
    border: 2px dashed var(--accent-yellow);
    border-radius: 20px;
    padding: 2.5rem 2.5rem;
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.offer-badge {
    display: inline-block;
    background: var(--accent-yellow);
    color: #000000;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.free-offer-banner h3 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.free-offer-banner p {
    font-size: 1.1rem;
    color: #f1f5f9;
    max-width: 750px;
    margin: 0 auto 1.8rem;
    line-height: 1.6;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.pillar-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.8rem;
    border-radius: 16px;
    transition: var(--transition);
}

.pillar-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.pillar-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}

.pillar-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.pillar-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   PROJECTS & PORTFOLIO
   ========================================================================== */
.projects-section {
    margin-bottom: 5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(12px);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 192, 0, 0.6);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.project-image {
    width: 100%;
    height: 220px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tech-stack {
    font-size: 0.8rem;
    color: var(--accent-yellow);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.project-info p {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--accent-yellow);
    transform: translateX(4px);
}

.live-demo-link {
    color: var(--accent-yellow);
}

.card-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: auto;
}

.pilot-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #10b981;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    z-index: 10;
}

.locked-text {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

/* ==========================================================================
   CONTACT SECTION & GOOGLE FORM
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 2.5rem;
}

.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-info-card {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.5rem;
    border-radius: 16px;
    transition: var(--transition);
}

.contact-info-card:hover {
    border-color: var(--accent-yellow);
}

.info-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.contact-info-card h4 {
    font-size: 1rem;
    color: var(--accent-yellow);
    margin-bottom: 0.3rem;
}

.contact-info-card a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.2rem;
}

.contact-info-card small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.contact-form-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    height: 680px;
}

.google-form-embed {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.glass-footer {
    text-align: center;
    padding: 3rem 5%;
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    margin-top: 4rem;
}

.footer-content p {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.footer-meta {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-meta a {
    color: var(--accent-yellow);
    text-decoration: none;
}

.footer-meta a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */
@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-quick-props {
        align-items: center;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .glass-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .desktop-nav {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .badge-pcb { left: 0; }
    .badge-mcu { right: 0; }
}

@media (max-width: 640px) {
    .glass-card {
        padding: 2rem 1.5rem;
    }

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

    .desktop-nav {
        font-size: 0.85rem;
    }
}
