:root {
    --accent: #7346ad;
    --bg: #f5f5f5;
    --text: #222;
    --muted: #666;
    --card-bg: #fff;
    --radius: 12px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    font-family: sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

header {
    text-align: center;
    padding: 4rem 1rem 2rem;
    background: linear-gradient(135deg, var(--accent), #8d5cb8);
    color: white;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

nav {
    text-align: center;
    background: var(--bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav a {
    display: inline-block;
    padding: 1rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

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

section {
    max-width: 900px;
    margin: 3rem auto;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

section h2 {
    border-left: 4px solid var(--accent);
    padding-left: 10px;
    margin-bottom: 1rem;
}

.skills, .contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill {
    background: var(--accent);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.project {
    margin-bottom: 1.5rem;
}

.project img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

a{
    text-decoration: none;
    color: var(--accent);
}

footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.dark-mode {
    --bg: #1e1e1e;
    --text: #eee;
    --muted: #aaa;
    --card-bg: #2b2b2b;
    --shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

#toggle-theme {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
}
#toggle-theme:hover {
    transform: scale(1.05);
}
.certificates {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.certificate {
    text-align: center;
    flex: 1 1 400px; /* tar plass men krymper ved behov */
    max-width: 420px;
}

.certificate img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.certificate img:hover {
    transform: scale(1.02);
}

/* Responsiv oppførsel for små skjermer */
@media (max-width: 700px) {
    .certificates {
    flex-direction: column;
    align-items: center;
    }
    .certificate {
    max-width: 90%;
    }
}

