/* ==========================================================================
   1. GLOBAL SETUP & CSS VARIABLER (DEN GYLDNE TRÅD)
   ========================================================================== */
:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --accent-color: #38bdf8;
    --accent-hover: #7dd3fc;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --tag-bg: rgba(56, 189, 248, 0.1);
    --table-header-bg: rgba(255, 255, 255, 0.03);
    --max-width: 850px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 40px;
    min-height: 100vh;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

/* Links & Knapper */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

a.back-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 24px;
}

a.back-btn:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   2. TOP NAVIGATION (STICKY GLASSMORPHISM)
   ========================================================================== */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 4px 0;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* ==========================================================================
   3. HERO SEKTION (MED GRID & NEON-GLOW)
   ========================================================================== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Subtilt gittermønster i baggrunden */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.hero-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90px; height: 90px;
    background: var(--accent-color);
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0.35;
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.25; filter: blur(20px); }
    100% { opacity: 0.5; filter: blur(30px); }
}

.hero-icon {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
    font-size: 2rem;
    flex-shrink: 0;
}

.hero-content h1 {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.hero-content .tagline {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.hero-tag {
    font-size: 0.8rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* ==========================================================================
   4. UNDERSIDE HEADERS (CV, HA & PRODUKT)
   ========================================================================== */
header, .site-page-header, .cv-header {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

header h1, .site-page-header h1, .cv-header h1 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

header .subtitle, .site-page-header .subtitle, .cv-header .subtitle {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 8px;
}

header .location, .site-page-header .location, .cv-header .location {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-img, .profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* ==========================================================================
   5. GRID & KORT (CARDS & CARD-CUSTOM)
   ========================================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.card, .card-custom {
    position: relative;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: inherit;
}

.card-custom {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    margin-bottom: 0;
}

.card-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card-custom:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 24px -10px rgba(56, 189, 248, 0.15);
}

.card-custom:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
    display: inline-block;
}

.card-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 20px;
}

.mini-tag {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.link-text {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==========================================================================
   6. SEKTIONER (CV & HOME ASSISTANT)
   ========================================================================== */
.section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}

.section h2 {
    font-size: 1.4rem;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.about-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.job, .edu {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.job:last-child, .edu:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.job-title, .edu-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.company {
    color: var(--accent-color);
    font-weight: 500;
}

.date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.job ul {
    margin-left: 20px;
    color: var(--text-muted);
}

.job li {
    margin-bottom: 6px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: var(--tag-bg);
    color: var(--accent-color);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==========================================================================
   7. PRODUKTANMELDELSER (PRODUKT SKABELON)
   ========================================================================== */
.product-review {
    position: relative;
    margin-bottom: 2rem;
}

.product-image-container {
    width: 100%;
    max-width: 400px;
    height: 400px;
    margin: 0 auto 1.5rem auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding: 1rem;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.specs-table th, 
.specs-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.specs-table tr:last-child th,
.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table th {
    width: 35%;
    background-color: var(--table-header-bg);
    color: var(--text-muted);
    font-weight: 600;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: #0f172a !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 700;
    margin-top: 0.75rem;
    transition: opacity 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* ==========================================================================
   8. STATUS BOX & FOOTER
   ========================================================================== */
.status-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.status-box h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--tag-bg);
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   9. MOBIL RESPONSIVITET
   ========================================================================== */
@media (max-width: 650px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    header, .site-page-header, .cv-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 500px) {
    .nav-container {
        flex-direction: column;
        gap: 12px;
    }
}