/* =========================================
   BASE & RESET
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* font-family intentionally NOT applied to ::before/::after —
   icon libraries (Font Awesome, Devicon) render glyphs via those
   pseudo-elements using their own @font-face; overriding breaks icons. */
* {
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
}

section {
    /* Offset scroll-stop for fixed nav */
    scroll-margin-top: 80px;
}


/* =========================================
   NAVIGATION
   ========================================= */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #e7e5e5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    z-index: 1000;
}

/* Hamburger icon — hidden on desktop */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #000000;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    letter-spacing: -2px;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #000000;
    font-size: 0.9rem;
    font-weight: 700;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.6;
}

.btn-contact {
    background-color: #000000;
    color: #ffffff !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.8rem !important;
}


/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(105deg, #e4e4e4 46%, #000000 46%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 100px;
    /* Clears the fixed nav */
}

.hero-content {
    display: flex;
    flex: 1;
    padding: 0 5%;
    align-items: center;
    justify-content: space-between;
}

/* Left side — text */
.left-text {
    width: 45%;
    color: #000000;
}

.left-text p:first-child {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.left-text h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.left-text h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #7a7a7a;
    margin-bottom: 3rem;
}

/* Social icons */
.socials {
    display: flex;
    gap: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #f0f0f0, #cacaca);
    color: #000;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), -4px -4px 8px rgba(255, 255, 255, 0.8);
    transition: transform 0.2s;
}

.social-btn:hover {
    transform: translateY(-3px);
}

/* Right side — image */
.right-image {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    position: relative;
}

.right-image img {
    max-height: 85vh;
    object-fit: contain;
    z-index: 5;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.22));
}

.image-caption {
    position: absolute;
    bottom: 2rem;
    right: 10%;
    font-size: 0.7rem;
    color: #a0a0a0;
    text-align: right;
    max-width: 150px;
}


/* =========================================
   ABOUT ME SECTION
   ========================================= */
.about-section {
    background: radial-gradient(circle, #f9f9f9 0%, #ebebeb 100%);
    padding: 6rem 5%;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-intro {
    max-width: 800px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 3rem;
}

/* Decorative divider ( \\// ) */
.decorative-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 5rem;
    width: 100%;
}

.decorative-divider .line {
    height: 2px;
    width: 60px;
    background-color: #000000;
}

.decorative-divider .chevron {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 1.2rem;
}

/* Services / Expertise grid */
.services-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 900px;
    width: 100%;
    row-gap: 4rem;
}

.service-box {
    width: 45%;
    text-align: center;
    position: relative;
    padding-left: 1rem;
}

/* Centre the lone bottom item */
.centered-box {
    margin: 0 auto;
    width: 50%;
    text-align: center;
    padding-left: 0;
}

.service-box h4 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.service-box p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #555;
    position: relative;
    z-index: 2;
}

.bg-icon {
    position: absolute;
    top: -20px;
    left: -20px;
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.05);
    z-index: 1;
}

.centered-box .bg-icon {
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
}


/* =========================================
   SKILLS SECTION
   ========================================= */
.skills-section {
    background: radial-gradient(circle, #ffffff 0%, #e0e0e0 100%);
    padding: 6rem 5%;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Shared boxed section title */
.section-title {
    margin-bottom: 4rem;
}

.section-title h2,
h2.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 6px;
    text-transform: uppercase;
    border: 4px solid #000000;
    padding: 1rem 3rem;
    display: inline-block;
}

.skills-container {
    width: 100%;
    max-width: 800px;
}

.category-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    margin-top: 3rem;
    text-transform: uppercase;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 2.5rem;
    text-align: center;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.skill-item i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.skill-item i:hover {
    transform: scale(1.1);
}

.skill-item span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #333333;
}

/* "LEARNING" badge */
.badge {
    margin-top: 0.5rem;
    background-color: #1a1a1a;
    color: #ffffff !important;
    font-size: 0.6rem !important;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 1px !important;
}


/* =========================================
   PERSONAL PROJECTS SECTION
   ========================================= */
.personal-projects-section {
    background: radial-gradient(circle, #ffffff 0%, #e0e0e0 100%);
    padding: 6rem 5%;
    color: #000000;
    text-align: center;
}

.personal-projects-section .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 60px;
    justify-content: center;
    text-align: left;
    margin-top: 60px;
}

.project-card {
    background: #f4f5f7;
    color: #000;
    padding: 30px;
    border: none;
    border-radius: 16px;
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.08),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 15px;
    color: #000000;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 25px;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: #000000;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.project-link:hover {
    color: #555555;
    transform: translateX(5px);
}

.status-badge {
    align-self: flex-start;
    background-color: #111111;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* =========================================
   FOOTER
   ========================================= */
.main-footer {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 0 30px;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 5px 0;
}

.footer-motto {
    font-size: 0.9rem;
    color: #aaaaaa;
    margin: 0;
    font-style: italic;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #222222;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.footer-links a:hover {
    background-color: #444444;
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #333333;
    font-size: 0.85rem;
    color: #888888;
}

.footer-bottom p {
    margin: 0;
}

.psb-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s ease;
}

.psb-link:hover {
    opacity: 0.7;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.read-more::before,
.read-more::after {
    content: '';
    display: inline-block;
    height: 15px;
    width: 2px;
    background-color: #ffffff;
    margin: 0 10px;
}


/* =========================================
   BACK TO TOP BUTTON
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #000000;
    color: #ffffff;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #555555;
    transform: translateY(-5px);
}


/* =========================================
   TABLET & SMALL DESKTOP  (850px – 1150px)
   ========================================= */
@media (max-width: 1150px) and (min-width: 850px) {
    .hero {
        background: linear-gradient(105deg, #e4e4e4 55%, #000000 55%);
        min-height: 80vh;
    }

    .left-text {
        width: 50%;
        padding-right: 20px;
    }

    .left-text h1 {
        font-size: 2.4rem;
    }

    .left-text h2 {
        font-size: 0.85rem;
        max-width: 95%;
    }

    .right-image {
        width: 50%;
        align-self: flex-end;
    }

    .right-image img {
        max-height: 70vh;
        object-position: bottom right;
    }
}


/* =========================================
   MOBILE  (≤ 850px)
   ========================================= */
@media (max-width: 850px) {
    .sticky-nav {
        flex-direction: row;
        padding: 1.5rem 5%;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        padding: 2rem 0;
        gap: 2rem;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        z-index: -1;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .hero {
        background: linear-gradient(180deg, #e4e4e4 55%, #000000 45%);
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .left-text {
        width: 100%;
        margin-bottom: 2rem;
    }

    .right-image {
        width: 100%;
        height: auto;
        margin-top: 1rem;
    }

    .right-image img {
        width: 100%;
        height: auto;
    }

    .socials {
        justify-content: center;
        margin-bottom: 2rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
        padding: 0.75rem 1.25rem;
        letter-spacing: 4px;
    }

    .about-section,
    .skills-section {
        padding: 4rem 5%;
    }

    .services-container {
        flex-direction: column;
        gap: 3rem;
    }

    .service-box,
    .centered-box {
        width: 100%;
        text-align: center;
        padding-left: 0;
    }

    .bg-icon {
        left: 50%;
        transform: translateX(-50%);
    }

    .personal-projects-section .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}