/* Grundläggande stilar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    color: #2d3436;
}

html {
    scroll-behavior: smooth;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-brand a {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-brand a:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #6366f1;
}

.nav-link:hover::after {
    width: 100%;
}

/* Aktiv länk */
.nav-link.active {
    color: #6366f1;
}

.nav-link.active::after {
    width: 100%;
}

/* Hamburger menu för mobil */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #6366f1;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Responsiv design för menyn */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    /* Hamburger animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -5px);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn.primary {
    background: white;
    color: #6366f1;
}

.btn.secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Project Grid */
.projects {
    padding: 6rem 2rem;
    background: #fff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 250px;
    overflow: hidden;
}

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

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

/* Skills Section */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 3rem;
    padding: 4rem 2rem;
    background: #f8f9fa;
}

.skill-item {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-item:hover {
    transform: translateY(-5px) rotate(3deg);
}

.skill-item i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00b894;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #dcedc1 0%, #a8e6cf 100%);
    padding: 6rem 2rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #00b894;
    box-shadow: 0 0 0 4px rgba(0, 184, 148, 0.1);
    outline: none;
}

.submit-btn {
    background: #00b894;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #00a884;
    transform: translateY(-2px);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    background: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00b894;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #00b894;
    color: #fff;
    transform: rotate(360deg);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card, .skill-item {
    animation: fadeUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 6rem 1rem 2rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #00b894;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00a884;
}

/* LinkedIn Section */
.linkedin-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.linkedin-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    color: #0077b5;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.linkedin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.linkedin-btn i {
    font-size: 1.5rem;
}

/* Featured Projects Section */
.featured-projects {
    padding: 6rem 2rem;
    background: white;
}

.featured-projects h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* Project Card Styles */
.project-features {
    margin-top: 1.5rem;
}

.project-features h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.project-features ul {
    list-style: none;
    padding: 0;
}

.project-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.project-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #6366f1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tags span {
    background: #f0f0f0;
    color: #6366f1;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.project-tags span:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
}

/* Section spacing */
section {
    padding-top: 80px; /* För att innehåll inte ska hamna under menyn */
    min-height: 100vh;
}

/* CV Download Button */
.cv-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cv-btn i {
    font-size: 1.2rem;
}

.cv-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Profile Container */
.profile-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin: 2rem 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #6366f1;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bio {
    flex: 1;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* CV Download Mobile */
.cv-download-mobile {
    display: none;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        text-align: center;
    }

    .cv-download-mobile {
        display: block;
    }

    .hero-buttons .cv-btn {
        display: none;
    }
}

/* About Section Styles */
.about {
    padding: 6rem 2rem;
    background: #fff;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.name-title {
    text-align: center;
    margin-bottom: 2rem;
}

.name-title h1 {
    font-size: 2.5rem;
    color: #2d3436;
    margin-bottom: 0.5rem;
}

.name-title h3 {
    color: #6366f1;
    font-size: 1.5rem;
}

.profile-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3436;
}

.skills-section {
    margin: 2rem 0;
}

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

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-2px);
    background: #6366f1;
    color: white;
}

.skill-item i {
    color: #6366f1;
}

.skill-item:hover i {
    color: white;
}

.experience-item, .education-item {
    margin-bottom: 2rem;
}

.experience-item h4, .education-item h4 {
    color: #2d3436;
    margin-bottom: 0.5rem;
}

.position {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.timeline-date {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.education-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    position: relative;
}

.education-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.school-title {
    color: var(--secondary);
    font-weight: 600;
    margin: 1rem 0;
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}

.date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-details p {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-details i {
    color: #6366f1;
    width: 20px;
}

.contact-details a {
    color: #6366f1;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .about {
        padding: 4rem 1rem;
    }

    .name-title h1 {
        font-size: 2rem;
    }

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

/* Course Content Styles */
.course-content {
    position: relative;
    margin-top: 1rem;
}

.courses-list {
    margin-top: 1rem;
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
}

.courses-list h5 {
    color: #14b8a6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.courses-list ul {
    list-style: none;
    padding: 0;
}

.courses-list li {
    padding: 0.4rem 0;
    color: #334155;
    position: relative;
    padding-left: 1.2rem;
}

.courses-list li::before {
    content: '•';
    color: #14b8a6;
    position: absolute;
    left: 0;
}

.preview-text {
    margin: 0;
    color: #334155;
}
