
@font-face {
    font-family: 'Bagnard Sans';
    src: url('fonts/BagnardSans.otf') format('opentype');
}

@font-face {
    font-family: 'BluuNext-Bold';
    src: url('fonts/BluuNext-Bold.otf') format('opentype');
    font-weight: bold;
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500; /* Medium weight */
}


/* Colour Theme */
:root {
    --cream: #fefae0;
    --light-green: #606c38;
    --mid-green: #283618;
    --dark-green: #1a2310;
    --light-orange: #dda15e;
    --dark-orange: #bc6c25;
}

/* Reset all the default margins and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3 {
    font-family: 'BluuNext-Bold', serif;
    position: relative;
}

body, p, a, span {
    font-family: 'Bagnard Sans', serif;
}

.curved_diamond {
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 4px rgba(254, 250, 224, 0.8));
}

header {
    width: 60%;
    height: 60px;
    background-color: var(--mid-green);
    color: var(--cream);
    display: flex;
    align-items: center;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0px;
    z-index: 100;
    border-radius: 50px;
}

body {
    background: linear-gradient(
        180deg,
        var(--cream) 0%,
        var(--cream) 15%,
        var(--light-green) 35%,
        var(--light-green) 45%,
        var(--mid-green) 65%,
        var(--mid-green) 75%,
        var(--dark-green) 85%,
        var(--dark-green) 100%
    );
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

nav {
    width: 100%;
    height: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 0;
    height: 100%;
}

nav ul li {
    position: relative;
    height: 100%;
}

/* Adjust the last nav item for rounded corners */
nav ul li:last-child .nav-link {
    border-top-right-radius: 40px;
    border-bottom-right-radius: 40px;
}

.nav-link {
    color: var(--cream);
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    padding: 0 2rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    background-color: var(--light-green);
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--cream);
}

main {
    background-color: transparent;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    overflow: hidden;
}

/* Welcome Section */

#welcome-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

/* Diagonal stripes */
.diagonal-stripes {
    position: absolute;
    width: 300vw;
    height: 100%;
    top: -50vh;
    right: -100vw;
    transform: rotate(-45deg);
    transform-origin: center;
    z-index: 0;
    pointer-events: none;
}

.diagonal-stripes::before {
    content: '';
    position: absolute;
    height: 150px;
    background-color: rgba(254, 250, 224, 0.1);
    width: 100%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Ensure text stays on top */
#welcome-section h1,
#welcome-section h2 {
    position: relative;
    z-index: 2;
}

#welcome-section h1 {
    color: var(--mid-green);
    font-size: 4rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

/* Left Line */
#welcome-section h1::before {
    content: '';
    position: absolute;
    bottom: 0.15rem;
    left: 50%;
    transform: translateX(-420px);
    width: 400px;
    height: 3px;
    background-color: var(--mid-green);;
    margin-right: 8px;
}

/* Right Line */
#welcome-section h1::after {
    content: '';
    position: absolute;
    bottom: 0.15rem;
    right: 50%;
    transform: translateX(420px);
    width: 400px;
    height: 3px;
    background-color: var(--mid-green);
    margin-left: 8px;
}


#welcome-section h1 .curved_diamond {
    bottom: -0.4rem;
}


#welcome-section h2 {
    color: var(--light-green);
    font-size: 1.5rem;
    font-weight: 300;
    position: relative;
    padding-bottom: 1rem;
}


/* Project Section */

#projects {
    background-color: transparent;
    padding: 4rem 2rem;
    min-height: auto;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

#projects h2 {
    color: var(--cream);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

/* Left Line */
#projects h2::before {
    content: '';
    position: absolute;
    bottom: 0;

    /* Uncomment this for seamless line and remove below */
    /* right: 50%; */

    /* Remove this for seamless line instead of split */
    left: 50%;
    transform: translateX(-220px);
    /*  */

    width: 200px;
    height: 3px;
    background-color: var(--cream);
    margin-right: 8px;
}

/* Right Line */
#projects h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    
    /* Uncomment this for seamless line and remove below */
    /* left: 50%; */

    /* Remove this for seamless line instead of split */
    right: 50%;
    transform: translateX(220px);
    /*  */

    width: 200px;
    height: 3px;
    background-color: var(--cream);
    margin-left: 8px;
}

/* Diamond
.diamond-decorator {
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    border: 3px solid var(--cream);
    background-color: var(--light-green);
    
} */

#projects .curved_diamond {
    bottom: -9px;
}

.projects-container {
    background: rgba(254, 250, 224, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(254, 250, 224, 0.2);
    padding: 1rem;
    margin: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.project-grid {
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem;
    position: relative;
    align-items: flex-end;
}

.project-tile {
    width: 600px;
    margin-top: -150px;
    margin-right: 50px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 4px solid rgba(254, 250, 224, 0.4);
    box-shadow: 
        0 0 10px 5px rgba(254, 250, 224, 0.2),
        0 0 0 1px rgba(254, 250, 224, 0.3);
    background-color: transparent;
    cursor: pointer;
}

.project-tile a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.project-tile:hover {
    transform: translateY(-10px) scale(1.05);
    z-index: 2;
    border-color: rgba(254, 250, 224, 0.5);
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.2),
        0 0 0 1px rgba(254, 250, 224, 0.4);
}

.project-tile:first-child {
    margin-top: 0;
    margin-right: 0;
}

.project-tile:nth-child(2) { margin-right: 200px; }
.project-tile:nth-child(3) { margin-right: 400px; }
.project-tile:nth-child(4) { margin-right: 600px; }

.project-tile img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.project-tile:hover .project-title::after {
    width: 50%;
}

.project-tile:hover .project-title {
    color: var(--light-orange);
}


/* Project Title */

.project-title {
    background-color: var(--mid-green);
    color: var(--cream);
    padding: 1rem;
    text-align: center;
    margin: 0;
    order: -1;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    position: relative;
}

.project-title a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    display: block;
    position: relative;
}

.project-title a:hover {
    color: var(--light-orange);
}

.project-title::after {
    background-color: var(--light-orange);
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 5px;
    border-radius: 2px;
    left: 50%;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.project-title a:hover::after {
    width: 50%;
}

.experience-container {
    width: 80%;
    max-width: 1200px;
    padding: 2rem;
}


.skills-container {
    background-color: var(--mid-green);
    border-radius: 20px;
    padding: 3rem;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    margin-top: 3rem;
    border: 1px solid var(--cream);
}

.skill-divider {
    width: 2px;
    height: 50px;
    background-color: var(--cream);
    opacity: 0.3;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--cream);
    transition: all 0.3s ease;
    padding: 1rem;
    opacity: 0.6;
}

.skill-item:hover {
    transform: translateY(-5px);
    color: var(--light-orange);
    opacity: 1;
}

.skill-item i {
    font-size: 2.5rem;
}

.skill-item span {
    font-size: 1.2rem;
    text-align: center;
}


/* Contact Section */

#contact {
    background-color: transparent;
    color: var(--cream);
    padding: 4rem 2rem;
    text-align: center;
    padding-bottom: 5rem;
}

#contact h2 {
    color: var(--cream);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    
}

/* Left Line */
#contact h2::before {
    content: '';
    position: absolute;
    bottom: 0.15rem;
    left: 50%;
    transform: translateX(-220px);
    width: 200px;
    height: 3px;
    background-color: var(--cream);
    margin-right: 8px;
}

/* Right Line */
#contact h2::after {
    content: '';
    position: absolute;
    bottom: 0.15rem;
    right: 50%;
    transform: translateX(220px);
    width: 200px;
    height: 3px;
    background-color: var(--cream);
    margin-left: 8px;
}

#contact .curved_diamond {
    bottom: -6px;
}

#contact p {
    color: var(--cream);
    font-size: 1.2rem;
    padding-top: 0.5rem;
    margin-bottom: 1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 1rem;
    gap: 3rem;
    margin: 0 auto;
    max-width: 800px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--cream);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    opacity: 0.6;
}

.contact-link:hover {
    background-color: var(--light-green);
    transform: translateY(-5px);
    opacity: 1;
}


/* Footer Section */

footer {
    background-color: transparent;
    color: var(--cream);
    padding: 0.5rem 2.5rem;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
}

footer span {
    font-size: 0.9rem;
    color: var(--cream);
}

footer a {
    color: var(--light-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--light-orange);
}

/* Scroll to top button styles */
#scroll-to-top {
    position: fixed;
    bottom: 50px;
    right: 50px;
    background-color: var(--mid-green);
    color: var(--cream);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(254, 250, 224, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#scroll-to-top:hover {
    background-color: var(--light-green);
    transform: translateY(-3px);
    border-color: rgba(254, 250, 224, 0.5);
}

#scroll-to-top i {
    font-size: 1.2rem;
}

/* Show button when page is scrolled */
#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Navigation Mobile Styling */
    nav ul {
        justify-content: space-between;
        width: 100%;
        padding: 0;
    }

    nav ul li {
        flex: 1;
    }

    .nav-link {
        justify-content: center;
        padding: 0 1rem;
        width: 100%;
    }

    nav ul li:first-child .nav-link {
        border-top-left-radius: 40px;
        border-bottom-left-radius: 40px;
    }

    nav ul li:last-child .nav-link {
        border-top-right-radius: 40px;
        border-bottom-right-radius: 40px;
    }

    header {
        width: 90%;
        top: 10px;
    }

    #welcome-section h1 {
        font-size: 3rem;
    }

    #welcome-section h2 {
        font-size: 1.2rem;
    }

    /* Project Grid Mobile Styling */
    .project-grid {
        padding: 1rem 0;
        align-items: center;
    }

    .project-tile {
        width: 100%;
        margin: 1rem 0;
        max-width: 90vw;
    }

    
    .project-tile img {
        height: 250px;
    }

    .projects-container {
        padding: 0.5rem;
        margin: 1rem 0;
        width: 95%;
    }

    .project-tile:nth-child(n) {
        margin-right: 0;
        margin-top: 1rem;
    }

    .project-tile:first-child {
        margin-top: 0;
    }

    #projects h2::before {
        width: 100px;
        transform: translateX(-120px);
    }
    
    #projects h2::after {
        width: 100px;
        transform: translateX(120px);
    }

    
    /* Skills Container Mobile Styling */
    .experience-container {
        width: 90%;
        padding: 1rem;
    }

    .experience-container h2 {
        margin-bottom: 2rem;
    }

    .skills-container {
        flex-direction: column;
        padding: 2rem 1.5rem;
        margin-top: 1rem;
        width: 100%;
    }

    .skill-item {
        width: 100%;
        padding: 0.8rem;
        flex-direction: column;
        align-items: center;
    }

    .skill-item i {
        font-size: 2rem;
    }

    .skill-item span {
        font-size: 1rem;
    }

    .skill-divider {
        width: 50%;
        height: 2px;
        margin: 0.3rem 0;
    }

    /* Contact Section Mobile Styling */
    #contact {
        padding: 3rem 1rem;
    }

    #contact h2 {
        font-size: 2rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .contact-link {
        width: 100%;
        max-width: 200px;
    }

    footer {
        padding: 1rem;
    }

    #contact h2::before {
        width: 100px;
        transform: translateX(-120px);
    }
    
    #contact h2::after {
        width: 100px;
        transform: translateX(120px);
    }

    #scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .skills-container {
        width: 95%;
        padding: 2rem;
    }

    .skill-item i {
        font-size: 2.2rem;
    }

    .skill-item span {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {

    nav ul {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0 1rem;
        font-size: 0.9rem;
    }

    .project-tile {
        width: 100%;
        max-width: 95vw;
    }

    .projects-container {
        padding: 0.25rem;
        width: 98%;
    }

    .project-tile img {
        height: 200px;
    }

    .skills-container {
        padding: 1rem;
    }

    .skill-item i {
        font-size: 1.8rem;
    }

    .skill-item span {
        font-size: 0.9rem;
    }
}