/* Global variable settings for light + dark modes*/
:root {
  --bg: #0f1724;
  --card: #0b1220;
  --card-2: #f8f9fa;
  --text: #eef3f9;
  --text-2: #aab2c8;
  --text-3: #1e293b;
  --muted: #a3a3a9;
  --muted-2: #1e293b;
  --accent: #7c5cff; /* default selected colour */
  --accent-2: #2dd4bf; /* hover accent */
  --accent-3: #b49fb4;
  --pill-bg-1: #111827;
  --pill-bg-2: #a34596;
  --pill-text: #ffffff;
  --gap: 12px;
  --pill-padding: 14px 28px;
  --radius: 999px;
}
.lightmode {
  --bg: #ffffff;
  --card: #e3e9f5;
  --card-2: #02163a;
  --text: #011329;
  --text-2: #919295;
  --text-3: #e4e5e7;
  --muted: #f2f5f8;
  --muted-2: #f2f2f2;
  --accent: #4f204b; /* default selected colour */
  --accent-2: #15068c; /* hover accent */
  --accent-3: #b49fb4;
  --pill-bg: #141b2a;
  --pill-bg-2: #a34596;
  --pill-text: #e6eef8;
  --gap: 12px;
  --pill-padding: 14px 28px;
  --radius: 999px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 10px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Theme switch button */
#theme-switch {
  height: 50px;
  width: 50px;
  border: none;
  padding: 0;
  border-radius: 50%;
  background-color: var(--muted);
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 100px;
  right: 50px;
}

.icon-light {
  display: none;
}

/* When in light mode */
.lightmode .icon-dark {
  display: none;
}

.lightmode .icon-light {
  display: block;
}

#theme-switch svg {
  fill: var(--primary-color);
}

* {
  box-sizing: border-box;
}

/* About Section */
#about-section p {
  color: var(--text);
}
#about-section small {
  color: var(--text);
}

.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--pill-bg-2);
  margin: 0 auto;
}
.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.name {
  font-size: 35px;
  font-weight: 700;
  text-align: center;
  margin-top: 6px;
}
.headline {
  font-size: 16px;
  color: var(--text-2);
  text-align: center;
  margin-top: 2px;
  margin-bottom: 10px;
}
span {
  background-color: var(--pill-bg-2);
}

.socials {
  display: flex;
  gap: 15px;
  justify-content: center; /* or left/right as you prefer */
  align-items: center;
  margin-top: 5px;
  color: var(--text);
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--muted-2);
  text-decoration: none;
}
.socials p {
  color: var(--text);
}

/* Toggle container */

.toggle-wrap {
  display: flex;
  gap: var(--gap);
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  padding: 6px;
  background: var(--bg);
  border-radius: 14px;
}
/* Make the toggles look like wide pills */
.toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: var(--pill-padding);
  border-radius: var(--radius);
  background: var(--pill-bg);
  color: var(--pill-text);
  font-weight: 600;
  font-size: 15px;
  min-width: 160px; /* wide pills */
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background-color 0.12s ease;
  box-shadow: 0 4px 10px rgba(3, 8, 20, 0.45);
  outline: none;
}
.toggle:not(.active):hover {
  transform: translateY(-2px);
  background: var(--accent-3); /* hover hint */
  color: #fff;
}
/* active state */
.toggle.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 8px 24px rgba(37, 33, 153, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.4) inset;
  transform: translateY(0);
}
/* keyboard focus ring - high contrast */
.toggle:focus-visible {
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16), 0 6px 18px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}
/* content panels */
.content {
  border-radius: 10px;
  padding: 18px;
  font-size: 15px;
  line-height: 1.55;
  border: 1px solid var(--bg);
  text-align: center;
  overflow: hidden;
}
.content > .panel-item {
  display: none;
}
.content > .panel-item[aria-hidden="false"] {
  display: block;
}
/* small niceties for headings inside content */
.panel-item h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  letter-spacing: -0.2px;
}
.panel-item p {
  margin: 0;
  color: var(--muted);
}
.panel {
  align-items: center;
  width: 100%;
  max-width: 920px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
  overflow: hidden;
  border: 1px solid var(--muted);
  background-color: var(--bg);
}
.panel.open {
  padding: 16px;
  max-height: 600px;
}
.panel h3 {
  margin: 0 0 8px 0;
}
.panel p {
  margin: 0 0 12px 0;
  color: var(--text-2);
}

/* predictable sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* timeline wrapper */
.timeline {
  position: relative;
  margin: 0 auto;
  padding: 40px 20px;
}

.tl_container .tl_content .badge {
  color: var(--pill-bg-2);
  background-color: var(--pill-text);
}

/* vertical ruler (center line) */
.timeline::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  transform: translateX(-50%);
  background: var(--muted-2);
  z-index: 0;
}

/* each container takes full width so items stack vertically */
.tl_container {
  position: relative;
  width: 100%; /* full width to create one item per row */
  padding: 12px 0;
  margin-bottom: 18px;
  min-height: 1px;
  clear: both;
}

/* dot centered at the ruler for each item (one dot per .tl_container) */
.tl_container::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 20px; /* adjust vertical alignment per item */
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted-2);
  border: 4px solid var(--pill-bg-2);
  z-index: 2;
}

/* base card sizing - content will be placed left OR right */
.tl_content {
  width: calc(
    50% - 70px
  ); /* card width: half the container minus space near the line */
  padding: 18px 12px;
  background: var(--card-2);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 3;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* LEFT items: card sits on the left side of the page, aligned toward the center */
.tl_container.left .tl_content {
  float: left;
  margin-right: calc(
    50% + 40px
  ); /* pushes card toward left while leaving space for the central line */
  text-align: right; /* text faces the center line */
}

/* RIGHT items: card sits on the right side, aligned toward the center */
.tl_container.right .tl_content {
  float: right;
  margin-left: calc(50% + 40px);
  text-align: left;
}

/* small triangular pointer toward the dot (purely decorative) */
.tl_container.left .tl_content::after,
.tl_container.right .tl_content::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 0;
  height: 0;
  z-index: 2;
  border-style: solid;
}

/* left card arrow pointing right */
.tl_container.left .tl_content::after {
  right: -16px;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--pill-bg-2);
}

/* right card arrow pointing left */
.tl_container.right .tl_content::after {
  left: -16px;
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--pill-bg-2) transparent transparent;
}

/* typography */
.panel-item h4 {
  color: var(--text);
}
.tl_content h4 {
  color: var(--text-3);
  margin: 0 0 6px;
  font-size: 1rem;
}
.tl_content p {
  margin: 4px 0;
  line-height: 1.4;
  font-size: 0.95rem;
}

footer {
  border-top: 1px solid var(--muted-2);
  padding-top: 20px;
}

/* responsive: small screens */
@media (max-width: 700px) {
  #theme-switch {
    position: absolute;
    height: 30px;
    width: 30px;
    right: 70px;
  }
  .profile-pic {
    width: 100px;
    height: 100px;
  }
  .name {
    font-size: 1.5rem;
    padding: 5px;
  }
  .headline {
    font-size: 0.8rem;
  }
  #about-section {
    margin: 0 auto;
    padding: 0;
    font-size: 0.9rem;
  }
  .socials {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
  }

  .socials a {
    display: inline-flex !important;
    align-items: center;
  }
  .toggle-wrap {
    flex-wrap: wrap;
    gap: 10px;
  }

  .toggle {
    max-width: 30px;
    padding: 12px 18px;
    min-width: calc(50% - 10px);
  }
  .toggle:not(.active):hover {
    transform: none;
    background: none;
    color: inherit;
  }
  .content {
    padding: 0;
    margin: 0 auto;
  }

  /* vertical ruler*/
  .timeline::after {
    left: 20px;
    width: 4px;
    transform: none;
  }
  .tl_container {
    padding: 0;
    margin-bottom: 5px;
  }
  /* dot centered at the ruler for each item (one dot per .tl_container) */
  .tl_container::after {
    left: -7px;
    top: 30px;
    transform: none;
  }
  .tl_content {
    float: none !important;
    margin: 30px !important;
    text-align: left !important; /* all text left-aligned */
    width: 90%;
  }
  /* hide decorative arrows on mobile */
  .tl_content::after {
    display: none;
  }
  .tl_content .badge {
    font-size: 10px;
  }
  .tl_container .tl_content h4 {
    font-size: 0.9rem;
  }
  /* typography */
  .panel-item h4 {
    font-size: 1rem;
  }

  footer {
    font-size: 0.7rem;
  }
}
