:root {
    --primary-color: #646cff;
    --primary-hover: #747bff;
    --secondary-color: #535bf2;
    --accent-color: #ffca28;
    --dark-color: #242424;
    --darker-color: #1a1a1a;
    --light-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: #f9f9f9;
    --font-family: 'Inter', sans-serif;
    --mono-font: 'JetBrains Mono', monospace;
    
    /* Dark Theme (Default) */
    --bg-color: #242424;
    --bg-secondary: #1a1a1a;
    --text-color: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.6);
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-start: var(--bg-color);
    --gradient-end: var(--bg-secondary);
    --service-card-bg: rgba(255, 255, 255, 0.03);
    --service-card-border: rgba(255, 255, 255, 0.1);
    --service-card-hover-bg: rgba(255, 255, 255, 0.05);
}

/* Light Theme */
[data-theme="light"] {
    --bg-color: #f5f5f5;
    --bg-secondary: #e5e5e5;
    --text-color: #121212;
    --text-muted: #555555;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #f0f0f0;
    --gradient-end: #e0e0e0;
    --service-card-bg: #ffffff;
    --service-card-border: rgba(0, 0, 0, 0.1);
    --service-card-hover-bg: #f8f8f8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.vite-inspired {
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Navbar styling */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030 !important;
    background-color: rgba(26, 26, 26, 0.95) !important;
    transition: background-color 0.3s ease;
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background-color: rgba(36, 36, 36, 0.95) !important;
    padding: 1rem 0;
}

.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background-color: var(--dark-color);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(100, 108, 255, 0.15), transparent 50%),
                radial-gradient(circle at bottom left, rgba(83, 91, 242, 0.15), transparent 50%);
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.typewriter-container {
    overflow: hidden;
    margin-top: 3rem;
}

.typewriter {
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto;
    font-family: var(--mono-font);
    color: var(--light-color);
}

.tagline {
    opacity: 0.9;
    font-size: 1.5rem;
    font-weight: 300;
}

/* Section titles */
.section-title {
    position: relative;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Sections */
.section {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
}

.section h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--primary-color);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

/* Add this to your CSS */
.language-switcher {
    display: flex;
    align-items: center;
}

.language-btn {
    background: transparent;
    border: none;
    opacity: 0.6;
    transition: all 0.3s ease;
    margin: 0 5px;
    padding: 4px;
    border-radius: 4px;
}

.language-btn:hover {
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
}

.language-btn.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

.language-btn img {
    height: 20px;
    width: auto;
    border-radius: 2px;
}

@media (max-width: 992px) {
    .navbar-nav .language-switcher {
        margin-top: 15px;
        justify-content: center;
    }
}


.contact-form input,
.contact-form textarea {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-family);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.contact-form button:hover {
    background-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    padding: 3rem 5%;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--mono-font);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    nav ul li {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo, .footer-links, .footer-contact {
        margin-bottom: 2rem;
    }
}

/* Navbar adjustments */
.navbar-brand {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
}

/* Button styling */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* Add spacing for anchored sections */
section {
    scroll-margin-top: 80px;
}

/* Add JavaScript to toggle navbar background on scroll */
@media (max-width: 991.98px) {
    .navbar {
        background-color: rgba(36, 36, 36, 0.95) !important;
    }
    
    .navbar-collapse {
        padding: 1rem 0;
    }
    
    .py-6 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Feature boxes */
.feature-box {
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.feature-box h3 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Services cards */
.gradient-bg {
    background: linear-gradient(160deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-color);
}

.gradient-bg-alt {
    background: linear-gradient(160deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
    color: var(--text-color);
}

.text-white-75 {
    color: var(--text-muted);
}

.service-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Contact section */
.contact-card {
    border-radius: 8px;
    overflow: hidden;
    border: none;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact-form textarea {
    resize: vertical;
}

.form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(100, 108, 255, 0.25);
}

/* Project cards styling */
.project-card {
    height: 100%;
    transition: transform 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-image img {
    transition: transform 0.5s ease;
    display: block;
    width: 100%;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.features-list .badge {
    background-color: rgba(100, 108, 255, 0.2);
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
}

.project-details-card {
    background: linear-gradient(160deg, rgba(var(--bg-secondary), 0.8) 0%, rgba(var(--bg-color), 0.9) 100%);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.project-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add these to your existing CSS file */
.vite-inspired .badge.bg-secondary {
    background-color: rgba(100, 108, 255, 0.2) !important;
    color: var(--primary-color);
}

.btn:disabled {
    opacity: 0.7;
}

/* New Service Cards Design */
.services-container {
    perspective: 1000px;
}

.service-card-new {
    background-color: var(--service-card-bg);
    border: 1px solid var(--service-card-border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-card-new:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background-color: var(--service-card-hover-bg);
    border-color: var(--primary-color);
}

.service-card-inner {
    padding: 2.5rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 40%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.service-card-new:hover .service-icon-container {
    transform: rotate(5deg) scale(1.1);
}

.service-icon-new {
    font-size: 2rem;
    color: #fff;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.service-description {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 0;
}

.service-card-new::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    bottom: 0;
    left: 0;
    background: linear-gradient(to top, rgba(83, 91, 242, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card-new:hover::after {
    opacity: 1;
}

/* Expertise Section Styling */
.expertise-section {
    position: relative;
    background-color: var(--darker-color);
    overflow: hidden;
}

.expertise-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(100, 108, 255, 0.15), transparent 60%);
    z-index: 0;
}

.expertise-content {
    position: relative;
    background-color: rgba(20, 20, 20, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

.expertise-list {
    padding-left: 1.5rem;
}

.expertise-list li {
    margin-bottom: 0.5rem;
    position: relative;
}

.expertise-list li::before {
    content: '→';
    position: absolute;
    left: -1.5rem;
    color: var(--primary-color);
}

.skill-group {
    padding-left: 1rem;
    border-left: 2px solid var(--primary-color);
}

/* Code Block Styling */
.code-block {
    background-color: rgba(15, 15, 15, 0.8);
    border-radius: 8px;
    overflow: hidden;
    font-family: var(--mono-font);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.code-header {
    background-color: rgba(100, 108, 255, 0.2);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.code-content {
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-keyword {
    color: #ff79c6;
}

.code-var {
    color: #f1fa8c;
}

.code-property {
    color: #8be9fd;
}

.code-string {
    color: #50fa7b;
}

.code-function {
    color: #66d9ef;
}

.code-comment {
    color: #6272a4;
}

/* Case Highlight Styling */
.case-highlight {
    background-color: rgba(20, 20, 20, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(100, 108, 255, 0.3);
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.case-features-list {
    padding-left: 1.5rem;
    list-style-type: none;
}

.case-features-list li {
    position: relative;
    margin-bottom: 0.75rem;
}

.case-features-list li::before {
    content: '•';
    position: absolute;
    left: -1.5rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Project Feature List */
.project-feature-list {
    font-size: 0.9rem;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.project-feature-list li {
    margin-bottom: 0.5rem;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1010;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: var(--primary-hover);
}

.theme-toggle .dark-icon,
.theme-toggle .light-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dark-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.light-icon {
    opacity: 1;
    transform: rotate(0);
}

[data-theme="dark"] .dark-icon {
    opacity: 1;
    transform: rotate(0);
}

[data-theme="dark"] .light-icon {
    opacity: 0;
    transform: rotate(90deg);
}

/* Contact Button Styling */
.contact-button-container {
    display: flex;
    justify-content: center;
}

.btn-contact-fancy {
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-contact-fancy:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.btn-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.5rem;
}

.btn-contact-text {
    padding: 0 30px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: var(--mono-font);
}

/* Update existing styles to use theme variables */
.gradient-bg {
    background: linear-gradient(160deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-color);
}

.gradient-bg-alt {
    background: linear-gradient(160deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
    color: var(--text-color);
}

.text-white-75 {
    color: var(--text-muted);
}

.project-details-card {
    background: linear-gradient(160deg, rgba(var(--bg-secondary), 0.8) 0%, rgba(var(--bg-color), 0.9) 100%);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.service-card-new {
    background-color: var(--service-card-bg);
    border: 1px solid var(--service-card-border);
}

.service-card-new:hover {
    background-color: var(--service-card-hover-bg);
    border-color: var(--primary-color);
}

.footer {
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Update hero section */
.hero::before {
    background: radial-gradient(circle at top right, rgba(100, 108, 255, 0.15), transparent 50%),
                radial-gradient(circle at bottom left, rgba(83, 91, 242, 0.15), transparent 50%);
}

[data-theme="light"] .hero::before {
    background: radial-gradient(circle at top right, rgba(100, 108, 255, 0.1), transparent 50%),
                radial-gradient(circle at bottom left, rgba(83, 91, 242, 0.1), transparent 50%);
}

/* Project cards in light mode */
[data-theme="light"] .project-card {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .code-block {
    background-color: #2d2d2d;
}

[data-theme="light"] .code-content {
    color: rgba(255, 255, 255, 0.9);
}

/* Global transitions for smooth theme switching */
*, *::before, *::after {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Keep navbar dark in both themes */
.navbar {
    background-color: rgba(26, 26, 26, 0.95) !important;
}

/* Section-specific overrides to ensure they stay dark in both themes */
#om, .hero, .expertise-section {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Projects section styling - subtle difference between modes */
[data-theme="light"] #projekter {
    background-color: var(--content-bg);
}

/* Services section should show contrast in light mode */
[data-theme="light"] #services.gradient-bg {
    background: linear-gradient(160deg, #1d1d1d 0%, #151515 100%);
}

[data-theme="light"] .gradient-bg-alt {
    background: linear-gradient(160deg, #151515 0%, #1d1d1d 100%);
}

/* Update highlight sections to maintain contrast */
[data-theme="light"] .project-details-card {
    background: linear-gradient(160deg, rgba(35, 35, 35, 0.9) 0%, rgba(25, 25, 25, 0.95) 100%);
}

[data-theme="light"] .expertise-content {
    background-color: rgba(40, 40, 40, 0.7);
}

[data-theme="light"] .case-highlight {
    background-color: rgba(40, 40, 40, 0.7);
    border: 1px solid rgba(100, 108, 255, 0.3);
}

/* Feature boxes in light theme */
[data-theme="light"] .feature-box {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Service cards in light theme */
[data-theme="light"] .service-card-new {
    background-color: rgba(60, 60, 60, 0.8);
}

[data-theme="light"] .service-card-new:hover {
    background-color: rgba(70, 70, 70, 0.9);
}

/* Code blocks remain dark in both themes */
.code-block {
    background-color: rgba(15, 15, 15, 0.9);
}

/* Footer remains dark in both themes */
.footer {
    background-color: var(--bg-secondary) !important;
}

/* Particles container */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6; /* Global opacity control */
}

/* Make sure all sections appear above particles */
section, .container, .hero, #projekter, #om, #expertise, #services, #kontakt, footer {
    position: relative;
    z-index: 5;
}

/* Create semi-transparent overlays for section backgrounds to make particles more visible */
section::before, .gradient-bg::before, .gradient-bg-alt::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: inherit;
    opacity: 0.85; /* Slightly transparent to allow particles to show through */
    z-index: -1;
}

/* Special handling for gradient backgrounds */
.gradient-bg, .gradient-bg-alt {
    position: relative;
    background-blend-mode: multiply;
}
