/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #121212;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

body.light-theme {
    background-color: #ffffff;
    color: #121212;
}


.menu-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background-color: #1e1e1e;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, border-color 0.3s;
}

body.light-theme .menu-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-bar .logo-title {
    display: flex;
    align-items: center;
}

.menu-bar .logo {
    max-width: 50px;
    height: auto;
    margin-right: 10px;
}

.menu-bar .title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

body.light-theme .menu-bar .title {
    color: #121212;
}

.menu-bar ul {
    display: flex;
    list-style: none;
}

.menu-bar ul li {
    margin-left: 1.5rem;
}

.menu-bar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

body.light-theme .menu-bar ul li a {
    color: #121212;
}

.menu-bar ul li a:hover {
    text-decoration: underline;
}

.theme-toggle-container {
    position: relative;
    width: 50px;
    height: 25px;
    background-color: #333;
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.theme-toggle-container input {
    display: none;
}

.theme-toggle-container .toggle-label {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
}

.theme-toggle-container .toggle-circle {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #bb86fc; /* Original purple */
    border-radius: 50%;
    transition: transform 0.3s, background-color 0.3s;
    transform: translateX(0);
}

body.light-theme .theme-toggle-container {
    background-color: #e0e0e0;
}

body.light-theme .theme-toggle-container .toggle-circle {
    background-color: #bb86fc; /* Original purple */
}

.theme-toggle-container input:checked + .toggle-label .toggle-circle {
    transform: translateX(25px);
}

header {
    margin-bottom: 2rem;
}

main {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

section {
    padding: 1.75rem 0;
    text-align: center;
}

.cta-container {
    text-align: center;
    margin-top: 40px; /* Adjust this to control the gap from the previous section */
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #bb86fc; /* Purple */
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    transition: transform 0.3s ease, background-color 0.3s ease;
    margin-top: 40px; /* Adjust this to add space above the button */
}

.cta-button:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    background-color: #9e53d0;  /* Darker shade of purple on hover */
}

/* Progressive Content Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.revealed {
    opacity: 1;
    transform: translateY(0);
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.profile-photo {
    margin-top: 30px; /* Add small space above the photo */
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

footer {
    margin-top: 2rem;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: #cccccc;
    background-color: #1e1e1e;
    transition: color 0.3s;
}

body.light-theme footer {
    color: #666666;
    background-color: #f1f1f1;
}

a {
    color: #bb86fc; /* Original purple */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .menu-bar {
        flex-direction: column;
        align-items: flex-start;
        display: none; /* Hide the menu bar for mobile */
    }

    /* Adjust the About Me section to sit naturally without extra space */
    #about {
        margin-top: 1rem; /* This gives a slight gap between the header and About Me section */
    }

    .timeline-items {
        align-items: flex-end;
    }

    .timeline-item {
        flex-direction: row-reverse;
        margin-bottom: 30px;
        width: 90%;
    }

    .timeline-content {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        text-align: right;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        text-align: right;
    }

    .timeline-item .timeline-dot {
        left: 0;
        margin-left: -4px;
        width: 12px;
        height: 12px;
        top: 15%;
    }

    .timeline::before {
        left: 0;
        transform: translateX(0);
    }
}

/* Skills & Experience Section */
.skills, .experience {
    margin-top: 40px;
    padding: 0 1rem;
}

.skills h3, .experience h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #bb86fc; /* Original purple */
}

.skills ul {
    list-style-type: none;
    padding: 0;
}

.skills ul li {
    margin-bottom: 10px;
    font-size: 1rem;
}

.skills ul li strong {
    color: #bb86fc; /* Original purple */
}

body.light-theme .skills ul li strong {
    color: #bb86fc; /* Original purple for light theme */
}

.experience p {
    font-size: 1rem;
    line-height: 1.6;
    color: #ffffff; /* Updated to ensure visibility in dark mode */
}

body.light-theme .experience p {
    color: #121212; /* Adjust for light mode */
}

@media (max-width: 768px) {
    .skills, .experience {
        margin-top: 30px;
    }

    .skills h3, .experience h3 {
        font-size: 1.3rem;
    }

    .skills ul li {
        font-size: 0.9rem;
    }
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
    margin-top: 40px;
    width: 100%;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: calc(100% - 40px);
    width: 3px;
    background-color: #bb86fc; /* Original purple */
    border-radius: 10px;
}

.timeline-items {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 40px;
    width: 100%;
    justify-content: center;
}

.timeline-item.left {
    justify-content: flex-start;
}

.timeline-item.right {
    justify-content: flex-end;
}

.timeline-content {
    background-color: transparent;
    padding: 15px;
    border-radius: 5px;
    width: 45%;
    text-align: center;
    box-sizing: border-box;
}

.timeline-dot {
    position: absolute;
    top: 19%;
    left: 50%;
    margin-left: -6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #bb86fc; /* Original purple */
    border: 3px solid #000000;
    z-index: 1;
    transform: translateY(-50%);
}

body.light-theme .timeline::before {
    background-color: #e0e0e0;
}

body.light-theme .timeline-dot {
    background-color: #bb86fc;
    border: 2px solid #FFFFFF; /* Original purple */
}

/* Mobile Styles - All items right-aligned, dot left-aligned */
@media (max-width: 768px) {
    #about {
        margin-top: 0; /* Remove any extra margin from the About Me section */
        padding-top: 0; /* Ensure no padding is pushing it down */
    }

    .profile-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    /* Add space between About Me text and photo */
    .profile-photo {
        margin-top: 15px; /* Add small space above the photo */
    }

    /* Other mobile adjustments */
    .menu-bar {
        display: none; /* Hide the menu bar for mobile */
    }

    /* Adjust the timeline for mobile */
    .timeline-items {
        align-items: flex-end;
    }

    .timeline-item {
        flex-direction: row-reverse;
        margin-bottom: 30px;
        width: 90%;
    }

    .timeline-content {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        text-align: right;
    }

    .timeline-item.left .timeline-content {
        text-align: right;
    }

    .timeline-item.right .timeline-content {
        text-align: right;
    }

    .timeline-item .timeline-dot {
        left: 0;
        margin-left: -4px;
        width: 12px;
        height: 12px;
        z-index: 1;
        top: 15%;
        transform: translateY(-50%);
    }

    .timeline::before {
        left: 0;
        transform: translateX(0);
    }
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

body.light-theme form {
    background-color: #ffffff;
}

form label {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    transition: color 0.3s ease;
}

body.light-theme form label {
    color: #121212;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #bb86fc;
    border-radius: 5px;
    background-color: #121212;
    color: #ffffff;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

body.light-theme form input,
body.light-theme form textarea,
body.light-theme form select {
    background-color: #f9f9f9;
    color: #121212;
    border-color: #bb86fc;
}

form input:focus,
form textarea:focus,
form select:focus {
    border-color: #9e53d0;
    outline: none;
    box-shadow: 0 0 5px #bb86fc;
}

form button {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #bb86fc;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

form button:hover {
    background-color: #9e53d0;
    transform: scale(1.05);
}

form button:active {
    transform: scale(0.95);
}

form button:disabled {
    background-color: #555555;
    cursor: not-allowed;
}

/* Dynamic message box resizing */
form textarea {
    min-height: 50px; /* Smaller by default */
    max-height: 300px; /* Maximum height it can grow to */
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #bb86fc;
    border-radius: 5px;
    background-color: #121212;
    color: #ffffff;
    overflow: hidden;
    resize: none; /* Disable manual resizing */
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

body.light-theme form textarea {
    background-color: #f9f9f9;
    color: #121212;
    border-color: #bb86fc;
}

form textarea:focus {
    border-color: #9e53d0;
    outline: none;
    box-shadow: 0 0 5px #bb86fc;
}

/* Container for Turnstile Verification */
.cf-turnstile {
    display: flex;
    justify-content: center;  /* Horizontally center */
    align-items: center;      /* Vertically center */
    height: 100%;             /* Ensure it takes up full height of the container */
}

/* If there's a parent container for Turnstile widget */
.cf-turnstile-wrapper {
    display: flex;
    justify-content: center; /* Horizontally center */
    align-items: center;     /* Vertically center */
    width: 100%;
    height: 100%;            /* Ensure it covers full available space */
    padding: 1rem;
    border-radius: 10px;     /* Rounds the edges of the container */
    background-color: #1e1e1e; /* Optional: Add background to make the rounded corners visible */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Optional: Add shadow for a subtle 3D effect */
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .cf-turnstile,
    .cf-turnstile-wrapper {
        height: auto;         /* Adjust height if needed */
        padding: 1rem;        /* Add padding around the widget */
    }
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    form {
        padding: 1.5rem;
    }

    form button {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    form textarea {
        font-size: 0.9rem; /* Adjust font size for mobile */
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 0;
    height: 5px;
    background-color: #bb86fc; /* Original purple */
    z-index: 9999;
    transition: width 0.1s ease-in-out;
}

body.light-theme .scroll-progress {
    background-color: #bb86fc; /* Original purple */
}
