:root {
    /* Color Palette */
    --bg-color: #0d1117;
    /* Very dark blue/grey */
    --card-bg: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    /* Electric blue */
    --accent-2: #a371f7;
    --accent-glow: rgba(88, 166, 255, 0.4);
    --border-color: #30363d;
    --gradient-1: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);

    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Transitions */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html {
    scroll-behavior: smooth;
}

/* Lenis smooth scroll takes over when active */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 4px;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Split text (built by script.js) */
.split-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.split-char {
    display: inline-block;
    will-change: transform;
}

/* ---------- Preloader ---------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    clip-path: inset(0 0 0 0);
    /* Failsafe: never trap the page if the script can't run */
    animation: preloader-failsafe 0.4s 6s forwards;
}

@keyframes preloader-failsafe {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.preloader-inner {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.preloader-name {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.preloader-count {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    min-width: 3ch;
    text-align: right;
}

.preloader-count::after {
    content: '%';
}

.preloader-bar {
    width: min(280px, 60vw);
    height: 2px;
    background: var(--border-color);
    overflow: hidden;
}

.preloader-bar-fill {
    height: 100%;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
}

/* ---------- Custom cursor ---------- */
.cursor-dot,
.cursor-ring {
    display: none;
}

.has-cursor,
.has-cursor a,
.has-cursor button {
    cursor: none;
}

.has-cursor .cursor-dot,
.has-cursor .cursor-ring {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2500;
    border-radius: 50%;
    opacity: 0;
}

.has-cursor .cursor-dot {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: var(--accent-color);
}

.has-cursor .cursor-ring {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 1px solid rgba(88, 166, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out),
        background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.cursor-ring.is-hover {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    background: rgba(88, 166, 255, 0.08);
    border-color: var(--accent-color);
}

.cursor-ring.is-label {
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.cursor-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bg-color);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.25s, transform 0.35s var(--ease-out);
}

.cursor-ring.is-label .cursor-label {
    opacity: 1;
    transform: scale(1);
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 1100;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: transform 0.5s var(--ease-out);
}

.navbar.nav-hidden {
    transform: translateY(-100%);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.nav-links {
    position: relative;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    position: relative;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-indicator {
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--gradient-1);
    border-radius: 2px;
    opacity: 0;
}

.nav-toggle {
    display: none;
    position: relative;
    width: 32px;
    height: 32px;
    background: none;
    border: 0;
    z-index: 1200;
}

.nav-toggle span {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}

.nav-toggle span:nth-child(1) {
    top: 11px;
}

.nav-toggle span:nth-child(2) {
    top: 19px;
}

.menu-open .nav-toggle span:nth-child(1) {
    top: 15px;
    transform: rotate(45deg);
}

.menu-open .nav-toggle span:nth-child(2) {
    top: 15px;
    transform: rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 990;
    background: rgba(13, 17, 23, 0.97);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 1.5rem;
    gap: 1rem;
    clip-path: circle(0% at calc(100% - 2.5rem) 2rem);
    transition: clip-path 0.7s var(--ease-in-out), visibility 0s 0.7s;
    visibility: hidden;
}

.menu-open .mobile-menu {
    clip-path: circle(150% at calc(100% - 2.5rem) 2rem);
    visibility: visible;
    transition: clip-path 0.7s var(--ease-in-out), visibility 0s;
}

.mobile-menu a {
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), color 0.2s;
}

.mobile-menu a span {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-color);
}

.menu-open .mobile-menu a {
    opacity: 1;
    transform: none;
}

.menu-open .mobile-menu a:nth-child(1) { transition-delay: 0.25s; }
.menu-open .mobile-menu a:nth-child(2) { transition-delay: 0.32s; }
.menu-open .mobile-menu a:nth-child(3) { transition-delay: 0.39s; }
.menu-open .mobile-menu a:nth-child(4) { transition-delay: 0.46s; }

.mobile-menu a:hover {
    color: var(--accent-color);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 60px;
    /* offset for fixed nav */
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('assets/hero_bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: -3;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    z-index: -2;
    pointer-events: none;
}

.hero-orb-1 {
    width: 480px;
    height: 480px;
    background: var(--accent-color);
    top: -120px;
    left: -120px;
    animation: orb-float 14s ease-in-out infinite;
}

.hero-orb-2 {
    width: 420px;
    height: 420px;
    background: var(--accent-2);
    bottom: -140px;
    right: -100px;
    animation: orb-float 18s ease-in-out infinite reverse;
}

@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(120px, 80px) scale(1.15);
    }

    66% {
        transform: translate(-60px, 140px) scale(0.9);
    }
}

.hero-content {
    z-index: 1;
    max-width: 900px;
    padding: 0 1.5rem;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    min-height: 1.6em;
}

.caret {
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    margin-left: 0.2em;
    vertical-align: text-bottom;
    background: var(--accent-color);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    position: relative;
    display: inline-block;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    overflow: hidden;
    isolation: isolate;
    transition: box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
    border: 1px solid transparent;
}

.btn span {
    position: relative;
    display: inline-block;
}

/* Liquid fill on hover */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    transform: translateY(101%);
    transition: transform 0.5s var(--ease-out);
}

.btn:hover::before {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary::before {
    background: var(--accent-2);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(163, 113, 247, 0.45);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary::before {
    background: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    color: var(--bg-color);
}

.btn-big {
    padding: 1.2rem 2.8rem;
    font-size: 1.15rem;
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-down i {
    position: relative;
    width: 1px;
    height: 48px;
    background: var(--border-color);
    overflow: hidden;
}

.scroll-down i::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 50%;
    background: var(--accent-color);
    animation: scroll-line 1.8s var(--ease-in-out) infinite;
}

@keyframes scroll-line {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(200%);
    }
}

/* ---------- Marquee ---------- */
.marquee {
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    background: rgba(22, 27, 34, 0.6);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: max-content;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.marquee-track span {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-secondary);
    transition: color 0.3s, -webkit-text-stroke-color 0.3s;
}

.marquee-track span:hover {
    color: var(--text-primary);
    -webkit-text-stroke-color: var(--text-primary);
}

.marquee-track b {
    color: var(--accent-color);
    font-size: 1.25rem;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

/* GSAP drives the marquee when available */
.gsap-ready .marquee-track {
    animation: none;
}

/* ---------- Section General ---------- */
section {
    padding: 7rem 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 3.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.section-num {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.1em;
}

.section-num::before {
    content: '// ';
    color: var(--text-secondary);
}

.section-text {
    position: relative;
    padding-bottom: 0.4rem;
}

.section-text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: var(--gradient-1);
    transform-origin: left;
    transform: scaleX(var(--line, 1));
}

/* ---------- About Section ---------- */
.about-content {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: center;
}

/* Photo frame with a rotating gradient border */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.about-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    padding: 3px;
    border-radius: 20px;
    background: conic-gradient(from var(--angle), var(--accent-color), var(--accent-2), transparent 55%, var(--accent-color));
    animation: spin-border 6s linear infinite;
}

.about-photo::before {
    content: '';
    position: absolute;
    inset: -20px;
    z-index: -1;
    border-radius: 40px;
    background: var(--gradient-1);
    filter: blur(50px);
    opacity: 0.25;
}

@keyframes spin-border {
    to {
        --angle: 360deg;
    }
}

.about-photo-inner {
    width: 100%;
    height: 100%;
    border-radius: 17px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(88, 166, 255, 0.18), transparent 60%),
        radial-gradient(circle at 80% 90%, rgba(163, 113, 247, 0.18), transparent 60%),
        var(--card-bg);
}

.about-photo-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-initials {
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.about-text {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.7;
    font-weight: 500;
    color: var(--text-primary);
}

.about-text p+p {
    margin-top: 1.5rem;
}

/* ---------- Skills Section ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    perspective: 1200px;
}

.skill-card,
.project-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transform-style: preserve-3d;
    transition: border-color 0.3s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.skill-card {
    padding: 1.75rem;
}

/* Cursor-tracking spotlight (uses --mx/--my from script.js) */
.skill-card::after,
.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(88, 166, 255, 0.16), transparent 45%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.skill-card:hover::after,
.project-card:hover::after {
    opacity: 1;
}

.skill-card:hover,
.project-card:hover {
    border-color: rgba(88, 166, 255, 0.6);
    box-shadow: 0 20px 50px -20px rgba(88, 166, 255, 0.35);
}

.skill-category {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    transform: translateZ(30px);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    transform: translateZ(20px);
}

.tag {
    display: inline-block;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.15);
    color: var(--accent-color);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    /* `translate` (not `transform`) so hover never fights GSAP's reveal tweens */
    transition: background 0.25s, color 0.25s, translate 0.25s var(--ease-out);
}

.tag:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    translate: 0 -3px;
}

/* ---------- Projects Section ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    perspective: 1200px;
}

.project-card {
    overflow: hidden;
}

/* Gradient border that draws itself on hover */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease-out);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-info {
    padding: 2rem;
    transform: translateZ(40px);
}

.project-index {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1.45rem;
    margin-bottom: 0.75rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.project-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.project-link span {
    transition: transform 0.35s var(--ease-out);
}

.project-link:hover span {
    transform: translateX(6px);
}

.project-note {
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* More work */
.more-title {
    margin: 4.5rem 0 1.25rem;
    font-size: 1.1rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-secondary);
}

.more-list {
    list-style: none;
    border-top: 1px solid var(--border-color);
}

.more-item {
    border-bottom: 1px solid var(--border-color);
}

.more-item > a,
.more-item > div {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 2fr minmax(160px, auto);
    align-items: baseline;
    gap: 0.5rem 2rem;
    padding: 1.25rem 0.5rem;
    transition: background 0.3s, padding 0.4s var(--ease-out);
}

.more-item > a:hover {
    background: rgba(88, 166, 255, 0.06);
    padding-left: 1.25rem;
}

.more-name {
    font-weight: 700;
    color: var(--text-primary);
}

.more-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.more-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-color);
    text-align: right;
}

.more-github {
    margin-top: 2rem;
}

/* ---------- Experience Section ---------- */
.timeline {
    position: relative;
    list-style: none;
    padding-left: 2rem;
}

/* Track, plus a gradient line that draws down it as you scroll (--progress from script.js) */
.timeline::before,
.timeline::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
}

.timeline::before {
    background: var(--border-color);
}

.timeline::after {
    background: var(--gradient-1);
    transform-origin: top;
    transform: scaleY(var(--progress, 1));
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 0.5rem 2rem;
    padding: 1.5rem 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-2rem - 5px);
    top: 1.95rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-color);
    padding-top: 0.3rem;
}

.timeline-role {
    font-size: 1.25rem;
}

.timeline-role span {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 1rem;
}

.timeline-org {
    color: var(--text-primary);
    font-weight: 500;
    margin: 0.2rem 0 0.5rem;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 62ch;
}

/* ---------- Contact Section ---------- */
.contact-container {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.contact-lead {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.contact-text {
    color: var(--text-secondary);
    margin: 0 auto 2.5rem;
    max-width: 560px;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-top: 3rem;
}

.social-icon {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-block;
    overflow: hidden;
    line-height: 1.4;
}

/* Text roll on hover */
.social-icon span {
    position: relative;
    display: inline-block;
    transition: transform 0.45s var(--ease-out);
}

.social-icon span::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 100%;
    color: var(--accent-color);
}

.social-icon:hover span {
    transform: translateY(-100%);
}

/* ---------- Footer ---------- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* ---------- Project previews (driven by script.js) ---------- */
.project-visual {
    position: relative;
    height: 180px;
    background: #0a0e13;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    font-family: var(--font-mono);
}

.viz-caption {
    position: absolute;
    left: 14px;
    bottom: 10px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* 1. Internet-use chart */
.chart-bars {
    position: absolute;
    inset: 20px 20px 36px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
}

.chart-bar {
    position: relative;
    flex: 1;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(to top, rgba(88, 166, 255, 0.25), rgba(88, 166, 255, 0.8));
    transition: height 0.7s var(--ease-out);
}

.chart-bar.is-ghana {
    background: linear-gradient(to top, rgba(163, 113, 247, 0.35), var(--accent-2));
}

.chart-bar::after {
    content: attr(data-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    translate: -50% -4px;
    font-size: 0.62rem;
    color: var(--accent-2);
}

.chart-year {
    color: var(--text-primary);
    font-weight: 600;
}

/* 2. API terminal */
.viz-api {
    display: flex;
    flex-direction: column;
}

.term-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.term-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff5f57;
}

.term-bar i:nth-child(2) {
    background: #febc2e;
}

.term-bar i:nth-child(3) {
    background: #28c840;
}

.term-bar span {
    margin-left: 8px;
}

.term-body {
    flex: 1;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.74rem;
    line-height: 1.65;
    white-space: pre;
    overflow: hidden;
    color: var(--text-primary);
}

.term-body .t-ok {
    color: #3fb950;
}

.term-body .t-created {
    color: var(--accent-color);
}

.term-caret {
    display: inline-block;
    width: 0.55em;
    height: 1em;
    vertical-align: text-bottom;
    background: var(--text-primary);
    animation: blink 1s step-end infinite;
}

/* 3. Encrypted chat */
.viz-chat {
    padding: 14px 14px 32px;
}

.chat-log {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 7px;
    overflow: hidden;
}

.chat-msg {
    max-width: 78%;
    padding: 5px 10px;
    border-radius: 12px 12px 12px 3px;
    font-size: 0.72rem;
    line-height: 1.4;
    align-self: flex-start;
    background: #21262d;
    color: var(--text-primary);
    white-space: nowrap;
}

.chat-msg.me {
    align-self: flex-end;
    border-radius: 12px 12px 3px 12px;
    background: rgba(88, 166, 255, 0.18);
    color: var(--accent-color);
}

/* ---------- Copy email ---------- */
.copy-email {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin: 1.5rem auto 0;
    background: none;
    border: 0;
    font: inherit;
    color: var(--text-secondary);
}

.copy-email-text {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
    border-bottom: 1px dashed var(--border-color);
    transition: color 0.2s, border-color 0.2s;
}

.copy-email:hover .copy-email-text {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.copy-email-hint {
    font-size: 0.75rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-photo {
        width: 220px;
        margin: 0 auto;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 5rem 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .more-item > a,
    .more-item > div {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .more-meta {
        text-align: left;
    }

    .hero-orb {
        width: 280px;
        height: 280px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .preloader {
        display: none;
    }
}
