:root {
    --primary-color: #007acc;
    --secondary-color: #2c3e50;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --white: hsl(0, 0%, 100%);
    --nav-bg: rgb(17, 16, 26);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

h1, h2, h3, h4 {
    color: var(--secondary-color);
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

/* Navbar */
#navbar {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
#hero {

    background: var(--secondary-color);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    background-image: url(/assets/portrait.jpg);

 background-repeat: no-repeat;
background-position: center;
background-size: cover;
 background-color: rgb(26, 25, 37);
  height: 100vh;

}
.hero-content{
      text-align: left;
      margin-left: 40px;

}
#hero h1 {
    color: var(--white);
    margin: 20px 0 10px;
}

.hero-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    background-color: #ddd; /* placeholder color */
}

/* Grids (Skills, Portfolio, Testimonials) */
.skills-grid, .portfolio-grid, .testimonials-grid {
    display: grid;
    gap: 20px;
}

.skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.portfolio-grid, .testimonials-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.skill-card, .portfolio-card, .testimonial-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

.skill-card:hover, .portfolio-card:hover {
    transform: translateY(-5px);
}

.portfolio-card h3 {
    margin-bottom: 10px;
}

.portfolio-card a {
    display: inline-block;
    margin: 10px 10px 0;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.testimonial-card {
    font-style: italic;
}

.testimonial-card h4 {
    margin-top: 15px;
    font-style: normal;
}

/* Forms */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

#contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#contact-form input, #contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.error-message {
    color: red;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #005a9e;
}

/* Footer */
#footer {
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
}

.social-links {
    margin-bottom: 15px;
}

.social-links a {
    color: var(--white);
    margin: 0 10px;
    text-decoration: none;
    font-size: 1.2rem;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Media Queries f�r Responsivitet */
@media screen and (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: var(--nav-bg);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        text-align: center;
        padding: 20px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-img {
        width: 150px;
        height: 150px;
    }
}
