@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@400;700&display=swap');

:root {
    --primary-color: #001f5b;
    --background-color: #ffffff;
    --text-color: #333333;
    --muted-color: #f8f9fa;
    --muted-text-color: #6c757d;
}

.dark-mode {
    --primary-color: #4a7cff;
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --muted-color: #2c2c2c;
    --muted-text-color: #a0a0a0;
}

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

html, body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
}

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

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

nav ul {
    display: flex;
    list-style-type: none;
}

nav ul li {
    margin-right: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.header-controls {
    display: flex;
    align-items: center;
}

#dark-mode-toggle, #language-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    margin-left: 1rem;
    padding: 0.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

#dark-mode-toggle:hover, #language-toggle:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

#language-toggle .flag {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

#language-toggle:hover .flag {
    transform: rotate(360deg);
}

.section {
    padding: 4rem 0;
    scroll-margin-top: 4rem;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 2rem;
}

p {
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .profile-photo {
        width: 180px;
        height: 180px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
}

@media (max-width: 767px) {
    .profile-photo {
        width: 120px;
        height: 120px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-intro {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
}

#hero {
    text-align: center;
    padding-top: 6rem;
}

.hero-background {
    position: relative;
    width: 100vw;
    height: 500px;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: blur(1px);
}

.profile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--background-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.hero-title {
    font-size: 3.5rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    font-weight: 600;
}

.hero-intro {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    background: rgba(0,0,0,0.2);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.profession {
    font-size: 1.2rem;
    color: var(--muted-text-color);
    margin-bottom: 1rem;
}

.intro {
    max-width: 600px;
    margin: 0 auto;
}

.quick-facts {
    background-color: var(--muted-color);
    padding: 1.5rem;
    border-radius: 8px;
}

.quick-facts ul {
    list-style-type: none;
}

.quick-facts li {
    margin-bottom: 0.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.experience-item {
    margin-bottom: 1.5rem;
}

.date {
    font-size: 0.9rem;
    color: var(--muted-text-color);
}

.story-card {
    background-color: var(--muted-color);
    padding: 1.5rem;
    border-radius: 8px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--muted-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-button:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

footer {
    background-color: var(--muted-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: 4rem;
}

#scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#scroll-top:hover {
    background-color: var(--text-color);
}

.cv-download {
    margin-top: 2rem;
    text-align: center;
}

.cv-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cv-button:hover {
    background-color: var(--text-color);
    transform: translateY(-2px);
}

.no-return{
    white-space: nowrap;
}

/* WorldSkills Page Styles */
.worldskills-header {
    text-align: center;
    padding: 4rem 0 2rem 0;
    background: linear-gradient(135deg, #001f5b 0%, #003d7a 100%);
    color: #ffffff;
    margin: 0 -20px;
    width: calc(100% + 40px);
}

.worldskills-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.worldskills-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
}

.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.blog-post {
    background-color: var(--muted-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.post-header {
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.post-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.post-meta {
    color: var(--muted-text-color);
    font-size: 0.9rem;
}

.post-content {
    line-height: 1.8;
    text-align: justify;
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.highlight-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003d7a 100%);
    color: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.highlight-box h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.highlight-box ul {
    list-style-type: none;
    padding-left: 0;
}

.highlight-box li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.highlight-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2ecc71;
    font-weight: bold;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.skill-category {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
}

.skill-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-category ul {
    list-style-type: none;
    padding-left: 0;
}

.skill-category li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.skill-category li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.goals-list {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
}

.goals-list h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.goals-list ol {
    padding-left: 1.5rem;
}

.goals-list li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Responsive Design for WorldSkills */
@media (max-width: 768px) {
    .worldskills-title {
        font-size: 2.5rem;
    }
    
    .worldskills-subtitle {
        font-size: 1.1rem;
    }
    
    .blog-post {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .post-header h2 {
        font-size: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .skill-category {
        padding: 1rem;
    }
}

/* Carousel Styles */
.carousel-section {
    margin: 3rem 0;
    text-align: center;
}

.carousel-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 420px; /* Reduce overall carousel height so images are less zoomed */
    overflow: hidden;
    padding-bottom: 60px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-image {
    width: 100%;
    flex: 1;
    /* Use contain so the whole image is visible without being cropped */
    object-fit: contain;
    background-color: #000; /* Optional: add bars around images instead of showing page background */
    display: block;
}

/* Specific resize for the first OPNsense image */
.carousel-image.opnsense-img-1 {
    width: auto;
    max-width: 70%;
    max-height: 80%;
    margin: 0 auto;
}

/* Specific resize for the extra OPNsense image */
.carousel-image.opnsense-img-extra {
    width: auto;
    max-width: 70%;
    max-height: 80%;
    margin: 0 auto;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.75rem 1rem;
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    z-index: 2;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 15;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .carousel-title {
        font-size: 2rem;
    }
    
    .carousel-wrapper {
        height: 300px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .carousel-dots {
        bottom: 15px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}