/* =========================================================
THEME COLORS
========================================================= */

:root {
--bg: #050816;
--bg-elevated: #0b1020;
--text: #e5e7eb;
--muted: #9ca3af;
--accent: #006eff;
--border: #1f2937;
}

:root[data-theme="light"] {
--bg: #f9fafb;
--bg-elevated: #ffffff;
--text: #111827;
--muted: #6b7280;
--accent: #ffae00;
--border: #e5e7eb;
}

/* Smooth scrolling when allowed */
@media (prefers-reduced-motion: no-preference) {
html {
    scroll-behavior: smooth;
}
}

/* =========================================================
BASE STYLES
========================================================= */

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

body {
margin: 0;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background-color: var(--bg);
color: var(--text);
line-height: 1.6;
transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

a {
color: var(--accent);
transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.container {
width: 100%;
max-width: 880px;
margin: 0 auto;
padding: 0 1.25rem;
}

.section {
padding: 3rem 0;
}

.section-title {
font-size: 1.1rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 1.5rem;
}

/* =========================================================
HEADER + NAVIGATION
========================================================= */

.site-header {
position: sticky;
top: 0;
z-index: 10;
backdrop-filter: blur(12px);
background-color: color-mix(in srgb, var(--bg) 82%, transparent);
border-bottom: 1px solid var(--border);
transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease;
}

.header-inner {
display: flex;
align-items: center;
padding: 0.75rem 1.25rem;
gap: 1.25rem;
}

.logo {
font-weight: 600;
letter-spacing: 0.04em;
text-decoration: none;
color: var(--text);
}

.nav {
display: flex;
gap: 1rem;
font-size: 0.9rem;
margin-left: auto;
}

.nav a {
color: var(--muted);
text-decoration: none;
padding: 0.2rem 0.4rem;
border-radius: 999px;
}

.nav a:hover {
color: var(--text);
background-color: var(--bg-elevated);
}

/* =========================================================
THEME SWITCH
========================================================= */

.theme-switch {
position: relative;
display: inline-block;
width: 46px;
height: 24px;
margin-left: 0.75rem;
}

/* Hide native checkbox */
.theme-switch input {
opacity: 0;
width: 0;
height: 0;
}

/* Track */
.theme-switch .slider {
position: absolute;
cursor: pointer;
inset: 0;
background-color: var(--accent);
border-radius: 999px;
transition: background-color 0.25s ease;
}

/* Emoji knob */
.theme-switch .slider::before {
position: absolute;
content: "🌙";
display: flex;
align-items: center;
justify-content: center;
height: 18px;
width: 18px;
left: 3px;
top: 3px;
border-radius: 50%;
background-color: #ffffff;
font-size: 12px;
transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    content 0.25s ease;
}

/* Light mode ON */
.theme-switch input:checked + .slider {
background-color: var(--accent);
}

.theme-switch input:checked + .slider::before {
transform: translateX(20px);
content: "☀️";
}



/* =========================================================
HERO SECTION
========================================================= */

.hero {
padding-top: 3.5rem;
}

.hero-inner {
display: block;
}

.hero-header {
display: flex;
align-items: flex-start;
gap: 1.75rem;
}

/* Profile image */
.hero-photo {
display: block;
width: 200px;
height: 200px;
aspect-ratio: 1 / 1;
border-radius: 50%;
object-fit: cover;
border: 3px solid var(--accent);
}

.hero-header-text {
display: flex;
flex-direction: column;
gap: 0.4rem;
}

.hero-text h1 {
font-size: clamp(2rem, 3vw, 2.6rem);
margin: 0;
}

.subtitle {
color: var(--muted);
margin: 0;
}

.tagline {
margin: 0;
}

.hero-meta {
border: 1px solid var(--border);
border-radius: 0.75rem;
padding: 1rem 1.1rem;
background-color: var(--bg-elevated);
margin-top: 1.5rem;
transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease;
}

.hero-meta ul {
list-style: none;
margin: 0;
padding: 0;
}

.hero-meta li {
display: flex;
justify-content: space-between;
gap: 1rem;
font-size: 0.9rem;
padding: 0.25rem 0;
}

.hero-meta .label {
color: var(--muted);
}

/* =========================================================
CARD COMPONENTS
========================================================= */

.card {
border-radius: 0.75rem;
border: 1px solid var(--border);
background-color: var(--bg-elevated);
padding: 1.2rem 1.3rem;
margin-bottom: 1rem;
transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease;
}

.card-head {
display: flex;
justify-content: space-between;
gap: 1rem;
align-items: baseline;
margin-bottom: 0.4rem;
}

.card-head h3 {
margin: 0 0 0.15rem 0;
font-size: 1.05rem;
}

.meta {
font-size: 0.8rem;
color: var(--muted);
}

.tech {
margin-top: 0.2rem;
}

.pill {
border-radius: 999px;
border: 1px solid var(--border);
padding: 0.1rem 0.6rem;
font-size: 0.75rem;
color: var(--muted);
}

.card-body {
margin: 0.3rem 0 0.4rem 0;
}

/* Bullet lists inside cards */
.bullets {
list-style: none;
padding: 0;
margin: 0.2rem 0 0;
font-size: 0.9rem;
}

.bullets li {
margin-bottom: 0.25rem;
}

.bullets li::before {
content: "• ";
color: var(--accent);
}

/* Link pill row */
.links {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
margin-top: 0.4rem;
}

.links a {
text-decoration: none;
font-size: 0.85rem;
border-radius: 999px;
border: 1px solid var(--border);
padding: 0.2rem 0.6rem;
}

.links a:hover {
background-color: var(--accent);
color: #020617;
}

/* =========================================================
JOURNEY SECTION
========================================================= */

.journey-inner {
display: block;
}

.journey-content {
flex: 1;
}

.journey-location {
margin-bottom: 2.5rem;
}

.journey-location-title {
margin: 0 0 0.2rem 0;
font-size: 1.1rem;
}

.journey-project {
margin-top: 0.8rem;
}

.journey-project-title {
margin: 0 0 0.15rem 0;
font-size: 0.98rem;
}

.journey-project-body {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}

/* =========================================================
FOOTER
========================================================= */

.site-footer {
/* border-top: 1px solid var(--border); */
    padding: 2rem 0 2.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    transition:
        background-color 0.35s ease,
        border-color 0.35s ease,
        color 0.35s ease;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
}

.footer-contact {
    max-width: 480px;
    text-align: left;
}

.footer-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.footer-text {
    margin: 0 0 0.6rem 0;
    font-size: 0.9rem;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
}

.footer-list li {
    margin-bottom: 0.25rem;
}

.footer-meta {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 640px) {
.footer-inner {
    flex-direction: column;
    align-items: flex-start;
}

.footer-meta {
    margin-left: 0;
}
}

/* =========================================================
GLOBAL SITE SLIDER + JOURNEY BRANCH
========================================================= */
/* Main slider container */
.site-slider {
    position: fixed;
    left: 3%;
    top: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    pointer-events: none; /* only dots clickable */
}

/* Vertical main track */
.site-slider-track {
    position: relative;
    width: 18px;
    height: 50vh;
    margin: 0 auto;
    border-radius: 999px;
    background-color: var(--border);
    pointer-events: auto;
}

/* Blue fill inside main track */
.site-slider-fill {
    position: absolute;
    left: 2px;
    top: 0;
    width: 14px;
    height: 0;
    border-radius: 999px;
    background-color: var(--accent);
    transition: height 0.25s ease;
}

/* Main section dots */
.site-slider-thumb {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background-color: #ffffff;
    border: 2px solid var(--accent);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    padding: 0;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    }

/* Connector line from thumb to label */
.site-slider-thumb::before {
    content: "";
    position: absolute;          /* positioned from thumb */
    left: 110%;                  /* horizontal start from thumb */
    top: 50%;                    /* vertical center */
    transform: translateY(-50%);
    width: 60px;                 /* line length */
    height: 2px;                 /* line thickness */
    background-color: var(--border);
    opacity: 1;                  /* always visible */
    border-radius: 999px;
}

/* Base tooltip for main thumbs – on the right side */
.site-slider-thumb::after {
    position: absolute;          /* positioned from thumb */
    left: calc(120% + 50px);     /* label position from thumb */
    top: 50%;                    /* vertical center */
    transform: translateY(-50%);
    padding: 0px 8px;            /* label padding */
    border-radius: 999px;          /* label corners */
    background-color: var(--border);
    color: var(--text);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 1;                  /* always visible */
    pointer-events: none;
    content: "";
}

/* Show label + line on hover/focus */
.site-slider-thumb:hover::before,
.site-slider-thumb:focus-visible::before,
.site-slider-thumb:hover::after,
.site-slider-thumb:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0); /* keep aligned */
}

/* Labels for each main thumb (order in index.html) */
.site-slider-thumb:nth-child(3)::after { content: "Initial Commit"; }
.site-slider-thumb:nth-child(4)::after { content: "Branch Experience"; }
.site-slider-thumb:nth-child(5)::after { content: "Branch Projects"; }
.site-slider-thumb:nth-child(6)::after { content: "Web & GitHub"; }

/* 4 sections: Intro, Experience, Projects, Web+GitHub */
.site-slider-thumb:nth-child(3) { top: -6px; }                 /* Intro      */
.site-slider-thumb:nth-child(4) { top: calc(33% - 12px); }     /* Experience */
.site-slider-thumb:nth-child(5) { top: calc(66% - 12px); }     /* Projects   */
.site-slider-thumb:nth-child(6) { top: calc(100% - 23px); }    /* Web+GitHub */

.site-slider-thumb.is-active {
    background-color: var(--accent);
    border-color: #ffffff;
}

.site-slider-thumb:hover,
.site-slider-thumb:focus-visible {
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.4);
    outline: none;
}

/* Journey branch line (git-style) */
.site-slider-branch {
    position: absolute;
    left: 45px;                  /* to the right of main track */
    top: calc(70% - 20px);       /* aligned with Projects/Journey dot */
    height: 16.5vh;                /* branch length downward */
    display: flex;
    width: 55px;
    pointer-events: none;
    
}

/* Path wrapper */
.site-slider-branch-path {
    position: absolute;
    inset: 0;
}

/* Vertical branch line */
.site-slider-branch-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    height: 100%;
    background-color: var(--border);
    border-radius: 999px;
}

/* Blue fill inside branch line */
.site-slider-branch-fill {
    position: absolute;
    left: 2px;              /* inside 10px line */
    top: 2px;
    width: 6px;
    height: 0;
    border-radius: 999px;
    background-color: var(--accent);
    transition: height 0.25s ease;
}

/* Short angled connector from main track to branch line */
.site-slider-branch-connector-top {
    position: absolute;
    top: -2px;           /* align with top of branch line */
    left: -30px;
    width: 40px;
    height: 10px;     /* stays visually 10px thick */
    background-color: var(--border);
    border-radius: 999px;
    transform-origin: left center;
}

.site-slider-branch-connector-top-fill {
    position: absolute;
    left: -32px;              /* inside 10px line */
    top: 0;
    width: 0;
    height: 6px;
    border-radius: 999px;
    background-color: var(--accent);
    transition: width 0.25s ease;
}

/* Short angled connector from branch line to main track (bottom) */
.site-slider-branch-connector-bottom {
    position: absolute;
    bottom: -1px;        /* align with bottom of branch line */
    left: -30px;
    width: 38px;
    height: 10px;
    background-color: var(--border);
    border-radius: 999px;
    transform-origin: left center;
}

.site-slider-branch-connector-bottom-fill {
    position: absolute;
    right: 47.5px;             /* inside 10px line */
    bottom: 1px;
    width: 0;
    height: 6px;
    border-radius: 999px;
    background-color: var(--accent);
    transition: width 0.25s ease;
}


/* Small location dots on branch */
.site-slider-branch-thumb {
position: absolute;
width: 14px;
left: -1.5px;
height: 14px;
border-radius: 999px;
border: 2px solid var(--accent);
background-color: #ffffff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
cursor: pointer;
padding: 0;
pointer-events: auto;
transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

/* Base tooltip for branch thumbs */
.site-slider-branch-thumb::after {
    position: absolute;
    left: 120%;           /* to the right of the branch */
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 6px;
    border-radius: 999px;
    background-color: var(--bg-elevated);
    color: var(--text);
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    content: "";
}

/* Show on hover/focus */
.site-slider-branch-thumb:hover::after,
.site-slider-branch-thumb:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

/* Place dots down the branch: buttons 1–4 */
.site-slider-branch-thumb:nth-of-type(1) { top: 15%; }  /* Mombasa   */
.site-slider-branch-thumb:nth-of-type(2) { top: 35%; }  /* Nairobi   */
.site-slider-branch-thumb:nth-of-type(3) { top: 55%; }  /* Chicago   */
.site-slider-branch-thumb:nth-of-type(4) { top: 75%; }  /* Fort Collins */

/* Labels for each journey location */
.site-slider-branch-thumb:nth-of-type(1)::after { content: "Mombasa"; }
.site-slider-branch-thumb:nth-of-type(2)::after { content: "Nairobi"; }
.site-slider-branch-thumb:nth-of-type(3)::after { content: "Chicago"; }
.site-slider-branch-thumb:nth-of-type(4)::after { content: "Fort Collins"; }    

.site-slider-branch-thumb:hover,
.site-slider-branch-thumb:focus-visible {
background-color: var(--accent);
border-color: #ffffff;
transform: scale(1.1);
outline: none;
}

.site-slider-branch-thumb.is-active {
background-color: var(--accent);
border-color: #ffffff;
}

/* Hide slider + branch on small screens */
@media (max-width: 1160px) {
    .site-slider {
        display: none;
    }

.site-slider-branch {
        display: none;
    }
}

/* =========================================================
GITHUB PROJECTS GRID
========================================================= */

.github-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 1.25rem;
margin-top: 1rem;
}

.github-item {
display: flex;
flex-direction: column;
gap: 0.6rem;
}

.github-thumb {
position: relative;
border-radius: 0.75rem;
overflow: hidden;
border: 1px solid var(--border);
background-color: var(--bg-elevated);
cursor: pointer;
}

.github-thumb img {
display: block;
width: 100%;
height: 160px;
object-fit: cover;
transition: transform 0.3s ease, opacity 0.3s ease;
}

.github-thumb-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0.35)
);
color: #f9fafb;
font-size: 0.85rem;
letter-spacing: 0.08em;
text-transform: uppercase;
opacity: 0;
transition: opacity 0.3s ease;
}

.github-thumb-overlay a {
font-weight: bold;
text-decoration: none;
}

.github-thumb:hover img {
transform: scale(1.04);
opacity: 0.85;
}

.github-thumb:hover .github-thumb-overlay {
opacity: 1;
}

.github-text .github-title {
margin: 0 0 0.15rem 0;
font-size: 0.98rem;
}

.github-text .github-title a {
color: var(--text);
text-decoration: none;
}

.github-text .github-title a:hover {
color: var(--accent);
}

.github-text .github-body {
margin: 0 0 0.25rem 0;
font-size: 0.9rem;
color: var(--muted);
}

/* Stack projects on smaller screens */
@media (max-width: 880px) {
.github-grid {
    grid-template-columns: 1fr;
}
}

@media (min-width: 881px) and (max-width: 1120px) {
.github-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

/* =========================================================
RESPONSIVE LAYOUT + REDUCED MOTION
========================================================= */

@media (max-width: 640px) {
.nav {
    display: none;
}

.header-inner {
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.hero-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-header-text {
    align-items: center;
}
}

@media (prefers-reduced-motion: reduce) {
* {
    transition: none !important;
    animation: none !important;
}
}

.screen-width {
    width: 100%
}

/* =========================================================
NOTICE BAR
========================================================= 

 /*Notification bar above header */
.notice-bar {
    position: sticky;
    top: 0;
    z-index: 11; /* above header (header is 10) */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.4rem 1.25rem;
    background-color: var(--accent);
    color: #020617;
    font-size: 0.85rem;
}

.notice-link {
    color: #020617;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.notice-link:hover {
    text-decoration: none;
}

.notice-close {
    border: none;
    background: transparent;
    color: #020617;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.25rem;
}
