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

:root {
    --color-primary: #0A2342;
    --color-background: #F4F6F8;
    --color-text: #333333;
    --color-secondary: #2CA58D;
    --color-section-bg: #FFFFFF;
    --font-header: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    background-color: var(--color-background);
    color: var(--color-text);
}

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

/* Header */
.main-header {
    background: var(--color-section-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: var(--font-header);
    color: var(--color-primary);
    margin: 0;
    font-size: 1.8rem;
}

.logo p {
    margin: 0;
    color: var(--color-text);
}

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

.main-nav li {
    margin-left: 20px;
}

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

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-secondary);
}

/* Desktop Navigation */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .nav-overlay {
        display: none !important;
    }

    .main-nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        padding-top: 0;
    }

    .main-nav ul {
        flex-direction: row;
        padding: 0;
        margin: 0;
    }

    .main-nav li {
        margin: 0 0 0 20px;
        text-align: center;
        border-bottom: none;
        padding-bottom: 0;
    }

    .main-nav a {
        font-size: 1rem;
        padding: 0;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-family: var(--font-header);
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.5rem;
}

/* Sections */
main section {
    padding: 60px 0;
    background: var(--color-section-bg);
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

main section:nth-child(even) {
    background: var(--color-background);
}

h2 {
    font-family: var(--font-header);
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

h3 {
    font-family: var(--font-header);
    color: var(--color-primary);
    margin-bottom: 10px;
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-image {
    flex-shrink: 0;
}

.about-image img {
    max-width: 150px;
    border-radius: 50%;
    border: 5px solid var(--color-secondary);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--color-secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 60px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 60px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--color-secondary);
    border: 2px solid var(--color-primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-item h3 {
    color: var(--color-primary);
}

.timeline-date {
    font-style: italic;
    color: #777;
}

/* Skills */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* or left, if you prefer the tags to be left-aligned within the category */
    gap: 15px;
    margin-bottom: 30px; /* Add spacing after the grid */
}

.skill-tag {
    background: var(--color-secondary);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    white-space: nowrap; /* Prevents individual tags from breaking onto a new line */
}

/* New styles for grouping */
.skills-category {
    margin-bottom: 40px; /* Spacing between groups */
    text-align: center; /* Center-align the category headings */
}

.skills-category h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--color-primary); /* Use your primary color for headings */
    font-size: 1.5em;
    border-bottom: 2px solid #eee; /* Light separating line */
    padding-bottom: 5px;
    display: inline-block; /* So the line follows the text width */
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.gallery-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item h3 {
    font-size: 1rem;
    padding: 15px;
    text-align: center;
    margin: 0;
    background: var(--color-primary);
    color: white;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contact Section */
#contact {
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url('../assets/images/contact-background.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    padding-bottom: 80px; /* Add padding to ensure scroll space */
}

#contact a {
    color: var(--color-primary);
    font-weight: bold;
    text-decoration: none;
}

#contact a:hover {
    color: var(--color-secondary);
}

/* Footer */
.main-footer {
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: 20px 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    width: 80%;
    height: 80%;
}

.lightbox-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.lightbox iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Very Small Mobile Styles */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

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

    .main-header .container {
        padding: 0 5px;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .logo p {
        font-size: 0.7rem;
    }

    .main-nav {
        width: 85%;
    }

    .timeline::after {
        left: 15px;
    }

    .timeline-item {
        padding-left: 35px;
        padding-right: 15px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .main-header .container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo p {
        font-size: 0.9rem;
    }

    .main-nav li {
        margin-left: 15px;
    }

    .main-nav a {
        font-size: 0.9rem;
    }

    .timeline::after {
        left: 30px;
    }

    .timeline-item {
        padding-left: 60px;
        padding-right: 30px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .main-header .container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 10px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .logo p {
        font-size: 0.8rem;
    }

    /* Hamburger Menu */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
    }

    .menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--color-primary);
        margin: 3px 0;
        transition: 0.3s;
        border-radius: 2px;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

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

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

    /* Navigation Menu */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--color-section-bg);
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        padding-top: 80px;
        z-index: 1000;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-overlay.active {
        display: block;
    }

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

    .main-nav ul {
        flex-direction: column;
        padding: 20px;
        margin: 0;
    }

    .main-nav li {
        margin: 15px 0;
        text-align: left;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        font-size: 1.1rem;
        display: block;
        padding: 10px 0;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 20px;
        text-align: left !important;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 12px;
    }
}