/* ============================================================
   Khurshid Mirzajonov — Personal Site
   Modern dark theme, fintech-inspired UI
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
    /* Colors — backgrounds */
    --bg-base: #07090f;
    --bg-elev: #0c1019;
    --bg-card: #11172380;
    --bg-card-solid: #111723;
    --bg-card-hover: #161e2e;

    /* Colors — text */
    --text-primary: #e6edf3;
    --text-secondary: #9aa4b2;
    --text-muted: #6b7686;

    /* Colors — accent */
    --accent: #06b6d4;
    --accent-2: #3b82f6;
    --accent-3: #8b5cf6;
    --accent-soft: rgba(6, 182, 212, 0.12);
    --accent-glow: rgba(6, 182, 212, 0.35);

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(6, 182, 212, 0.3);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    --grad-text: linear-gradient(135deg, #06b6d4 0%, #818cf8 100%);
    --grad-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.2);

    /* Radius */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 9999px;

    /* Spacing (8pt grid) */
    --s-1: 8px;
    --s-2: 16px;
    --s-3: 24px;
    --s-4: 32px;
    --s-5: 48px;
    --s-6: 64px;
    --s-7: 96px;
    --s-8: 128px;

    /* Layout */
    --container: 1200px;
    --nav-h: 72px;

    /* Motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast: 180ms;
    --dur: 320ms;
    --dur-slow: 600ms;

    /* Type */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

a img,
button img {
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    color: inherit;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ---------- Container & shared ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--s-3);
}

.accent {
    color: var(--accent);
}

.gradient-text {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---------- Background decoration ---------- */
.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
    will-change: transform;
}

.orb--1 {
    width: 500px;
    height: 500px;
    top: -150px;
    left: -150px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
}

.orb--2 {
    width: 600px;
    height: 600px;
    top: 30%;
    right: -200px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    opacity: 0.3;
}

.orb--3 {
    width: 480px;
    height: 480px;
    bottom: -150px;
    left: 30%;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    opacity: 0.25;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--r-full);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: transform var(--dur) var(--ease),
        background var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        border-color var(--dur) var(--ease);
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1;
}

.btn--primary {
    background: var(--grad-primary);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(6, 182, 212, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-strong);
    backdrop-filter: blur(8px);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    transition: background var(--dur) var(--ease),
        backdrop-filter var(--dur) var(--ease),
        border-color var(--dur) var(--ease);
    border-bottom: 1px solid transparent;
}

.navbar.is-scrolled {
    background: rgba(7, 9, 15, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom-color: var(--border);
}

.navbar__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.navbar__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--grad-primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.navbar__brand-text {
    font-weight: 700;
    font-size: 16px;
}

.navbar__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 6px;
    border-radius: var(--r-full);
    backdrop-filter: blur(12px);
}

.navbar__link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--r-full);
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.navbar__link:hover,
.navbar__link.is-active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.navbar__cta {
    padding: 10px 18px;
    font-size: 13px;
}

.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.navbar__toggle span {
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.navbar__toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar__toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.navbar__toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    padding-top: calc(var(--nav-h) + var(--s-5));
    padding-bottom: var(--s-7);
    display: flex;
    align-items: center;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s-6);
    align-items: center;
}

.hero__content {
    max-width: 640px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: var(--r-full);
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: var(--s-3);
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    animation: pulse 2s var(--ease) infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.hero__title {
    font-size: clamp(2.4rem, 5.5vw, 4.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: var(--s-3);
    color: var(--text-secondary);
}

.hero__name {
    display: block;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-top: 4px;
}

.hero__role {
    display: block;
    color: var(--text-primary);
    margin-top: 4px;
}

.hero__description {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--s-4);
    max-width: 580px;
}

.hero__description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero__link {
    color: var(--accent);
    font-weight: 600;
    border-bottom: 1px dashed transparent;
    transition: border-color var(--dur-fast) var(--ease);
}

.hero__link:hover {
    border-bottom-color: var(--accent);
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-bottom: var(--s-5);
}

.hero__meta {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex-wrap: wrap;
}

.hero__meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero__meta-num {
    font-size: 28px;
    font-weight: 800;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: -0.02em;
    line-height: 1;
}

.hero__meta-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero__meta-divider {
    width: 1px;
    height: 36px;
    background: var(--border-strong);
}

/* Hero visual */
.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px;
    margin-left: auto;
    width: 100%;
    padding: var(--s-3);
}

.hero__photo-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 5;
    isolation: isolate;
}

/* Glow behind everything */
.hero__photo-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.5), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.45), transparent 60%);
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.6;
    z-index: 0;
    animation: float 7s var(--ease) infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

/* Offset accent card behind the photo (tilted opposite way) */
.hero__photo-wrap::before {
    content: "";
    position: absolute;
    inset: 12px -16px -16px 12px;
    background: var(--grad-primary);
    border-radius: var(--r-xl);
    transform: rotate(-4deg);
    opacity: 0.85;
    z-index: 1;
    box-shadow: 0 30px 60px rgba(6, 182, 212, 0.25);
}

/* Decorative dotted pattern panel behind */
.hero__photo-wrap::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    bottom: -24px;
    left: -28px;
    background-image: radial-gradient(circle, rgba(6, 182, 212, 0.55) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
    z-index: 0;
    border-radius: var(--r-sm);
}

.hero__photo-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--bg-card-solid);
    z-index: 2;
    transform: rotate(2deg);
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 0 0 6px rgba(7, 9, 15, 0.9),
        inset 0 0 0 7px rgba(6, 182, 212, 0.4);
    transition: transform var(--dur-slow) var(--ease);
}

.hero__photo-wrap:hover .hero__photo-frame {
    transform: rotate(0deg);
}

.hero__photo-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(7, 9, 15, 0.45) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Corner accent decorations */
.hero__photo-frame::before {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    border-top-right-radius: 14px;
    z-index: 3;
    pointer-events: none;
    opacity: 0.85;
}

.hero__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    -webkit-user-drag: none;
    user-drag: none;
}

.hero__floating {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(17, 23, 35, 0.92);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
}

.hero__floating--1 {
    top: 8%;
    left: -28px;
    animation: float 5s var(--ease) infinite;
}

.hero__floating--2 {
    bottom: 10%;
    right: -24px;
    animation: float 5s var(--ease) infinite reverse;
    animation-delay: -2.5s;
}

.hero__floating-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border-accent);
}

.hero__floating-icon--alt {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-3);
    border-color: rgba(139, 92, 246, 0.3);
}

.hero__floating-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero__floating-sub {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.hero__scroll {
    position: absolute;
    bottom: var(--s-4);
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid var(--border-strong);
    border-radius: var(--r-full);
    display: flex;
    justify-content: center;
    padding-top: 6px;
    transition: border-color var(--dur) var(--ease);
}

.hero__scroll:hover {
    border-color: var(--accent);
}

.hero__scroll span {
    width: 3px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: var(--r-full);
    animation: scroll-dot 1.6s var(--ease) infinite;
}

@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- Sections ---------- */
.section {
    padding: var(--s-7) 0;
    position: relative;
}

.section--alt {
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.015) 50%, transparent 100%);
}

.section__head {
    max-width: 720px;
    margin: 0 auto var(--s-6);
    text-align: center;
}

.section__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--s-2);
    padding: 6px 14px;
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    border-radius: var(--r-full);
}

.section__title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--s-2);
}

.section__subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- About ---------- */
.about__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s-5);
    align-items: start;
}

.about__text p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: var(--s-2);
}

.about__text p:last-child {
    margin-bottom: 0;
}

.about__text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* About — Quick Info card */
.about__info {
    padding: var(--s-3);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.about__info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-primary);
    opacity: 0.7;
}

.about__info-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--s-2);
    padding-bottom: var(--s-2);
    border-bottom: 1px dashed var(--border);
}

.about__info-list {
    display: grid;
    gap: var(--s-2);
}

.about__info-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.about__info-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--r-sm);
    border: 1px solid var(--border-accent);
    position: relative;
}

.about__info-icon--accent {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

.about__info-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    animation: pulse 2s var(--ease) infinite;
}

.about__info-item > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.about__info-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.about__info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-top: 2px;
}

.about__info-link {
    color: var(--accent);
    border-bottom: 1px dashed transparent;
    transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.about__info-link:hover {
    border-bottom-color: var(--accent);
}

.about__inline-link {
    color: var(--text-primary);
    font-weight: 700;
    border-bottom: 1.5px solid var(--border-accent);
    padding-bottom: 1px;
    transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.about__inline-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ---------- Cards (expertise) ---------- */
.expertise__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--s-2);
}

.card {
    position: relative;
    padding: var(--s-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    backdrop-filter: blur(8px);
    transition: transform var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        background var(--dur) var(--ease);
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grad-card);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.card:hover::before {
    opacity: 1;
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border-accent);
    margin-bottom: var(--s-2);
    transition: transform var(--dur) var(--ease);
}

.card:hover .card__icon {
    transform: scale(1.05) rotate(-3deg);
}

.card__title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.card__text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding-left: 32px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-3) 100%);
    opacity: 0.4;
    border-radius: 2px;
}

.timeline__item {
    position: relative;
    margin-bottom: var(--s-4);
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__dot {
    position: absolute;
    left: -32px;
    top: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.timeline__dot::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--grad-primary);
}

.timeline__card {
    padding: var(--s-3);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    backdrop-filter: blur(8px);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.timeline__card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.timeline__head {
    display: flex;
    gap: var(--s-2);
    align-items: center;
    margin-bottom: var(--s-2);
    flex-wrap: wrap;
}

.timeline__logo {
    width: 56px;
    height: 56px;
    border-radius: var(--r-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: #6d4ef0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline__logo--neutral {
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    color: var(--accent);
}

.timeline__period {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 10px;
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    border-radius: var(--r-full);
    margin-bottom: 6px;
}

.timeline__role {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.timeline__company {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 500;
}

.timeline__text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: var(--s-2);
}

.timeline__points {
    display: grid;
    gap: 8px;
}

.timeline__points li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.timeline__points li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---------- Projects ---------- */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--s-3);
}

.project {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: transform var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease);
    display: flex;
    flex-direction: column;
}

.project:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

.project__media {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.project__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.18) 100%);
    pointer-events: none;
    z-index: 1;
    transition: background var(--dur) var(--ease);
}

.project__media:hover::after {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, rgba(0, 0, 0, 0.35) 100%);
}

/* Highlight badge in top-right corner of project media */
.project__highlight {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    background: rgba(7, 9, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--r-full);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.project__highlight--light {
    color: #ffffff;
}

/* "Visit" hover indicator on project media */
.project__media::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(7, 9, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M7 17 17 7M7 7h10v10'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    z-index: 2;
    pointer-events: none;
}

.project:hover .project__media::before {
    opacity: 1;
    transform: translateY(0);
}

.project__media img {
    transition: transform var(--dur-slow) var(--ease);
}

.project:hover .project__media img {
    transform: scale(1.04);
}

/* Taqseem: logo on light bg (matches the logo's white background) */
.project__media--taqseem {
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
}

.project__media--taqseem img {
    width: 60%;
    height: 80%;
    object-fit: contain;
}

/* Avtovodiy: brand image already complete — full cover */
.project__media--avtovodiy img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* pDaftar: brand image already complete — full cover */
.project__media--pdaftar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.project__body {
    padding: var(--s-3);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s-2);
    margin-bottom: 12px;
}

.project__head > div {
    min-width: 0;
}

.project__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.project__subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.project__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--r-full);
    border: 1px solid var(--border-accent);
}

.project__tag--personal {
    color: var(--accent);
    background: var(--accent-soft);
}

.project__tag--work {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.1);
    border-color: rgba(192, 132, 252, 0.3);
}

.project__text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--s-2);
    flex: 1;
}

.project__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--s-2);
}

.project__chips li {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
}

.project__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-top: auto;
    align-self: flex-start;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-full);
    font-family: var(--font-mono);
    transition: color var(--dur) var(--ease),
        background var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}

.project__link svg {
    transition: transform var(--dur) var(--ease);
}

.project__link:hover {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.project__link:hover svg {
    transform: translate(2px, -2px);
}

/* ---------- Contact ---------- */
.contact {
    padding: var(--s-6) var(--s-4);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.contact__head {
    text-align: center;
    margin-bottom: var(--s-5);
    position: relative;
}

.contact__head .section__eyebrow {
    margin-bottom: var(--s-2);
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--s-2);
    position: relative;
}

.contact__card {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-3);
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: transform var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        background var(--dur) var(--ease);
}

.contact__card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.contact__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
}

.contact__icon--telegram {
    background: rgba(34, 158, 217, 0.12);
    color: #2aabee;
    border: 1px solid rgba(34, 158, 217, 0.3);
}

.contact__icon--instagram {
    background: linear-gradient(135deg, rgba(247, 119, 55, 0.15), rgba(220, 39, 67, 0.15), rgba(188, 24, 136, 0.15));
    color: #fb923c;
    border: 1px solid rgba(220, 39, 67, 0.3);
}

.contact__icon--cta {
    background: var(--grad-primary);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.3);
}

.contact__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact__arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.contact__card:hover .contact__arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}

.contact__card--cta {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(59, 130, 246, 0.08));
    border-color: var(--border-accent);
}

/* ---------- Footer ---------- */
.footer {
    padding: var(--s-4) 0;
    border-top: 1px solid var(--border);
    margin-top: var(--s-5);
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-3);
    flex-wrap: wrap;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer__name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
}

.footer__role {
    font-size: 13px;
    color: var(--text-muted);
}

.footer__social {
    display: flex;
    gap: 10px;
}

.footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer__social-link:hover {
    color: var(--accent);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.footer__copy {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- Reveal animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .orb,
    .hero__photo-glow,
    .hero__floating--1,
    .hero__floating--2,
    .hero__badge-dot,
    .hero__scroll span {
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: var(--s-5);
        text-align: center;
    }

    .hero__content {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__cta,
    .hero__meta {
        justify-content: center;
    }

    .hero__visual {
        order: -1;
        max-width: 360px;
    }

    .hero__photo-wrap {
        max-width: 320px;
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: var(--s-4);
    }

    .navbar__nav {
        display: none;
    }

    .navbar__toggle {
        display: flex;
    }

    .navbar__nav.is-open {
        display: flex;
        position: absolute;
        top: calc(var(--nav-h) + 12px);
        right: var(--s-3);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px;
        background: rgba(12, 16, 25, 0.96);
        border: 1px solid var(--border);
        border-radius: var(--r-md);
        backdrop-filter: blur(20px);
        min-width: 220px;
        box-shadow: var(--shadow-lg);
    }

    .navbar__nav.is-open .navbar__link {
        text-align: left;
        padding: 12px 16px;
    }

    .navbar__cta {
        display: none;
    }
}

@media (max-width: 640px) {
    :root {
        --s-7: 64px;
    }

    .container {
        padding: 0 20px;
    }

    .hero {
        padding-top: calc(var(--nav-h) + var(--s-3));
        min-height: auto;
    }

    .hero__floating--1 {
        left: -8px;
        top: 8%;
    }

    .hero__floating--2 {
        right: -8px;
        bottom: 8%;
    }

    .hero__floating-title {
        font-size: 12px;
    }

    .hero__floating-sub {
        font-size: 10px;
    }

    .hero__meta {
        gap: var(--s-2);
    }

    .hero__meta-divider {
        display: none;
    }

    .hero__meta-num {
        font-size: 24px;
    }

    .hero__cta .btn {
        width: 100%;
    }

    .section {
        padding: var(--s-6) 0;
    }

    .section__head {
        margin-bottom: var(--s-4);
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline__dot {
        left: -24px;
        width: 18px;
        height: 18px;
    }

    .timeline::before {
        left: 8px;
    }

    .contact {
        padding: var(--s-4) var(--s-3);
    }

    .footer__inner {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .hero__title {
        font-size: 2.2rem;
    }

    .hero__floating--1 {
        display: none;
    }

    .hero__floating--2 {
        display: none;
    }
}
