:root {
    --base: #eff1f5;
    --crust: #dce0e8;
    --mantle: #e6e9ed;
    --text: #4c4f69;
    --pink: #ea76cb;
    --blue: #1e66f5;
    --green: #40a02b;
    --peach: #fe640b;
}

body {
    background-color: var(--base);
    color: var(--text);
    font-family: sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--base);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

nav ul {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* The line */
nav ul::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--text);
    z-index: 1;
}

nav li {
    margin: 0;
    z-index: 2; /* Make sure the li is on top of the line */
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: bold;
    background-color: var(--base); /* Match the header background */
    padding: 0 1rem; /* This creates the "gap" */
}

nav a:hover {
    color: var(--pink);
}

main {
    padding: 2rem;
    max-width: 960px; /* Or a suitable max-width for your design */
    margin: auto; /* Center the content */
}

section {
    margin-bottom: 3rem;
}

h1, h2 {
    color: var(--peach);
}

#hero {
    text-align: center;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#hero h1 {
    font-size: 4rem;
    margin: 0;
}

#hero p {
    font-size: 1.5rem;
    color: var(--blue);
}

.job h3 {
    color: var(--green);
}

/* Timeline container */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Styles for the future top arrow and dashed line */
#timeline-future {
    position: relative;
    height: 98px; /* Adjusted height to connect to the solid line */
    width: 100%;
    text-align: center;
}

#timeline-future::before {
    content: '';
    position: absolute;
    top: 0; /* Position arrow at the very top of #timeline-future */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--text); /* Upward pointing arrow */
    z-index: 2; /* Ensure it's above the dashed line */
}

#timeline-future::after {
    content: '';
    position: absolute;
    top: 6px; /* Starts below the arrow */
    left: 50%;
    margin-left: -1px;
    height: calc(100% - 6px); /* Fills container minus arrow height */
    width: 2px;
    border-left: 2px dashed var(--text);
    z-index: 1;
}


.timeline-events {
    position: relative;
}

/* Timeline vertical line */
.timeline-events::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--text);
    top: 0px; /* Start from the first point's top */
    bottom: 0; /* Extend to the bottom of .timeline-events */
    left: 50%;
    margin-left: -1px;
}

/* Timeline containers */
.timeline-container {
    padding: 10px 0;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-container:first-of-type {
    padding-top: 0;
}


/* The points on the timeline */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--text);
    top: 28px;
    border-radius: 50%;
    z-index: 1;
}

/* Place the container to the left */
.left {
    left: 0;
}

/* Place the container to the right */
.right {
    left: 50%;
}

/* Position points for left containers */
.left::after {
    right: -5px; /* (width / 2) */
}

/* Position points for right containers */
.right::after {
    left: -5px; /* (width / 2) */
}


/* The timeline content */
.timeline-content {
    padding: 20px 30px;
    background-color: var(--mantle);
    position: relative;
    border-radius: 6px;
}

.timeline-content h3 {
    color: var(--peach);
    font-size: 1.1em;
    margin-top: 0;
}

.left .timeline-content {
    margin-left: auto;
    margin-right: 30px; /* Desired gap from the central line */
}

.right .timeline-content {
    margin-left: 30px; /* Desired gap from the central line */
}

/* Styles for the end of the timeline */
#timeline-ender {
    width: 100%;
    left: 0;
    text-align: center;
}

#timeline-ender .timeline-content {
    background-color: transparent;
    margin: 0 auto;
    padding: 140px 0 0 0; /* Position text below the newly positioned dot */
}

/* The point for the ender doesn't need to be offset */
#timeline-ender::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Dashed line to prolong the timeline */
#timeline-ender::before {
    content: '';
    position: absolute;
    top: -30px; /* Adjusted to move upwards and connect to the solid line */
    left: 50%;
    margin-left: -1px; /* Align with main line */
    width: 2px;
    height: 150px; /* Increased length of the dashed line to 150px */
    border-left: 2px dashed var(--text);
}

/* Make the ender dot hollow */
#timeline-ender::after {
    background-color: var(--base); /* Match page background */
    border: 2px solid var(--text);
    width: 6px; /* Adjust size for border */
    height: 6px; /* Adjust size for border */
    left: 50%;
    transform: translateX(-50%);
    top: 115px; /* Adjusted to align with the bottom of the 150px dashed line */
    z-index: 2; /* Ensure it's above the dashed line */
}


footer {
    background-color: var(--crust);
    text-align: center;
    padding: 2rem;
}

footer a {
    color: var(--blue);
}

.social-icon {
    width: 32px;
    height: 32px;
    fill: var(--text);
}

a:has(> .social-icon):hover {
    fill: var(--pink);
}

/* Button styles */
.button {
    display: inline-block;
    background-color: var(--blue);
    color: var(--base);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease;
    max-width: fit-content;
    width: auto;
    margin: 0 auto;
}

.button:hover {
    background-color: var(--pink);
    color: var(--crust);
}
