/*
 * Custom stylesheet for Mile Kostoski's personal website.
 *
 * This theme draws inspiration from modern developer portfolios with a
 * dark backdrop, vibrant accent colours and clean typography. It
 * introduces a full‑width map with a pulsating marker to highlight
 * Skopje, North Macedonia, and uses responsive layouts to ensure
 * readability on both desktops and mobile devices.
 */

/* CSS variables for easy colour management */
:root {
    --bg-color: #0f131a;
    --primary-color: #00bcd4;
    --secondary-color: #1c2530;
    --text-color: #e0e6ed;
    --muted-color: #8a97a5;
}

/* Enable smooth scrolling between anchors */
html {
    scroll-behavior: smooth;
}

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

/* General section styling */
.section {
    padding: 1.5rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    text-align: center;
}

/* Hero section */
#hero {
    position: relative;
    height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Image gallery styling - replaces map styling */
#image-gallery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.gallery-image.active {
    opacity: 1;
}

/* Add overlay for better text contrast */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

/* Container for hero text */
.hero-info {
    position: relative;
    z-index: 2;
    color: var(--text-color);
    max-width: 600px;
    padding: 1rem;
    text-align: center;
    bottom: -40%;
}

.hero-info h1 {
    font-size: 2rem;
    margin-bottom: -0.5rem;
    font-weight: 700;
    text-align: center;
    color: white;
}

.hero-info .tagline {
    font-size: 1.4rem;
    margin: 0.1rem 0;
    color: white;
    font-weight: 600;
    text-align: center;
}

/* Time and location chip */
.time-location {
    background: rgba(15, 19, 26, 0.7);
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-align: center;
}

/* Profile image in the hero */
.hero-image {
    position: absolute;
    right: 35%;
    bottom: 0%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    z-index: 2;
    /*animation: imageBounce 3s ease-in-out infinite 3s;*/
}

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

/* Bounce animation for the profile image */
@keyframes imageBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-8px);
    }
}
/* Bouncing scroll down arrow */
.scroll-down {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--primary-color);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    text-decoration: none;
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }
    40% {
        transform: translate(-50%, -10px);
    }
    60% {
        transform: translate(-50%, -5px);
    }
}

/* Navigation bar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 19, 26, 0.8);
    backdrop-filter: blur(8px);
    z-index: 3;
}

#navbar ul {
    margin: 0;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 1.5rem;
}

#navbar li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

#navbar li a:hover {
    color: var(--primary-color);
}

/* Profile header styling */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem 0;
    border-bottom: 2px solid var(--primary-color);
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    flex-shrink: 0;
}

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

.profile-intro h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.profile-intro .tagline {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

/* Profile section layout */
.section-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.about,
.expertise {
    flex: 1 1 300px;
}

.about h3,
.expertise h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.about p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.expertise ul {
    padding-left: 1.2rem;
    margin-top: 0;
    margin-bottom: 0;
}

.expertise li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Experience section */
.experience-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(224, 230, 237, 0.1);
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.experience-item h3 {
    font-size: 1.4rem;
    margin: 0;
    font-weight: 600;
}

.experience-item .period {
    color: var(--muted-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.experience-item h4 {
    margin: 0.5rem 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.experience-item p {
    margin: 0.8rem 0 1rem;
    line-height: 1.6;
}

.experience-item ul.achievements {
    list-style: disc;
    padding-left: 1.2rem;
    margin: 1rem 0 1.5rem;
}

.experience-item ul.achievements li {
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

/* Technologies section with icons */
.technologies {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.technologies strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: flex-start;
    justify-content: flex-start;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.3s ease;
    min-width: 60px;
}

.tech-item:hover {
    transform: translateY(-3px);
}

.tech-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
    display: block;
}

.tech-item:hover .tech-icon {
    transform: rotate(5deg) scale(1.1);
}

.tech-item span {
    font-size: 0.7rem;
    color: var(--muted-color);
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
    word-wrap: break-word;
}

/* Skills section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.skill {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.skill span {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.skill .bar {
    background: var(--secondary-color);
    border-radius: 6px;
    overflow: hidden;
    height: 10px;
}

.skill .fill {
    background: var(--primary-color);
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Certification section */
#certifications .certification {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.certification img {
    width: 150px;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
}

.cert-info {
    flex: 1 1 300px;
}

.cert-info h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.cert-info .period {
    color: var(--muted-color);
    font-size: 0.9rem;
}

.cert-info p {
    margin: 0.5rem 0;
}

.verify-btn {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.verify-btn:hover {
    text-decoration: underline;
}

/* Contact section */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.contact-list li a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.contact-list li a:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--secondary-color);
    color: var(--muted-color);
    font-size: 0.8rem;
    margin-top: 4rem;
}

/* Pulsating location marker for Leaflet */
.leaflet-marker-icon.pulse-icon {
    background: var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(0, 188, 212, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(0, 188, 212, 0);
    }
    100% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(0, 188, 212, 0);
    }
}

/* Industry text overlay */
.industry-overlay {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: rgba(0, 188, 212, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.5s ease-in-out;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.industry-overlay.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    #hero {
        height: 60vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1rem;
    }

    .hero-info {
        position: static;
        margin-bottom: -20rem;
        bottom: auto;
    }

    .hero-info h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-info .tagline {
        font-size: 1rem;
        margin: 0.2rem 0;
    }

    .hero-image {
        position: static;
        width: 100px;
        height: 100px;
        margin: 0 auto;
        right: auto;
        bottom: auto;
    }

    .video-background {
        display: none;
    }

    #hero {
        background: linear-gradient(135deg, #0f131a 0%, #1c2530 100%);
    }

    #hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(15, 19, 26, 0.8) 0%, rgba(28, 37, 48, 0.8) 100%);
        z-index: 0;
    }

    /* Education section styling - matching experience section */
    .education-item {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(224, 230, 237, 0.1);
    }

    .education-item .exp-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .education-item h4 {
        margin: 0.5rem 0;
        color: var(--text-color);
        font-weight: 600;
    }

    .sub-degree {
        font-style: italic;
        color: var(--text-color);
        margin: 0.5rem 0;
    }

    .location {
        color: var(--muted-color);
        font-size: 0.9rem;
        margin: 0.25rem 0 1rem 0;
    }

    /* Mobile profile header */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .profile-intro h1 {
        font-size: 2rem;
    }

    .profile-intro .tagline {
        font-size: 1.1rem;
    }
}