:root {
    --primary-color: #0a192f;
    --secondary-color: #64ffda;
    --text-color: #8892b0;
    --light-text: #ccd6f6;
    --background: #0a192f;
    --outline-color: #be17e7;

    --nav-height: calc(2rem + 40px);
    --hamburger-bar-height: 2px;
    --hamburger-bar-width: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Global Styles */
body {
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
}

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

a {
    color: var(--secondary-color);
}

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

a:focus-visible {
    outline: 3px solid var(--outline-color);
    color: var(--outline-color);
    border: none;
}

.button {
    display: inline-block;
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    padding: 0.4em 1.2em;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    text-wrap-mode: nowrap;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.cta-button {
    font-size: 1.1rem;
    padding: 0.6em 1.5em;
    border-radius: 100px;
    transform: translateY(-3px);
}

.button:hover {
    color: var(--secondary-color);
    background: rgba(100, 255, 218, 0.1);
}

.cta-button:hover {
    transform: translateY(-5px);
}


/* Header Styles */
header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

nav {
    height: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

a.logo {
    margin-left: 2px;
    padding: 5px 10px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

a.logo:hover {
    margin-left: 0;
    border: 2px solid var(--secondary-color);
}

.navlinks {
    display: flex;
    list-style: none;
}

.navlinks li {
    padding: 0 15px;
}

.navlinks a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navlinks a:hover {
    color: var(--secondary-color);
}

/* Hamburger */
.hamburger {
    display: none;
}

.nav-menu.mobile {
    position: absolute;
    top: -200px;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background-color: var(--primary-color);
    opacity: 0;
    border: 1px solid var(--secondary-color);
    font-size: 1.5rem;
    transition: top 0.3s ease-out,
        opacity 0.8s ease-in-out;
}

/* Hamburger behaviour */
.hamburger:has(.bar:checked)+.nav-menu.mobile {
    display: block;
    top: var(--nav-height);
    opacity: 1;
}

.nav-menu.mobile ul {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-menu.mobile a {
    color: var(--secondary-color);
}

/* Main Content */
section {
    scroll-margin-top: var(--nav-height);
    padding: 30px 0;
}

.section-title {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40%;
    height: 3px;
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    color: var(--light-text);
    margin-bottom: 20px;
}

.hero h2 {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.hero h3 {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-items: center;
    gap: 15px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 30px;
    justify-items: center;
    align-items: center;
}

.about-image {
    overflow: hidden;
    max-width: 350px;
}

.about-image img {
    width: 100%;
    margin: 0 auto;
    display: block;
}

.about-text h3 {
    color: var(--light-text);
    margin-bottom: 15px;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 5px;
    transition: transform 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.skills-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

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

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

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

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

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

.timeline-content {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.timeline-date {
    color: var(--secondary-color);
    font-weight: bold;
}

.timeline-title {
    color: var(--light-text);
    margin: 10px 0;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: scale(1.01);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image>img {
    position: absolute;
    left: 50%;
    translate: -50%;
    height: 105%;
    object-fit: cover;
    transition: transform 0.5s;
}

@media (any-hover: hover) {
    .project-image>img {
        opacity: 0.8;
    }

    .project-card:hover .project-image img {
        opacity: 1;
        transform: scale(1.075);
    }
}


.project-content {
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
    padding: 2em;
}

.project-title {
    color: var(--light-text);
    margin-bottom: 10px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    margin: 15px 0;
}

.project-tech span {
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-right: 10px;
    margin-bottom: 10px;
}

.project-links {
    display: flex;
    height: max-content;
    width: 25ch;
    margin: auto auto 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.contact-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    margin: 0 10px;
    transition: all 0.3s;
}

.contact-links a:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-5px);
}

/* Footer */
footer {
    padding: 30px 0;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.2);
}

footer p {
    font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-content .about-image {
        max-width: 400px;
    }

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

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

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

@media (max-width: 550px) {

    .nav-menu-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        align-items: center;
        cursor: pointer;
        background-color: unset;
        border-radius: 2px;
        border: none;
        padding: 2px;
        
    }

    .hamburger .bar {
        content: "";
        display: block;
        width: 30px;
        height: 3px;
        background-color: var(--secondary-color);
        border: none;
        cursor: pointer;
    }

    .hamburger input {
        appearance: none;
        pointer-events: none;
        outline: none;
    }

    .hamburger:focus-visible {
        outline: 3px solid var(--outline-color);
        color: var(--outline-color);
        border: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero h3 {
        font-size: 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
        padding: 0.5em 0;
    }

    .cta-button {
        width: 170px;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.7rem;
        margin-bottom: 1.8px;
    }

    .hero h2 {
        font-size: 2.3rem;
    }

    .hero h3 {
        font-size: 1.3rem;
    }

    .hero-buttons {
        flex-direction: column;
    }
}