@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('assets/fonts/montserrat-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('assets/fonts/orbitron-latin.woff2') format('woff2');
}

:root {
    --bg-base: #060b13;
    --bg-mid: #0b1626;
    --bg-accent: #12233d;
    --halo-a: rgba(60, 160, 200, 0.08);
    --halo-b: rgba(70, 110, 190, 0.09);
    --text: #c3d3e6;
    --text-soft: #9db1c9;
    --text-muted: #768ba6;
    --panel: rgba(10, 17, 30, 0.76);
    --panel-strong: rgba(7, 13, 24, 0.95);
    --header-bg: rgba(6, 11, 20, 0.86);
    --footer-bg: rgba(4, 8, 15, 0.45);
    --border: rgba(90, 170, 205, 0.16);
    --border-hover: rgba(90, 170, 205, 0.38);
    --corner: rgba(90, 170, 205, 0.45);
    --cyan: #4fa9c9;
    --cyan-2: #6bbccc;
    --blue: #5b86bf;
    --gold: #c2a24f;
    --wash: rgba(79, 169, 201, 0.055);
    --input-bg: rgba(5, 10, 19, 0.6);
    --grid-line: rgba(90, 170, 205, 0.03);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
    --glow: 0 0 20px rgba(79, 169, 201, 0.09);
    --header-h: 76px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

body[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-mid: #e8eef6;
    --bg-accent: #dbe6f2;
    --halo-a: rgba(14, 165, 233, 0.08);
    --halo-b: rgba(59, 130, 246, 0.1);
    --text: #0f172a;
    --text-soft: #334155;
    --text-muted: #64748b;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --header-bg: rgba(255, 255, 255, 0.9);
    --footer-bg: rgba(241, 245, 249, 0.7);
    --border: rgba(15, 118, 180, 0.18);
    --border-hover: rgba(14, 116, 190, 0.45);
    --corner: rgba(14, 116, 190, 0.5);
    --cyan: #0284c7;
    --cyan-2: #0891b2;
    --blue: #2563eb;
    --gold: #a16207;
    --wash: rgba(2, 132, 199, 0.06);
    --input-bg: rgba(248, 250, 252, 0.9);
    --grid-line: rgba(15, 118, 180, 0.05);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
    --glow: 0 0 20px rgba(2, 132, 199, 0.1);
}

body[data-theme="light"] .btn-primary,
body[data-theme="light"] .skip-link {
    color: #f8fafc;
}

body[data-theme="light"] .btn-primary {
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.18);
}

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

html {
    scroll-behavior: auto;
    scroll-padding-top: calc(var(--header-h) + 24px);
}

html.smooth-scroll {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at 14% 10%, var(--halo-a), transparent 38%),
        radial-gradient(circle at 86% 18%, var(--halo-b), transparent 42%),
        linear-gradient(165deg, var(--bg-base) 0%, var(--bg-mid) 52%, var(--bg-base) 100%);
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

::selection {
    background: var(--cyan);
    color: #08131f;
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 10px;
    border: 2px solid var(--bg-base);
}

img,
svg {
    display: block;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    margin-top: 0;
    letter-spacing: 0.5px;
}

p {
    margin-top: 0;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 300;
    padding: 10px 16px;
    background: var(--cyan);
    color: #08131f;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 12px;
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 25%, #000 10%, transparent 78%);
    mask-image: radial-gradient(ellipse at 50% 25%, #000 10%, transparent 78%);
}

.scanlines {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 4px);
}

.container {
    width: min(1160px, calc(100% - 48px));
    margin-inline: auto;
}

main,
.site-footer {
    position: relative;
    z-index: 2;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    z-index: 100;
    pointer-events: none;
}

.site-header .container,
.site-header .header-pill,
.site-header a,
.site-header button {
    pointer-events: auto;
}

.header-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--header-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.site-header.scrolled .header-pill {
    background: var(--panel-strong);
    border-color: var(--border-hover);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.header-status {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 1.8px;
    color: var(--text-muted);
}

.scroll-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--cyan-2));
    box-shadow: 0 0 10px var(--halo-a);
    opacity: 0.85;
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

.mobile-section {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    color: var(--cyan);
    filter: drop-shadow(0 0 8px var(--halo-a));
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text);
}

.brand-text span {
    color: var(--cyan);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav a {
    position: relative;
    padding: 8px 13px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s var(--ease), background 0.25s var(--ease), text-shadow 0.25s var(--ease);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 8px var(--halo-a);
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.25s var(--ease);
}

.nav a:hover,
.nav a.active {
    background: var(--wash);
    color: var(--cyan-2);
    text-shadow: 0 0 10px var(--halo-a);
}

.nav a:hover::after,
.nav a.active::after {
    transform: translateX(-50%) scaleX(1);
}

.pill-divider {
    width: 1px;
    height: 18px;
    margin: 0 4px;
    background: var(--border);
}

.clock {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 4px;
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    white-space: nowrap;
}

.clock svg {
    width: 14px;
    height: 14px;
    color: var(--cyan);
}

.clock-divider {
    color: var(--cyan);
    opacity: 0.6;
}

.theme-toggle,
.nav-toggle {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.25s, transform 0.25s, background 0.25s;
}

.theme-toggle:hover,
.nav-toggle:hover {
    border-color: var(--cyan);
    background: var(--wash);
    transform: rotate(12deg);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.icon-sun {
    display: none;
}

body[data-theme="light"] .icon-moon {
    display: none;
}

body[data-theme="light"] .icon-sun {
    display: block;
}

.nav-toggle {
    display: none;
    border-radius: 10px;
}

.nav-toggle span {
    display: block;
    width: 17px;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle span + span {
    margin-top: 4px;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.hero {
    position: relative;
    padding-top: calc(var(--header-h) + 70px);
    padding-bottom: 34px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
    align-items: center;
    gap: 64px;
    min-height: calc(100svh - var(--header-h) - 120px);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--cyan);
}

.eyebrow-line {
    width: 38px;
    height: 1px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}

h1 {
    margin-bottom: 14px;
    font-size: clamp(2.2rem, 5.2vw, 4.1rem);
    font-weight: 800;
    line-height: 1.13;
}

.gradient-text {
    background: linear-gradient(100deg, var(--cyan-2), var(--blue) 55%, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-role {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-soft);
}

.typed {
    color: var(--cyan-2);
}

.caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 5px;
    background: var(--cyan);
    animation: blink 1s steps(2, start) infinite;
}

.hero-summary {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s;
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn-primary {
    background: linear-gradient(100deg, var(--cyan), var(--blue));
    color: #08131f;
    box-shadow: 0 8px 24px rgba(79, 169, 201, 0.12);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(79, 169, 201, 0.18);
}

.btn-ghost {
    border-color: var(--border-hover);
    color: var(--text);
    background: transparent;
}

.btn-ghost:hover {
    background: var(--wash);
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}

.hero-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.hero-meta svg {
    width: 16px;
    height: 16px;
    color: var(--cyan);
    flex-shrink: 0;
}

.hero-meta a {
    text-decoration: none;
    border-bottom: 1px dashed var(--border);
    transition: color 0.2s, border-color 0.2s;
}

.hero-meta a:hover {
    color: var(--cyan-2);
    border-color: var(--cyan);
}

.hero-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 520px;
}

.orbit {
    position: absolute;
    border: 1px dashed var(--border);
    border-radius: 50%;
    pointer-events: none;
    animation: spin 42s linear infinite;
}

.orbit::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
}

.orbit-one {
    width: 420px;
    height: 420px;
}

.orbit-two {
    width: 520px;
    height: 520px;
    opacity: 0.55;
    animation-duration: 64s;
    animation-direction: reverse;
}

.panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.identity-card {
    width: min(100%, 390px);
    padding: 26px 28px 30px;
    transform: perspective(900px) rotateY(-6deg) rotateX(3deg);
    transition: transform 0.5s var(--ease), border-color 0.3s;
}

.identity-card:hover {
    transform: perspective(900px) rotateY(0) rotateX(0);
    border-color: var(--border-hover);
}

.card-corners::before,
.card-corners::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--corner);
    pointer-events: none;
}

.card-corners::before {
    top: -1px;
    left: -1px;
    border-right: 0;
    border-bottom: 0;
    border-radius: 16px 0 0 0;
}

.card-corners::after {
    bottom: -1px;
    right: -1px;
    border-left: 0;
    border-top: 0;
    border-radius: 0 0 16px 0;
}

.id-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 1.6px;
    color: var(--text-muted);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4f9e83;
    box-shadow: 0 0 9px rgba(79, 158, 131, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.avatar-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    margin: 18px auto 12px;
    animation: float 6s ease-in-out infinite;
}

.avatar-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--border-hover);
    stroke-width: 1;
    stroke-dasharray: 3 7;
    opacity: 0.75;
    animation: spin 34s linear infinite;
}

.avatar-frame {
    position: relative;
    width: 118px;
    height: 118px;
    padding: 3px;
    background: linear-gradient(140deg, var(--cyan), var(--blue) 55%, var(--cyan-2));
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    background: var(--bg-mid);
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

.id-name {
    margin-bottom: 6px;
    font-size: 1.02rem;
    font-weight: 700;
    text-align: center;
}

.id-role {
    margin-bottom: 0;
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 2.4px;
    text-align: center;
    color: var(--cyan);
}

.id-divider {
    height: 1px;
    margin: 20px 0;
    background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

.id-facts {
    display: grid;
    gap: 12px;
    margin: 0;
}

.id-facts div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.id-facts dt {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.id-facts dd {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: right;
    color: var(--text);
}

.id-barcode {
    height: 20px;
    margin-top: 22px;
    opacity: 0.3;
    border-radius: 3px;
    background: repeating-linear-gradient(90deg, var(--corner) 0 1px, transparent 1px 4px, var(--corner) 4px 5px, transparent 5px 9px);
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 70px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stat {
    padding: 22px 26px;
    border-right: 1px solid var(--border);
}

.stat:last-child {
    border-right: 0;
}

.stat strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--cyan-2);
    text-shadow: 0 0 16px var(--halo-a);
}

.stat span {
    font-size: 0.67rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.section {
    position: relative;
    padding: 56px 0;
}

.section-head {
    max-width: 760px;
    margin-bottom: 24px;
}

.section-index {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--cyan);
}

.section-head h2 {
    margin: 12px 0 10px;
    font-size: clamp(1.8rem, 3.6vw, 2.9rem);
    font-weight: 800;
    line-height: 1.2;
}

.section-head p {
    max-width: 640px;
    margin-bottom: 0;
    color: var(--text-muted);
    line-height: 1.85;
}

.panel-label {
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 2.6px;
    color: var(--cyan);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
}

.about-text,
.timeline {
    padding: 34px;
}

.about-text h3 {
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.about-text p {
    margin-bottom: 14px;
    color: var(--text-muted);
    line-height: 1.9;
}

.about-methods {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.about-methods .panel-label {
    margin-bottom: 10px;
}

.about-methods p {
    margin-bottom: 0;
}

.method-tags {
    margin-top: 14px;
}

.tags span {
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--wash);
    font-size: 0.69rem;
    color: var(--text-soft);
}

.timeline-item {
    position: relative;
    padding: 0 0 30px 26px;
    margin-left: 5px;
    border-left: 1px solid var(--border);
}

.timeline-item:last-of-type {
    padding-bottom: 6px;
}

.timeline-dot {
    position: absolute;
    top: 4px;
    left: -5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 4px var(--bg-base), 0 0 12px var(--cyan);
}

.timeline-year {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    color: var(--cyan);
}

.timeline-item h3 {
    margin: 7px 0 5px;
    font-size: 1.03rem;
}

.timeline-item p {
    margin-bottom: 10px;
    font-size: 0.81rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.timeline-tag {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 1.6px;
    color: var(--text-muted);
}

.timeline-foot {
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.skills-stack {
    display: grid;
    gap: 34px;
}

.tier-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 14px;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tier-head:hover .tier-title,
.tier-head:focus-visible .tier-title {
    color: var(--cyan-2);
}

.tier-title {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--cyan);
    transition: color 0.2s;
}

.tier-sub {
    min-width: 0;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
}

.tier-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    flex-shrink: 0;
    color: var(--cyan);
    transition: transform 0.25s var(--ease);
}

.tier-head[aria-expanded="false"] .tier-chevron {
    transform: rotate(-90deg);
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.tier-grid[hidden] {
    display: none;
}

.skill-card {
    padding: 28px;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.2), var(--glow);
}

.skill-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--wash);
    color: var(--cyan);
}

.skill-icon svg {
    width: 22px;
    height: 22px;
}

.skill-card h4 {
    margin: 18px 0 8px;
    font-size: 0.96rem;
}

.skill-card p {
    margin-bottom: 0;
    font-size: 0.8rem;
    line-height: 1.75;
    color: var(--text-muted);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tags span {
    border-radius: 6px;
    font-size: 0.68rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px;
}

.project-card {
    grid-column: span 2;
    padding: 32px;
    overflow: hidden;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.projects-grid .project-featured {
    grid-column: 1 / -1;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.35;
    transition: opacity 0.3s;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.2), var(--glow);
}

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

.project-number {
    position: absolute;
    top: 18px;
    right: 28px;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--border-hover);
    opacity: 0.3;
    pointer-events: none;
}

.project-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-right: 50px;
}

.project-kind,
.project-status {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1.8px;
}

.project-kind {
    color: var(--cyan);
}

.project-status {
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
}

.project-card h3 {
    margin-bottom: 8px;
    font-size: 1.24rem;
}

.project-featured h3 {
    font-size: 1.5rem;
}

.project-meta {
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.project-breakdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0 0;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.project-breakdown div {
    display: grid;
    align-content: start;
    gap: 8px;
}

.project-breakdown dt {
    font-family: var(--font-display);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--cyan);
}

.project-breakdown dd {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.project-card > p:not(.project-note) {
    margin-bottom: 0;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.project-note {
    margin: 18px 0 0;
    padding-left: 14px;
    border-left: 2px solid var(--border-hover);
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-soft);
}

.project-note strong {
    color: var(--cyan-2);
}

.experience-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 24px;
    align-items: start;
}

.exp-panel {
    padding: 30px;
}

.cert-list,
.contact-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cert-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.cert-list li:last-child {
    border-bottom: 0;
}

.cert-mark {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}

.cert-list li div,
.contact-list li div,
.activity div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cert-list strong,
.activity strong {
    font-size: 0.85rem;
    font-weight: 600;
}

.cert-list li div span,
.activity div span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.activity {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.activity:last-child {
    border-bottom: 0;
}

.activity-icon,
.contact-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--wash);
    color: var(--cyan);
}

.activity-icon svg,
.contact-icon svg {
    width: 18px;
    height: 18px;
}

.contact-section {
    padding-bottom: 120px;
}

.contact-card {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 40px;
    padding: 40px;
}

.contact-details h3 {
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.contact-intro {
    max-width: 400px;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.contact-list li span {
    font-size: 0.65rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-list li a,
.contact-list li strong {
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    overflow-wrap: anywhere;
}

.contact-list li a:hover {
    color: var(--cyan-2);
}

.copy-btn {
    margin-left: auto;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--cyan);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.copy-btn:hover {
    background: var(--wash);
    border-color: var(--cyan);
}

.contact-form {
    display: grid;
    align-content: start;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

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

.field label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-soft);
}

.field input,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
    resize: vertical;
    min-height: 130px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--wash);
}

.form-hint {
    margin: 0;
    font-size: 0.68rem;
    text-align: center;
    color: var(--text-muted);
}

.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
}

.footer-brand p {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--cyan-2);
}

.footer-links svg {
    width: 14px;
    height: 14px;
}

.copyright {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-muted);
}

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    z-index: 200;
    padding: 12px 22px;
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    background: var(--panel-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glow);
    color: var(--text);
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 20px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

html.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s var(--ease) var(--delay, 0s), transform 0.65s var(--ease) var(--delay, 0s);
}

html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (min-width: 1021px) {
    .hero.section {
        display: grid;
        grid-template-rows: 1fr auto;
        min-height: 100svh;
        margin-bottom: 72px;
        padding-top: calc(var(--header-h) + 24px);
        padding-bottom: 24px;
    }

    .hero-grid {
        min-height: 0;
    }

    .stats-strip {
        margin-top: 0;
    }
}

@media (max-width: 1100px) {
    .clock,
    .pill-divider,
    .header-status {
        display: none;
    }
}

@media (max-width: 1020px) {
    .hero {
        padding-top: calc(var(--header-h) + 22px);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: 0;
    }

    .hero-copy {
        max-width: 760px;
    }

    .hero-visual {
        order: -1;
        min-height: 360px;
    }

    .identity-card {
        transform: none;
    }

    .identity-card:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: 1fr auto;
    }

    .nav {
        position: absolute;
        top: calc(100% + 12px);
        left: 50%;
        width: min(300px, calc(100vw - 32px));
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: var(--panel-strong);
        box-shadow: var(--shadow);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        opacity: 0;
        visibility: hidden;
        transform: translateX(-50%) translateY(-8px);
        transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    }

    .site-header.nav-open .nav {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .nav a {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .nav-toggle {
        display: grid;
    }

    .mobile-section {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 64px;
        padding: 4px 8px;
        border-radius: 999px;
        background: var(--wash);
        font-family: var(--font-display);
        font-size: 0.55rem;
        letter-spacing: 1.2px;
        color: var(--cyan);
    }

    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat:nth-child(2) {
        border-right: 0;
    }

    .stat:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    .about-grid,
    .experience-grid,
    .contact-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    :root {
        --header-h: 66px;
    }

    html,
    html.smooth-scroll {
        scroll-behavior: auto;
    }

    body {
        --panel: rgba(10, 17, 30, 0.94);
    }

    body[data-theme="light"] {
        --panel: rgba(255, 255, 255, 0.96);
    }

    .header-pill,
    .nav,
    .panel,
    .stats-strip,
    .toast {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .orbit {
        animation: none !important;
    }

    .status-dot {
        animation: pulse 2.4s ease-in-out infinite !important;
    }

    .caret {
        animation: blink 1s steps(2, start) infinite !important;
    }

    .typed {
        display: inline-block;
        min-width: 19ch;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .typed.is-changing {
        opacity: 0;
        transform: translateY(4px);
    }

    html.js .reveal {
        opacity: 0 !important;
        transform: translateY(18px) !important;
        transition: opacity 0.35s ease, transform 0.35s ease !important;
        transition-delay: 0s !important;
    }

    html.js .reveal.is-visible {
        opacity: 1 !important;
        transform: none !important;
    }

    .header-pill {
        padding: 6px;
    }

    .back-to-top {
        right: 14px;
        bottom: 14px;
        width: 40px;
        height: 40px;
    }

    .nav a {
        font-size: 0.62rem;
        padding: 8px 10px;
    }

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

    .section {
        padding: 8px 0;
    }

    .section-head {
        margin-bottom: 18px;
    }

    .contact-section {
        padding-bottom: 12px;
    }

    .hero {
        padding-top: calc(var(--header-h) + 2px);
        padding-bottom: 8px;
    }

    .hero-grid {
        gap: 20px;
    }

    .hero-visual {
        min-height: 0;
    }

    html.js .hero-visual.reveal {
        transform: none !important;
    }

    .identity-card {
        padding: 20px 22px 22px;
    }

    .orbit-one {
        width: 280px;
        height: 280px;
    }

    .orbit-two {
        width: 330px;
        height: 330px;
    }

    .stats-strip {
        margin-top: 18px;
    }

    .stat {
        padding: 18px;
    }

    .stat strong {
        font-size: 1.25rem;
    }

    .stat span {
        font-size: 0.6rem;
    }

    .about-grid,
    .skills-stack,
    .tier-grid,
    .projects-grid,
    .experience-grid {
        gap: 14px;
    }

    .about-text,
    .timeline,
    .exp-panel,
    .skill-card {
        padding: 20px;
    }

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

    .project-card {
        grid-column: 1 / -1;
        padding: 20px;
    }

    .project-breakdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-number {
        font-size: 1.8rem;
        right: 20px;
    }

    .contact-card {
        padding: 20px;
        gap: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

.visitor-prompt {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 130;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(300px, calc(100% - 32px));
    padding: 14px;
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    font-size: 0.78rem;
    color: var(--text-soft);
}

.visitor-prompt[hidden] {
    display: none;
}

.visitor-prompt form {
    display: flex;
    gap: 8px;
}

.visitor-prompt input {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-base);
    color: var(--text);
    font: inherit;
}

.visitor-prompt button {
    padding: 9px 12px;
    border: 1px solid var(--cyan);
    border-radius: 9px;
    background: var(--wash);
    color: var(--cyan);
    font: inherit;
    cursor: pointer;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 120;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    color: var(--cyan);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s, border-color 0.25s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 18px var(--halo-a);
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

.toast {
        width: calc(100% - 32px);
        text-align: center;
    }
}

@media (max-width: 420px) {
    .brand-text {
        font-size: 0.85rem;
        letter-spacing: 1.4px;
    }

    .theme-toggle,
    .nav-toggle {
        width: 34px;
        height: 34px;
    }

    .mobile-section {
        min-width: 56px;
        font-size: 0.5rem;
    }

    .tier-sub {
        display: none;
    }

    .btn {
        width: 100%;
    }

    .hero-meta {
        flex-direction: column;
        gap: 10px;
    }

    .identity-card {
        padding: 18px 20px 20px;
    }

    .avatar-wrap {
        width: 132px;
        height: 132px;
    }

    .avatar-frame {
        width: 104px;
        height: 104px;
    }

    .id-name {
        font-size: 0.92rem;
    }

    .id-facts div {
        flex-direction: column;
        gap: 2px;
    }

    .id-facts dd {
        text-align: left;
    }

    .project-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html,
    html.smooth-scroll {
        scroll-behavior: auto;
    }

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

    html.js .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
