* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
}
:root {
    --bg-colour: #2f2f2f;
    --second-bg-colour: #111111;
    --text-colour: rgb(255, 255, 255);
    --main-colour: #E6E2D3;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: linear-gradient(-45deg, #000000, #181818, #74695D, #000000);
    background-size: 400% 400%;
    animation: gradient-animation 15s ease-in-out infinite;
    color: var(--text-colour);
    cursor: url('cursor.png'), auto;
}
body {
  cursor: url('cursor.png'), default;
}


.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 12%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.header.scrolled {
    background: var(--bg-colour);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 2.8rem;
    color: var(--text-colour);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}

.logo:hover {
    transform: scale(1.1);
}

.logo span {
    text-shadow: 0 0 25px var(--main-colour);
}

.navbar a {
    font-size: 2.8rem;
    color: var(--text-colour);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-colour);
    border-bottom: 3px solid;
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--main-colour);
    display: none;
}

section {
    min-height: 100vh;
    padding: 8rem 12% 8rem;
}

.home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10rem;
}

.home-content {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    text-align: left;
    justify-content: center;
    margin-top: 3rem;
}

.home-content h3 {
    margin-bottom: 2rem;
    margin-top: 1rem;
    font-size: 3.5rem;
    color: var(--text-colour);
}

.home-content h1 {
    font-size: 7rem;
    font-weight: 700;
    margin-top: 1.5rem;
    line-height: 1;
    color: var(--text-colour);
}
.home-content h1 span {
    color: var(--main-colour);
}

.heading span, .logo span, .text-animation span {
    color: var(--main-colour);
}
.home-img {
    border-radius: 50%;
    width: 32vw;
    height: 32vw;
}

.home-img img {
    width: 100%;
    height: 100%;
    position: relative;
    top: 3rem;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-colour);
    cursor: pointer;
    transition: 0.4s ease-in-out;
    object-fit: cover;
}

.home-img img:hover {
    box-shadow: 0 0 25px var(--main-colour),
                0 0 50px var(--main-colour),
                0 0 100px var(--main-colour);
}

.home-content p {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
    max-width: 1000px;
}

.Social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background: transparent;
    border: 2px solid var(--main-colour);
    font-size: 2.5rem;
    border-radius: 50%;
    color: var(--main-colour);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease-in-out;
}

.Social-icons a:hover {
    color: var(--text-color);
    transform: scale(1.3) translateY(-5px);
    box-shadow: 0 0 25px var(--main-colour);
    background-color: var(--main-colour);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--text-colour);
    box-shadow: 0 0 25px var(--text-colour);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--bg-colour);
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px var(--text-colour);
}

.btn-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-group a:nth-of-type(2) {
    background-color: transparent;
    color: var(--main-colour);
    border: 2px solid var(--main-colour);
    box-shadow: none;
}

.btn-group a:nth-of-type(2):hover {
    box-shadow: 0 0 25px var(--main-colour);
    background-color: var(--main-colour);
    color: var(--bg-colour);
}

.text-animation {
    font-size: 34px;
    font-weight: 600;
    color: var(--main-colour);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.text-animation span {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--main-colour);
    animation: cursor-blink 0.6s steps(1) infinite;
    padding-left: 1rem;
}


span {
    color: var(--main-colour);
}

.logo span {
    color: var(--main-colour);
}

.heading {
    font-size: 8rem;
    text-align: center;
    margin: 5rem 0;
}

.education,
.skills,
.projects,
.contact {
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    margin-bottom: 5rem;
}

.education {
    padding: 10rem 15px;
}

.education h2 {
    margin-bottom: 5rem;
}

.timeline-items {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

.timeline-items::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-colour);
    left: calc(50% - 1px);
}

.timeline-item {
    margin-bottom: 40px;
    width: 100%;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 30px);
    text-align: right;
}

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

.timeline-dot {
    height: 21px;
    width: 21px;
    background-color: var(--main-colour);
    box-shadow: 0 0 25px var(--main-colour),
                0 0 50px var(--main-colour);
    position: absolute;
    left: calc(50% - 8px);
    border-radius: 50%;
    top: 10px;
}

.timeline-date {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin: 6px 0 15px;
}

.timeline-content {
    border: 3px solid var(--main-colour);
    padding: 30px 50px;
    border-radius: 4rem;
    box-shadow: 0 0 10px var(--main-colour);
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--main-colour);
}

.timeline-content h3 {
    font-size: 20px;
    color: white;
    margin: 0 0 10px;
    font-weight: 500;
}

.timeline-content p {
    color: white;
    font-size: 16px;
    font-weight: 300;
    line-height: 22px;
}

.skills {
    color: black;
}

.skills h2 {
    margin-bottom: 5rem;
    color: white;
}

.skill-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem; /* Add 'rem' unit */
    padding: 0 10rem; /* Add horizontal padding for desktops */
}

.skill-set {
    background-color: var(--main-colour);
    height: 300px;
    border-radius: 3rem;
    border: 5px solid transparent;
    cursor: pointer;
    transition: 0.4s ease-in-out;
}

.skill-set:hover {
    background: var(--text-colour); /* Use a variable for hover background */
    color: var(--bg-colour); /* Use a variable for hover text color */
    border: 5px solid var(--main-colour);
    transform: scale(1.03);
}

.skill-set .skill-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    max-height: 200px;
    overflow-y: auto; /* 👈 This enables scrolling if content exceeds height */
    justify-content: left;
    align-items: baseline;
    padding: 5rem 5rem;
}


.skill-info h4 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.skill-info p {
    font-size: 1.6rem;
    font-weight: 600;
    max-height: 100px;
}


.projects {
    padding: 8rem 12% 8rem;
}

.projects .heading {
    margin-bottom: 5rem;
}
/* Unique Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.project-item {
    background: var(--second-bg-colour);
    padding: 3rem;
    border-radius: 2rem;
    border: 3px solid transparent;
    transition: 0.5s ease-in-out;
    cursor: pointer;
}

.project-item:hover {
    border: 3px solid var(--main-colour);
    transform: translateY(-1rem);
}

.project-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
}

.project-item h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-colour);
}

.project-item p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: var(--text-colour);
}

.project-info {
    text-align: left;
}

.project-info .btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-colour);
    box-shadow: 0 0 25px var(--main-colour);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: black;
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    margin-right: 1rem;
}
.contact h2 {
    margin-bottom: 3rem;
    color: var(--text-colour);
}

.contact form {
    max-width: 70rem;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact form .input-box {
    display: flex;
    gap: 1.5rem;
}

.contact form .input-box input {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    background: var(--bg-colour);
    border-radius: 1rem;
    border: 2px solid var(--main-colour);
    color: var(--text-colour);
}

.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    background: var(--bg-colour);
    border-radius: 1rem;
    border: 2px solid var(--main-colour);
    resize: none;
    color: var(--text-colour);
}

.contact form .btn {
    margin-top: 1rem;
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-colour);
    box-shadow: 0 0 25px var(--main-colour);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--bg-colour);
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 40px 0;
}

.footer .social {
    text-align: center;
    padding-bottom: 25px;
    color: var(--main-colour);
}

.footer .social a {
    font-size: 25px;
    color: var(--main-colour);
    border: 2px solid var(--main-colour);
    width: 42px;
    height: 42px;
    line-height: 42px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 10px;
    transition: 0.3s ease-in-out;
}

.footer .social a:hover {
    transform: scale(1.2) translateY(-10px);
    background-color: var(--main-colour);
    color: black;
    box-shadow: 0 0 25px var(--main-colour);
}

.footer ul {
    margin-top: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}

.footer ul li a {
    color: white;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}

.footer ul li a:hover {
    border-bottom: 3px solid var(--main-colour);
}

.footer ul li {
    display: inline-block;
    padding: 0 15px;
}

::-webkit-scrollbar {
    width: 15px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--main-colour);
}

::-webkit-scrollbar-track {
    background-color: var(--bg-colour);
}

@keyframes cursor-blink {
    0%,
    50% {
        border-color: var(--main-colour);
    }
    51%,
    100% {
        border-color: transparent;
    }
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- Media Queries --- */

@media (max-width: 1200px) {
    html {
        font-size: 58%;
    }

    .home {
        gap: 10rem;
    }

    .skill-container {
        padding-bottom: 7rem;
        grid-template-columns: repeat(1, 1fr);
        margin: 0 5rem;
    }

    .contact form {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }
    section {
        padding-top: 12rem;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        padding: 1rem 3%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(20px);
        border-bottom-left-radius: 2rem;
        border-left: 2px solid var(--main-colour);
        border-bottom: 2px solid var(--main-colour);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: white;
    }

    .home {
        flex-direction: column-reverse;
        margin: 5rem 0;
        gap: 5rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-content p {
        font-size: 1.8rem;
    }

    .home-img {
        width: 60vw;
        height: 60vw;
    }

    .home-img img {
        width: 100%;
        height: 100%;
    }
    
    .timeline-items::before {
        left: 7px;
    }

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

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

    .timeline-dot {
        left: 0;
    }
    
    .skills .skill-container {
        grid-template-columns: 1fr;
    }
}
/* Micro-interactions: Button Press Effect */
.btn:active,
.contact form .btn:active {
    transform: translateY(2px);
    box-shadow: 0 0 10px var(--main-colour);
}