/* ------------------------------------ */
/* 1. Variables                         */
/* ------------------------------------ */

:root {
    --primary-color: rgb(130, 130, 130);
    --background-color: #e3e3e3;
    --accent-color: #ffcf32;
    --text-secondary: #545454;

    --font-family-base: "Inter", sans-serif;
    --font-family-title: "Space Grotesk", sans-serif;
}


/* ------------------------------------ */
/* 2. Base Styles & Resets              */
/* ------------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family-base);
}

body {
    background-color: var(--background-color);
    color: var(--primary-color);
    line-height: 1.5;
    padding-top: 1px;
    align-items: center;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 4em;
}

/* ------------------------------------ */
/* 3. Navigation                        */
/* ------------------------------------ */
.top-navigation {
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(107, 107, 107, 0.616);
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* Changed to space-between */
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo {
    height: 40px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

.hamburger-menu {
    display: none;
    cursor: pointer;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: 0.4s;
}

.mobile-nav-overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0, 0.9);
    overflow-x: hidden;
    transition: 0.5s;
}

.mobile-nav-overlay.active {
    width: 100%;
}

body.mobile-nav-active {
    overflow: hidden;
}

.mobile-nav-overlay-content {
    position: relative;
    top: 25%;
    width: 100%;
    text-align: center;
    margin-top: 30px;
}

.mobile-nav-overlay .nav-link {
    padding: 8px;
    text-decoration: none;
    font-size: 36px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.mobile-nav-overlay .nav-link:hover, .mobile-nav-overlay .nav-link:focus {
    color: #f1f1f1;
}

.mobile-nav-overlay .close-btn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
    color: #818181;
    cursor: pointer;
}

/* ------------------------------------ */
/* 4. Hero Section (Home Page)          */
/* ------------------------------------ */
.hero {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10% 5%;
    background: var(--background-color);
}

.hero-profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    border: 5px solid var(--accent-color);
}

.hero-video {
    width: 90%;
    max-width: 1000px;
    border-radius: 15px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.title {
    font-family: var(--font-family-title);
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-secondary);
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    text-align: left;
    margin-bottom: 2rem;
}

/* ------------------------------------ */
/* 5. Common Components                 */
/* ------------------------------------ */

.projects {
    width: 90%;
    max-width: 1200px;
    padding: 1rem 1rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-button {
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    background-color: var(--accent-color);
    color: var(--text-secondary);
    padding: 0vw;
    text-decoration: none;
    border-radius: 10px;
}

.cta-button svg {
    align-items: center;
    padding: 1vw;
}

.common-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.common-card {
    background-color: rgba(50, 50, 50, 0.07);
    padding: 4vw;
    border-radius: 8px;
    width: 100%; /* Ensure card takes full width of its grid column */
}

.common-card img {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below image */
    border-radius: 8px;
    margin-bottom: 1rem;
}

.common-content {
    background-color: rgba(80, 80, 80, 0.04);
    padding: 2rem;
    border-radius: 8px;
}

.project-title {
    font-family: var(--font-family-title);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ------------------------------------ */
/* 6. Contact & About Sections          */
/* ------------------------------------ */
.contact-section {
    padding: 5rem 10%;
    background: var(--background-color);
    text-align: center;
}

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

.contact-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--text-secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    perspective: 1000px;
}

.contact-card:hover {
    transform: translateY(-5px) rotateY(4deg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background-color: #fff;
}

.contact-icon {
    width: 32px;
    height: 32px;
    margin-right: 1.5rem;
    fill: var(--accent-color);
}

.contact-card h4 {
    font-family: var(--font-family-title);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.contact-card p {
    font-weight: 500;
    color: var(--primary-color);
}

.about-section {
    padding: 5rem 10%;
    background: #f0f0f0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image-container {
    width: 100%;
    height: 400px;
    mask-image: radial-gradient(circle at left, black 30%, transparent 90%);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    overflow: hidden;
}

.about-content {
    text-align: left;
}

.section-title {
    font-family: var(--font-family-title);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

.certification-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
    border-left: 5px solid var(--accent-color);
}

.certification-title {
    font-family: var(--font-family-title);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.certification-issuer {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* ------------------------------------ */
/* 7. Blog/Articles Page Specific       */
/* ------------------------------------ */
.articles-page-header {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('assets/cloud.jpg') no-repeat center center/cover;
    position: relative;
}

.articles-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.articles-page-header .header-content {
    position: relative;
    z-index: 2;
    color: white;
}

.articles-page-header .title,
.articles-page-header .subtitle {
    color: white;
}

.header {
    height: 50vh;
    display: flex;
    align-items: center;
    padding: 5% 16%;
    background: var(--background-color);
}

.common-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}



/* ------------------------------------ */
/* 8. Media Queries                     */
/* ------------------------------------ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .hero {
        padding: 0 5%;
    }

    .title {
        font-size: 2rem;
    }

    .common-grid {
        grid-template-columns: 1fr;
        padding: 3rem 5%;
    }

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