/* ============================================================
   Kerim Berkay Buçan — Portfolio · CYBER / NEURAL 3D
   Cyberpunk HUD · WebGL · Neon
   ============================================================ */

:root {
	--bg: #04050c;
	--bg-2: #070a16;
	--panel: rgba(12, 18, 38, 0.55);
	--panel-solid: #0a0f22;
	--fg: #eaf0ff;
	--muted: #9aa8d6;
	--muted-2: #5f6b96;
	--border: rgba(120, 160, 255, 0.14);
	--border-strong: rgba(120, 200, 255, 0.32);

	--cyan: #22e0ff;
	--blue: #4c8dff;
	--violet: #9d6bff;
	--magenta: #ff57d8;
	--cyan-glow: rgba(34, 224, 255, 0.55);
	--violet-glow: rgba(157, 107, 255, 0.5);
	--magenta-glow: rgba(255, 87, 216, 0.45);

	--font-body: "Inter", system-ui, sans-serif;
	--font-display: "Orbitron", "Inter", sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;

	--container: 1200px;
	--radius: 4px;
	--ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--fg);
	line-height: 1.65;
	overflow-x: hidden;
	position: relative;
	min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::selection { background: var(--cyan); color: #04050c; }

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: 26px;
	position: relative;
	z-index: 2;
}

/* ---------- WebGL canvas + overlays ---------- */
#webgl {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	display: block;
	pointer-events: none;
}

.overlay-scanlines {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: repeating-linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 0px,
		rgba(0, 0, 0, 0) 2px,
		rgba(0, 0, 0, 0.16) 3px,
		rgba(0, 0, 0, 0) 4px
	);
	mix-blend-mode: multiply;
	opacity: 0.5;
}

.overlay-vignette {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 40%, rgba(4, 5, 12, 0.75) 100%);
}

.grid-floor {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	height: 42vh;
	z-index: 0;
	pointer-events: none;
	background-image:
		linear-gradient(to right, rgba(76, 141, 255, 0.14) 1px, transparent 1px),
		linear-gradient(to top, rgba(76, 141, 255, 0.14) 1px, transparent 1px);
	background-size: 46px 46px;
	transform: perspective(340px) rotateX(62deg);
	transform-origin: bottom;
	mask-image: linear-gradient(to top, #000 0%, transparent 90%);
	opacity: 0.5;
}

/* Layer content above webgl */
#content, .header, .footer { position: relative; z-index: 2; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
	position: fixed;
	top: 0; left: 0;
	height: 2px;
	width: 0%;
	z-index: 200;
	background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
	box-shadow: 0 0 12px var(--cyan-glow);
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
	position: fixed;
	top: 0; left: 0;
	border-radius: 50%;
	pointer-events: none;
	z-index: 999;
	transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.cursor-ring {
	width: 32px; height: 32px;
	border: 1px solid var(--border-strong);
	transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.cursor-ring.is-hover {
	width: 54px; height: 54px;
	border-color: var(--cyan);
	background: rgba(34, 224, 255, 0.06);
}
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Boot preloader ---------- */
.boot {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: var(--bg);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__inner { width: min(90vw, 460px); }
.boot__log {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	line-height: 1.7;
	color: var(--cyan);
	white-space: pre-wrap;
	min-height: 150px;
	text-shadow: 0 0 8px var(--cyan-glow);
}
.boot__log .ok { color: var(--muted); }
.boot__bar {
	margin-top: 18px;
	height: 3px;
	background: rgba(120, 160, 255, 0.15);
	overflow: hidden;
}
.boot__bar span {
	display: block; height: 100%; width: 0%;
	background: linear-gradient(90deg, var(--cyan), var(--violet));
	box-shadow: 0 0 12px var(--cyan-glow);
}
.boot__pct {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--muted);
	margin-top: 8px;
	text-align: right;
}

/* ---------- Header / Nav ---------- */
.header {
	position: fixed;
	top: 0; left: 0;
	width: 100%;
	z-index: 100;
	transition: background 0.4s, border-color 0.4s;
	border-bottom: 1px solid transparent;
}
.header.is-scrolled {
	background: rgba(4, 6, 14, 0.72);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
}

/* Notice / disclaimer bar */
.notice {
	width: 100%;
	background: rgba(6, 10, 22, 0.88);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
	position: relative;
	max-height: 140px;
	overflow: hidden;
	transition: max-height 0.45s var(--ease), opacity 0.35s, border-color 0.35s;
}
/* Collapse the disclaimer once the user starts scrolling; it stays visible at the top */
.header.is-scrolled .notice {
	max-height: 0;
	opacity: 0;
	border-bottom-color: transparent;
}
.notice::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 2px;
	background: linear-gradient(180deg, var(--cyan), var(--violet));
	box-shadow: 0 0 10px var(--cyan-glow);
}
.notice__inner {
	max-width: var(--container);
	margin-inline: auto;
	padding: 8px 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: center;
}
.notice__icon { color: var(--cyan); flex-shrink: 0; filter: drop-shadow(0 0 5px var(--cyan-glow)); }
.notice p {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	line-height: 1.5;
	letter-spacing: 0.01em;
	color: var(--muted);
}

.nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 15px; transition: padding 0.4s var(--ease); }
.header.is-scrolled .nav { padding-block: 9px; }
.nav__logo-mark {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 1.2rem;
	letter-spacing: 0.14em;
	color: var(--fg);
	text-shadow: 0 0 14px var(--cyan-glow);
	transition: color 0.3s;
}
.nav__logo:hover .nav__logo-mark { color: var(--cyan); }

.nav__list { display: flex; gap: 4px; align-items: center; }
.nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--muted);
	padding: 8px 15px;
	transition: color 0.3s;
}
.nav__link i { font-size: 0.62rem; color: var(--muted-2); font-style: normal; }
.nav__link::after {
	content: "";
	position: absolute;
	left: 15px; right: 15px; bottom: 3px;
	height: 1px;
	background: var(--cyan);
	box-shadow: 0 0 8px var(--cyan-glow);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--fg); }
.nav__link:hover i, .nav__link.is-active i { color: var(--cyan); }
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cta {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--cyan);
	padding: 9px 18px;
	border: 1px solid var(--border-strong);
	background: rgba(34, 224, 255, 0.05);
	clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
	transition: background 0.3s, box-shadow 0.3s, color 0.3s;
	will-change: transform;
}
.nav__cta-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: pulse 1.8s infinite; }
.nav__cta:hover { background: rgba(34, 224, 255, 0.14); box-shadow: 0 0 22px -4px var(--cyan-glow); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan-glow); transition: transform 0.35s var(--ease), opacity 0.3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Language switcher */
.lang {
	display: flex;
	align-items: center;
	gap: 5px;
	font-family: var(--font-mono);
	font-size: 0.76rem;
	letter-spacing: 0.06em;
	padding: 5px 10px;
	border: 1px solid var(--border);
	background: rgba(120, 160, 255, 0.03);
	clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.lang__btn {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--muted-2);
	font-family: inherit;
	font-size: inherit;
	letter-spacing: inherit;
	padding: 2px 2px;
	transition: color 0.25s, text-shadow 0.25s;
}
.lang__btn:hover { color: var(--fg); }
.lang__btn.is-active { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }
.lang__sep { color: var(--muted-2); opacity: 0.5; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 0.9rem;
	padding: 15px 28px;
	cursor: pointer;
	border: 1px solid transparent;
	clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
	transition: box-shadow 0.35s, background 0.35s, border-color 0.35s, color 0.3s;
	will-change: transform;
	position: relative;
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn--primary {
	background: linear-gradient(110deg, var(--cyan), var(--blue));
	color: #04050c;
	box-shadow: 0 0 30px -6px var(--cyan-glow);
	font-weight: 700;
}
.btn--primary:hover { box-shadow: 0 0 44px -2px var(--cyan-glow); }
.btn--primary:hover svg { transform: translateX(4px); }
.btn--ghost { background: rgba(120, 160, 255, 0.04); border-color: var(--border-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 26px -8px var(--cyan-glow); }

/* ---------- HERO ---------- */
.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	padding: 140px 0 90px;
}
.hero__hud { position: absolute; inset: 90px 26px 60px; pointer-events: none; z-index: 1; }
.hud-corner { position: absolute; width: 26px; height: 26px; border: 1px solid var(--border-strong); }
.hud-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.hero__inner { max-width: 760px; }
.hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	color: var(--cyan);
	margin-bottom: 26px;
	padding: 7px 16px;
	border: 1px solid var(--border);
	background: rgba(34, 224, 255, 0.04);
	text-shadow: 0 0 8px var(--cyan-glow);
}
.hero__eyebrow .ping { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1.6s infinite; }

.hero__title {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: clamp(1.95rem, 8vw, 6.4rem);
	line-height: 0.98;
	letter-spacing: -0.01em;
	margin-bottom: 24px;
	text-transform: uppercase;
}
.hero__title .line { display: block; white-space: nowrap; }
.hero__title .grad {
	background: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--magenta));
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
	filter: drop-shadow(0 0 26px var(--violet-glow));
}
.hero__title .char {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.5em);
	transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
	transition-delay: calc(var(--ci, 0) * 0.028s + 0.15s);
}
.hero__title.is-in .char { opacity: 1; transform: none; }
.no-js .hero__title .char { opacity: 1; transform: none; }

.hero__role {
	font-family: var(--font-mono);
	font-size: clamp(1.05rem, 3vw, 1.6rem);
	color: var(--fg);
	min-height: 1.5em;
	margin-bottom: 8px;
	display: flex;
	align-items: baseline;
	gap: 10px;
}
.hero__role-label { color: var(--cyan); }
.hero__role .typed { color: var(--cyan); text-shadow: 0 0 14px var(--cyan-glow); }
.hero__role .caret { color: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__location { font-size: clamp(1rem, 2.4vw, 1.25rem); color: var(--muted); margin-bottom: 36px; }

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero__socials { display: flex; gap: 10px; }
.hero__socials a {
	width: 46px; height: 46px;
	display: grid; place-items: center;
	border: 1px solid var(--border);
	color: var(--muted);
	background: rgba(120, 160, 255, 0.03);
	transition: color 0.3s, border-color 0.3s, box-shadow 0.3s, background 0.3s;
	will-change: transform;
}
.hero__socials a:hover { color: var(--cyan); border-color: var(--cyan); background: rgba(34, 224, 255, 0.08); box-shadow: 0 0 20px -6px var(--cyan-glow); }

.hero__scroll {
	position: absolute;
	bottom: 30px; left: 50%;
	transform: translateX(-50%);
	display: flex; flex-direction: column; align-items: center; gap: 10px;
	color: var(--muted-2);
	z-index: 2;
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(to bottom, transparent, var(--cyan)); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: scrollDown 1.8s var(--ease) infinite; }
@keyframes scrollDown { 0% { top: -50%; } 100% { top: 100%; } }
.hero__scroll-text { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.28em; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; position: relative; }
.section__head { margin-bottom: 60px; }
.eyebrow {
	display: inline-flex; align-items: center; gap: 12px;
	font-family: var(--font-mono);
	font-size: 0.8rem; font-weight: 500;
	text-transform: uppercase; letter-spacing: 0.16em;
	color: var(--cyan);
	margin-bottom: 16px;
}
.eyebrow__idx { color: var(--magenta); border: 1px solid var(--border); padding: 2px 8px; text-shadow: 0 0 8px var(--magenta-glow); }
.section__title {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(2rem, 5.5vw, 3.6rem);
	letter-spacing: 0.01em;
	line-height: 1.05;
	text-transform: uppercase;
}
.dot-neon { color: var(--cyan); text-shadow: 0 0 16px var(--cyan-glow); }

/* ---------- HUD card base ---------- */
.hud-card {
	position: relative;
	background:
		linear-gradient(158deg, rgba(20, 30, 62, 0.5), rgba(8, 12, 26, 0.28)),
		repeating-linear-gradient(115deg, rgba(120, 160, 255, 0.028) 0 2px, transparent 2px 9px);
	border: 1px solid var(--border);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
/* Left data rail (glowing spine) */
.hud-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 18px;
	bottom: 18px;
	width: 2px;
	background: linear-gradient(180deg, var(--cyan), var(--violet));
	box-shadow: 0 0 12px var(--cyan-glow);
	opacity: 0.9;
	transition: box-shadow 0.4s, opacity 0.4s;
}
/* Four corner brackets — HUD frame */
.hud-card::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	--b: 15px;
	--t: 1px;
	--c: var(--border-strong);
	background:
		linear-gradient(var(--c), var(--c)) top left / var(--b) var(--t) no-repeat,
		linear-gradient(var(--c), var(--c)) top left / var(--t) var(--b) no-repeat,
		linear-gradient(var(--c), var(--c)) top right / var(--b) var(--t) no-repeat,
		linear-gradient(var(--c), var(--c)) top right / var(--t) var(--b) no-repeat,
		linear-gradient(var(--c), var(--c)) bottom left / var(--b) var(--t) no-repeat,
		linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--b) no-repeat,
		linear-gradient(var(--c), var(--c)) bottom right / var(--b) var(--t) no-repeat,
		linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--b) no-repeat;
}
.hud-card:hover { border-color: var(--border-strong); box-shadow: 0 0 44px -14px var(--cyan-glow); }
.hud-card:hover::before { box-shadow: 0 0 18px var(--cyan-glow); opacity: 1; }
.hud-card:hover::after { --c: var(--cyan); }

/* Spotlight (mouse glow) */
.spotlight { position: relative; overflow: hidden; }
.spotlight::after {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 224, 255, 0.14), transparent 60%);
	opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.spotlight:hover::after { opacity: 1; }

/* Tilt: JS sets --rx/--ry */
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.3s var(--ease); transform-style: preserve-3d; will-change: transform; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px; align-items: center; margin-bottom: 60px; }
.portrait {
	position: relative;
	border: 1px solid var(--border-strong);
	clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
	box-shadow: 0 0 50px -18px var(--violet-glow);
	max-width: 360px;
}
.portrait img { width: 100%; filter: grayscale(0.25) contrast(1.05); mix-blend-mode: luminosity; opacity: 0.92; }
.portrait::before {
	content: ""; position: absolute; inset: 0; z-index: 2;
	background: linear-gradient(160deg, rgba(34, 224, 255, 0.16), transparent 40%, rgba(157, 107, 255, 0.22));
	pointer-events: none;
}
.portrait__scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); opacity: 0.7; animation: portraitScan 3.6s linear infinite; }
@keyframes portraitScan { 0% { top: 0; } 100% { top: 100%; } }
.portrait__tag { position: absolute; bottom: 10px; left: 12px; z-index: 3; font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }

.about__headline {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(1.35rem, 2.6vw, 1.9rem);
	line-height: 1.4;
	margin-bottom: 22px;
	letter-spacing: 0.005em;
}
.grad { background: linear-gradient(100deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.muted { color: var(--muted); font-family: var(--font-body); font-weight: 400; }
.about__body { font-size: 1.02rem; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
	position: relative;
	padding: 28px 22px 30px;
	border: 1px solid var(--border);
	background: var(--panel);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
	overflow: hidden;
}
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.3rem, 5vw, 3.2rem); color: var(--cyan); line-height: 1; display: block; margin-bottom: 12px; text-shadow: 0 0 22px var(--cyan-glow); }
.stat__num .plus, .stat__num .ord { color: var(--magenta); text-shadow: 0 0 16px var(--magenta-glow); }
.stat__num .ord { font-size: 0.5em; vertical-align: super; }
.stat__label { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.stat__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--cyan), transparent); opacity: 0.6; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 900px; margin-inline: auto; padding-left: 38px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, var(--cyan), var(--violet), transparent); box-shadow: 0 0 10px var(--cyan-glow); }
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item__node { position: absolute; left: -38px; top: 26px; width: 15px; height: 15px; background: var(--bg); border: 1px solid var(--cyan); transform: rotate(45deg); box-shadow: 0 0 0 4px rgba(34, 224, 255, 0.1), 0 0 14px var(--cyan-glow); }
.tl-item__node::after { content: ""; position: absolute; inset: 3px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.tl-item__card { padding: 26px 30px; }
.tl-item__top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.tl-item__role { font-family: var(--font-display); font-weight: 600; font-size: 1.16rem; letter-spacing: 0.01em; }
.tl-item__date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan); border: 1px solid var(--border); padding: 4px 11px; white-space: nowrap; }
.tl-item__org { color: var(--muted); font-size: 0.97rem; margin-top: 5px; font-family: var(--font-mono); }
.tl-block { margin-top: 18px; }
.tl-block__title { font-weight: 600; color: var(--fg); font-size: 0.96rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.tl-block__title::before { content: "▹"; color: var(--cyan); }
.tl-item ul { padding-left: 0; }
.tl-item li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.94rem; line-height: 1.7; margin-bottom: 6px; }
.tl-item li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 6px; height: 6px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan-glow); transform: rotate(45deg); }
.tl-item__list { margin-top: 16px; }

/* ---------- Education ---------- */
.edu { display: grid; gap: 16px; max-width: 900px; margin-inline: auto; }
.edu__item { padding: 26px 30px; }
.edu__top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.edu__role { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; }
.tag-accent { color: var(--cyan); font-size: 0.88rem; font-weight: 500; font-family: var(--font-mono); }
.edu__sub { color: var(--muted); font-size: 0.88rem; font-weight: 400; font-family: var(--font-mono); }
.edu__date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted-2); white-space: nowrap; }
.edu__org { color: var(--muted-2); font-size: 0.9rem; margin-bottom: 10px; font-family: var(--font-mono); }
.edu__desc { color: var(--muted); font-size: 0.96rem; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.skills__card { padding: 34px; }
.skills__cat { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.skills__cat::before { content: ""; width: 9px; height: 9px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transform: rotate(45deg); }
.skills__cat:not(:first-child) { margin-top: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	color: var(--muted);
	padding: 7px 14px;
	border: 1px solid var(--border);
	background: rgba(120, 160, 255, 0.03);
	transition: color 0.25s, border-color 0.25s, box-shadow 0.25s, background 0.25s;
	cursor: default;
	will-change: transform;
}
.chip:hover { color: var(--cyan); border-color: var(--cyan); background: rgba(34, 224, 255, 0.08); box-shadow: 0 0 16px -4px var(--cyan-glow); }

/* ---------- Publications ---------- */
.pubs { display: grid; gap: 16px; max-width: 940px; margin-inline: auto; }
.pub { position: relative; padding: 28px 32px 28px 84px; display: flex; flex-direction: column; gap: 14px; }
.pub__idx { position: absolute; left: 30px; top: 30px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--magenta); text-shadow: 0 0 10px var(--magenta-glow); }
.pub__title { font-family: var(--font-display); font-weight: 500; font-size: 1.08rem; line-height: 1.5; transition: color 0.3s; }
.pub:hover .pub__title { color: var(--cyan); }
.pub__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 10px; color: var(--muted-2); font-size: 0.88rem; font-family: var(--font-mono); }
.pub__meta em { opacity: 0.6; font-style: normal; }
.pub__link { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan); font-weight: 500; font-size: 0.88rem; font-family: var(--font-mono); }
.pub__link svg { transition: transform 0.3s var(--ease); }
.pub:hover .pub__link svg { transform: translate(3px, -3px); }

/* ---------- Footer ---------- */
.footer { padding: 70px 0 46px; border-top: 1px solid var(--border); margin-top: 40px; background: rgba(4, 6, 14, 0.4); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 22px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.footer__logo { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; letter-spacing: 0.12em; color: var(--fg); text-shadow: 0 0 14px var(--cyan-glow); }
.footer__socials { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__socials a { color: var(--muted); font-size: 0.9rem; font-weight: 500; font-family: var(--font-mono); position: relative; transition: color 0.3s; }
.footer__socials a::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan-glow); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.footer__socials a:hover { color: var(--cyan); }
.footer__socials a:hover::after { transform: scaleX(1); }
.footer__copy { text-align: center; color: var(--muted-2); font-size: 0.86rem; margin-top: 26px; font-family: var(--font-mono); }
.footer__copy a { color: var(--cyan); font-weight: 500; }

/* ---------- Back to top ---------- */
.back-to-top {
	position: fixed; right: 26px; bottom: 26px;
	width: 48px; height: 48px;
	display: grid; place-items: center;
	background: linear-gradient(120deg, var(--cyan), var(--blue));
	color: #04050c; border: none; cursor: pointer;
	clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
	opacity: 0; visibility: hidden; transform: translateY(16px);
	transition: opacity 0.4s, visibility 0.4s, transform 0.4s var(--ease), box-shadow 0.3s;
	z-index: 90;
	box-shadow: 0 0 26px -8px var(--cyan-glow);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { box-shadow: 0 0 40px -4px var(--cyan-glow); }

/* ---------- Glitch text ---------- */
[data-glitch] { position: relative; }
.nav__logo-mark[data-glitch]:hover::before,
.nav__logo-mark[data-glitch]:hover::after,
.footer__logo[data-glitch]:hover::before,
.footer__logo[data-glitch]:hover::after {
	content: attr(data-glitch);
	position: absolute; left: 0; top: 0;
	width: 100%;
}
.nav__logo-mark[data-glitch]:hover::before, .footer__logo[data-glitch]:hover::before { color: var(--magenta); animation: glitchX 0.4s steps(2) infinite; }
.nav__logo-mark[data-glitch]:hover::after, .footer__logo[data-glitch]:hover::after { color: var(--cyan); animation: glitchX 0.3s steps(2) infinite reverse; }
@keyframes glitchX { 0% { transform: translate(0); } 25% { transform: translate(-2px, 1px); } 50% { transform: translate(2px, -1px); } 100% { transform: translate(0); } }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); transition-delay: var(--reveal-delay, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
	.about__grid { grid-template-columns: 1fr; gap: 32px; }
	.portrait { max-width: 300px; margin-inline: auto; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.skills { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
	.nav__list {
		position: fixed;
		top: 0; right: 0; bottom: 0; left: auto;
		height: 100vh; height: 100dvh;
		width: min(80vw, 330px);
		flex-direction: column; justify-content: center; gap: 6px;
		padding: 40px;
		background: rgba(6, 9, 20, 0.97);
		backdrop-filter: blur(20px);
		-webkit-backdrop-filter: blur(20px);
		border-left: 1px solid var(--border);
		transform: translateX(100%);
		transition: transform 0.45s var(--ease);
	}
	.nav__list.is-open { transform: translateX(0); }
	.nav__link { font-size: 1rem; width: 100%; }
	.nav__cta { display: none; }
	.nav__toggle { display: flex; z-index: 101; }
	/* Perfectly center the language switch between logo and menu button on mobile */
	.lang { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
	.hero__socials { justify-content: center; }
	.section { padding: 76px 0; }
	.timeline { padding-left: 28px; }
	.tl-item__node { left: -28px; }
	.tl-item__card, .edu__item, .skills__card { padding: 22px; }
	.pub { padding: 22px 22px 22px 22px; }
	.pub__idx { position: static; display: block; margin-bottom: 4px; }
	.footer__inner { flex-direction: column; text-align: center; }
	.grid-floor { height: 30vh; }
}
@media (max-width: 430px) {
	.stats { grid-template-columns: 1fr; }
	.hero__actions { flex-direction: column; }
	.hero__actions .btn { justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
	[data-reveal], .hero__title .char { opacity: 1 !important; transform: none !important; }
	.cursor-dot, .cursor-ring { display: none; }
	#webgl { display: none; }
	.grid-floor { opacity: 0.25; }
}
