:root {
  --rgba-white-06: rgba(255, 255, 255, 0.06);
  --rgba-white-08: rgba(255, 255, 255, 0.08);
  --rgba-white-10: rgba(255, 255, 255, 0.1);
  --rgba-white-15: rgba(255, 255, 255, 0.15);
  --rgba-white-20: rgba(255, 255, 255, 0.2);
  --rgba-white-30: rgba(255, 255, 255, 0.3);
  --rgba-white-40: rgba(255, 255, 255, 0.4);
  --rgba-white-50: rgba(255, 255, 255, 0.5);
  --rgba-white-70: rgba(255, 255, 255, 0.7);
  --rgba-white-80: rgba(255, 255, 255, 0.8);
  --rgba-white-90: rgba(255, 255, 255, 0.9);

  --rgba-black-05: rgba(0, 0, 0, 0.05);
  --rgba-black-10: rgba(0, 0, 0, 0.1);
  --rgba-black-20: rgba(0, 0, 0, 0.2);
  --rgba-black-30: rgba(0, 0, 0, 0.3);
  --rgba-black-40: rgba(0, 0, 0, 0.4);
  --rgba-black-50: rgba(0, 0, 0, 0.5);

  --rgba-accent-10: rgba(14, 165, 233, 0.1);
  --rgba-accent-15: rgba(14, 165, 233, 0.15);

  --light-bg: #edf2f5;
  --light-color: #0c1923;
  
  --dark-bg: #0c1923;
  --dark-color: #edf2f5;

  --bg-primary: #edf2f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-surface: var(--rgba-white-70);

  --text-primary: #0c1923;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --divider-color: var(--rgba-black-05);

  --accent-primary: #0ea5e9;
  --accent-secondary: #0284c7;
  --accent-soft: var(--rgba-accent-10);
  --accent-bright: #38bdf8;

  --edge-blur: #edf2f5;
  --switch-bg: #e2e8f0;
  --switch-handle: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: var(--rgba-white-40);
  --glass-highlight: var(--rgba-white-80);
  --icon-dim: var(--rgba-black-10);
  --icon-bright: var(--rgba-black-60);
  --switch-icon-active-color: rgba(255, 255, 255, 0.81);
  --switch-icon-active-shadow: rgba(39, 37, 37, 0.8);
  --Parent: rgb(221, 221, 221);
  --switch-icon-inactive-shadow: rgba(0, 0, 0, 0.1);

  --blur-frame-overlay: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 25%, transparent 100%);
  --blur-frame-mask: linear-gradient(to bottom, var(--rgba-white-40) 0%, rgba(255, 255, 255, 0) 100%);
  --edge-blur-left: linear-gradient(to right, var(--edge-blur), transparent);
  --edge-blur-right: linear-gradient(to left, var(--edge-blur), transparent);
  --fade-border-gradient: linear-gradient(to bottom, transparent, var(--accent-primary) 20%, var(--accent-primary) 80%, transparent);

  --timeline-prof-color: #38bdf8;
  --timeline-pers-color: #f472b6;
  --timeline-spine-color: var(--light-bg);

  --transition-duration: 0.6s;
  --transition-delay: 0.1s;
  --transition-speed: 0.3s;
  --transition-timing: ease;

  --switch-width: 80px;
  --switch-height: 40px;
  --handle-size: 32px;
  --hero-image-filter: none;
  --timeline-card-bg: #ffffff;
}

[data-theme="dark"] {
  --rgba-accent-10: rgba(14, 165, 233, 0.4);

  --bg-primary: #0c1923;
  --bg-secondary: #1a2332;
  --bg-tertiary: #1f2937;
  --bg-surface: rgba(20, 37, 52, 0.75);

  --text-primary: #edf2f5;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0c1923;

  --border-subtle: var(--rgba-white-08);
  --border-strong: var(--rgba-white-15);
  --divider-color: var(--rgba-white-06);

  --accent-primary: #0ea5e9;
  --accent-secondary: #38bdf8;
  --accent-soft: var(--rgba-accent-10);
  --accent-bright: #38bdf8;

  --edge-blur: #0c1923;
  --switch-bg: #27272a;
  --switch-handle: #ffffff;
  --glass-bg: rgba(0, 0, 0, 0.6);
  --glass-border: var(--rgba-white-10);
  --glass-highlight: var(--rgba-white-20);
  --icon-dim: var(--rgba-white-10);
  --icon-bright: var(--rgba-white-90);
  --switch-icon-active-color: rgba(255, 255, 255, 1);
  --switch-icon-active-shadow: rgba(104, 104, 104, 0.6);
  --switch-icon-inactive-color: rgba(255, 255, 255, 0.808);
  --switch-icon-inactive-shadow: rgba(87, 87, 87, 0.3);

  --blur-frame-overlay: linear-gradient(to bottom, rgba(20, 37, 52, 0.15) 25%, transparent 100%);
  --blur-frame-mask: linear-gradient(to bottom, var(--rgba-black-40) 0%, rgba(0, 0, 0, 0) 100%);
  --edge-blur-left: linear-gradient(to right, var(--edge-blur), transparent);
  --edge-blur-right: linear-gradient(to left, var(--edge-blur), transparent);
  --fade-border-gradient: linear-gradient(to bottom, transparent, var(--accent-primary) 20%, var(--accent-primary) 80%, transparent);

  --timeline-spine-color: var(--dark-bg);

  --hero-image-filter: brightness(60%) contrast(120%);
  --timeline-card-bg: #111e2a;
}

::-webkit-scrollbar {
  width: 12px;
  padding: 2px;
}

::-webkit-scrollbar-track {
  background: var(--border-subtle);
}

::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 4px;
  border: var(--border-subtle) 4px solid;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

html,
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
body *,
body *::before,
body *::after {
  transition-property: background, background-color, border-color, color, fill, stroke;
  transition-duration: var(--transition-duration);
  transition-delay: var(--transition-delay);
}

h1, h2, h3, h4, h5, h6,
p, span, div, li, a,
input, textarea, button, select {
  color: inherit;
}

.fade-border {
  border-width: 0 1px;
  border-style: dashed;
  border-image: var(--fade-border-gradient) 1 100%;
}

.blur-frame {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 25%, transparent 100%);
  -webkit-background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 25%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, var(--rgba-white-40) 0%, rgba(255, 255, 255, 0) 100%);
  mask-image: linear-gradient(to bottom, var(--rgba-white-40) 0%, rgba(255, 255, 255, 0) 100%);
}

.frosted-switch-container {
  display: inline-block;
  margin: 10px;
}

.switch-input {
  display: none;
}

.switch-label {
  width: var(--switch-width);
  height: var(--switch-height);
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 0px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--rgba-white-10);
  box-shadow: inset 0 1px 2px var(--rgba-white-20);
}

.icon {
  width: 22px;
  height: 22px;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-dim);
  filter: drop-shadow(0 1px 2px var(--rgba-black-10));
  margin-right: 0px;
}

.switch-handle {
  width: var(--handle-size);
  height: var(--handle-size);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 5px;
  z-index: 1;
  background: var(--rgba-white-30);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-highlight);
  box-shadow:
    0 4px 8px var(--rgba-black-10),
    inset 0 2px 3px var(--rgba-white-90),
    inset 0 -2px 5px var(--rgba-black-05);
}

.menu-item-text {
  color: var(--text-primary);
}

.menu-item-btn:hover .menu-item-text {
  color: var(--accent-primary);
}

.bento-child,
.case-link {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
}

.tag-pill {
  background-color: var(--accent-soft);
  color: var(--text-primary);
}

.edge-blur-left {
  background: var(--edge-blur-left) !important;
}

.edge-blur-right {
  background: var(--edge-blur-right) !important;
}

.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px;
}

.spine-wrapper {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  z-index: 5;
}

.spine-svg {
  width: 100%;
  height: 100%;
}

.line-base {
  stroke: var(--timeline-spine-color);
  stroke-width: 4;
  stroke-linecap: round;
}

.line-progress {
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px var(--timeline-prof-color));
}

.milestone {
  position: relative;
  display: flex;
  width: 100%;
  margin-bottom: -8rem;
  opacity: 0;
  transform: translateY(50px);
  z-index: 10;
}

.milestone.personal {
  justify-content: flex-start;
  text-align: right;
}

.milestone.professional {
  justify-content: flex-end;
  text-align: left;
}

.card-container {
  text-align: left;
  width: 44%;
  position: relative;
}

.card {
  background: var(--timeline-card-bg);
  backdrop-filter: blur(12px);
  padding: 2rem;
  transition: transform var(--transition-speed) ease;
  border: none;
  border-radius: 1rem;
}

.node {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 4px solid var(--timeline-spine-color);
  z-index: 50;
  transform: translate(-50%, -50%) scale(0);
  left: 50%;
}

.connector {
  position: absolute;
  top: 50%;
  height: 2px;
  background: var(--timeline-spine-color);
  z-index: 5;
  width: 0%;
}

.date-label {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.personal .connector {
  right: 50%;
  left: auto;
  transform-origin: right;
}

.professional .connector {
  left: 50%;
  right: auto;
  transform-origin: left;
}

.professional .date-label {
  color: var(--timeline-prof-color);
}

.personal .date-label {
  color: var(--timeline-pers-color);
}

.character-container {
  position: relative;
  width: 266px;
  height: 400px;
  margin: 0 auto;
  transform-origin: center bottom;
}

.char-shadow {
  position: absolute;
  bottom: 8px;
  left: 51%;
  transform: translateX(-50%);
  width: 100px;
  height: 12px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}

.frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

.frame.active {
  display: block;
}

.interaction-zone {
  position: absolute;
  top: 0;
  left: 30%;
  width: 40%;
  height: 100%;
  z-index: 10;
  cursor: grab;
}

@media (max-width: 768px) {
  .spine-wrapper {
    left: 30px;
  }

  .milestone {
    text-align: left !important;
    justify-content: flex-end !important;
    margin-bottom: 4rem;
  }

  .card-container {
    width: calc(100% - 80px);
  }

  .node {
    left: 10px;
  }

  .professional .connector,
  .personal .connector {
    left: 20px;
    right: auto;
    width: 60px !important;
  }
}
