@import url("https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap");

/*
	Modern overlay theme.
	Loaded after main.css. Two parts:
	1. Unscoped: scroll-reveal animations + theme toggle slider (active in both themes).
	2. html.theme-dark: the dark skin. Light theme = original Strata design.
	The toggle is injected by modern.js; the preference persists in localStorage
	and is applied early by theme-init.js to avoid flashing.
*/

:root {
	--bg: #070b16;
	--bg-raise: #0d1425;
	--card: rgba(255, 255, 255, 0.035);
	--card-border: rgba(255, 255, 255, 0.09);
	--text: #b6c0d2;
	--text-strong: #eef2f9;
	--muted: #8b96ab;
	--accent: #2dd4a7;
	--accent-2: #4aa8ff;
	--accent-3: #8b5cf6;
	--gradient: linear-gradient(120deg, #2dd4a7, #4aa8ff 55%, #8b5cf6);
	--font-head: "Sora", "Inter", -apple-system, sans-serif;
	--font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

/* ======================================================================== */
/* Shared: scroll-reveal (both themes, activated by modern.js)              */
/* ======================================================================== */

html {
	scroll-behavior: smooth;
}

html.has-reveal .rv {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
	transition-delay: var(--rv-delay, 0s);
	will-change: opacity, transform;
}

html.has-reveal .rv.rv-in {
	opacity: 1;
	transform: none;
}

/* ======================================================================== */
/* Shared: tech badges on project cards (both themes)                       */
/* ======================================================================== */

.work-item .tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
	padding: 0;
	margin: 0 0 0.55em 0;
}

.work-item .tags li {
	padding: 0.12em 0.7em;
	margin: 0;
	font-size: 0.62em;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 999px;
	border: 1px solid #dcdcdc;
	background: #f7f7f7;
	color: #8a8a8a;
	white-space: nowrap;
}

html.theme-dark .work-item .tags li {
	border-color: rgba(45, 212, 167, 0.35);
	background: rgba(45, 212, 167, 0.07);
	color: #7edcc0;
}

/* ======================================================================== */
/* Shared: vertical timeline (bio) — both themes                            */
/* ======================================================================== */

.timeline {
	position: relative;
	margin: 0 0 2.5em 0;
	padding: 0.5em 0 0 4.7em;
}

.timeline::before {
	content: '';
	position: absolute;
	left: 1.55em;
	top: 0.4em;
	bottom: 0.3em;
	width: 2px;
	border-radius: 999px;
	background: #e4e4e4;
}

.tl-item {
	position: relative;
	padding: 0 0 2.3em 0;
}

.tl-item:last-child {
	padding-bottom: 0.6em;
}

.tl-logo {
	position: absolute;
	top: 0;
	left: -4.7em;
	width: 3.25em;
	height: 3.25em;
	border-radius: 50%;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 0 0 2px #e4e4e4, 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tl-logo a {
	border: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.tl-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tl-period {
	display: inline-block;
	margin: 0 0 0.6em 0;
	padding: 0.1em 0.85em;
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 999px;
	background: rgba(73, 191, 157, 0.13);
	color: #2f9b7d;
}

.tl-item h3 {
	margin: 0 0 0.1em 0;
	font-size: 1.05em;
}

.tl-item h5 {
	margin: 0 0 0.9em 0;
}

.tl-item ul {
	margin-bottom: 0;
}

.tl-readmore {
	display: inline-block;
	margin-top: 0.75em;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #2f9b7d;
	border-bottom: 0;
}

.tl-readmore::after {
	content: ' \2192';
}

.tl-readmore:hover {
	color: #49bf9d;
}

html.theme-dark .tl-readmore {
	color: #7edcc0;
}

html.theme-dark .tl-readmore:hover {
	color: #2dd4a7;
}

html.theme-dark .timeline::before {
	background: linear-gradient(to bottom, rgba(45, 212, 167, 0.5), rgba(139, 92, 246, 0.3));
}

html.theme-dark .tl-logo {
	box-shadow: 0 0 0 2px rgba(45, 212, 167, 0.4), 0 4px 14px rgba(0, 0, 0, 0.5);
}

html.theme-dark .tl-period {
	background: rgba(45, 212, 167, 0.12);
	color: #7edcc0;
}

html.theme-dark .tl-item h5 {
	color: var(--muted);
}

/* ======================================================================== */
/* Shared: Font Awesome 6 glyphs for the v4 classes used by the template.   */
/* FA6 no longer ships :before content for bare v4 class names; the glyphs  */
/* themselves come from the "FontAwesome" family (v4-font-face + fonts).    */
/* ======================================================================== */

.fa-facebook:before { content: "\f09a"; }
.fa-instagram:before { content: "\f16d"; }
.fa-github:before { content: "\f09b"; }
.fa-linkedin:before { content: "\f0e1"; }
.fa-envelope-o:before { content: "\f003"; }
.fa-file-text-o:before { content: "\f0f6"; }
.fa-home:before { content: "\f015"; }
.fa-mobile:before { content: "\f10b"; }
.fa-download:before { content: "\f019"; }

/* X (Twitter): FA4 markup upgraded to the FA6 X logo */
.icon.fa-twitter:before {
	content: "\e61b";
	font-family: "Font Awesome 6 Brands" !important;
	font-weight: 400;
}

/* ======================================================================== */
/* Shared: theme toggle slider                                              */
/* ======================================================================== */

.theme-toggle {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 52px;
	height: 27px;
	padding: 0 6px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	background: #ffffff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	font-size: 11px;
	line-height: 1;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle:focus-visible {
	outline: 2px solid #49bf9d;
	outline-offset: 2px;
}

.theme-toggle .tt-icon {
	pointer-events: none;
}

.theme-toggle .tt-knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 19px;
	height: 19px;
	border-radius: 50%;
	background: linear-gradient(135deg, #ffd76a, #ff9d42);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
	pointer-events: none;
}

html.theme-dark .theme-toggle {
	background: #101729;
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

html.theme-dark .theme-toggle .tt-knob {
	transform: translateX(25px);
	background: linear-gradient(135deg, #2dd4a7, #8b5cf6);
}

/* ======================================================================== */
/* Dark theme                                                               */
/* ======================================================================== */

html.theme-dark {
	background: var(--bg);
}

html.theme-dark body {
	background: var(--bg);
}

/* Aurora glow layers */
html.theme-dark body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(55em 40em at 88% -5%, rgba(139, 92, 246, 0.13), transparent 60%),
		radial-gradient(50em 36em at -10% 100%, rgba(45, 212, 167, 0.10), transparent 60%),
		radial-gradient(40em 30em at 75% 75%, rgba(74, 168, 255, 0.07), transparent 60%);
}

html.theme-dark body,
html.theme-dark input,
html.theme-dark select,
html.theme-dark textarea {
	color: var(--text);
	font-family: var(--font-body);
}

html.theme-dark h1,
html.theme-dark h2,
html.theme-dark h3,
html.theme-dark h4,
html.theme-dark h5,
html.theme-dark h6 {
	color: var(--text-strong);
	font-family: var(--font-head);
	letter-spacing: -0.015em;
}

html.theme-dark strong,
html.theme-dark b {
	color: var(--text-strong);
	font-weight: 600;
}

html.theme-dark a {
	color: var(--accent);
	border-bottom-color: rgba(45, 212, 167, 0.3);
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

html.theme-dark a:hover {
	color: #6ce8c5 !important;
	border-bottom-color: transparent;
}

html.theme-dark ::selection {
	background: rgba(45, 212, 167, 0.35);
	color: #ffffff;
}

/* Scrollbar */
html.theme-dark ::-webkit-scrollbar { width: 10px; height: 10px; }
html.theme-dark ::-webkit-scrollbar-track { background: var(--bg); }
html.theme-dark ::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	border: 2px solid var(--bg);
}
html.theme-dark ::-webkit-scrollbar-thumb:hover { background: rgba(45, 212, 167, 0.5); }

/* Header / sidebar ------------------------------------------------------- */

/*
	Decorative glows as radial gradients that fade to transparent over a
	uniform background-color, in a box taller than the viewport: Strata's
	parallax (main.js) shifts background-position while scrolling, and this
	way the glows just drift — there is never a hard edge to expose.
*/
html.theme-dark #header {
	background-color: #090d18;
	background-image:
		radial-gradient(50em 34em at 85% 10%, rgba(139, 92, 246, 0.14), transparent 60%),
		radial-gradient(44em 30em at 8% 60%, rgba(45, 212, 167, 0.11), transparent 60%);
	background-position: top left, top left;
	background-repeat: no-repeat, no-repeat;
	background-size: 100% 160%, 100% 160%;
	border-right: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03), 8px 0 40px -20px rgba(0, 0, 0, 0.8);
	color: var(--muted);
}

html.theme-dark #header .image.avatar {
	padding: 4px;
	background: var(--gradient);
	border-radius: 100%;
	box-shadow: 0 8px 30px -6px rgba(45, 212, 167, 0.35), 0 4px 24px -4px rgba(139, 92, 246, 0.3);
}

html.theme-dark #header .image.avatar img {
	border: 3px solid #0a0f1e;
}

html.theme-dark #header h1 {
	color: var(--muted);
	font-family: var(--font-body);
	font-size: 1.05em;
	line-height: 1.8em;
	font-weight: 450;
}

html.theme-dark #header h1 strong {
	display: block;
	font-family: var(--font-head);
	font-size: 1.8em;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 0.35em 0;
	background: linear-gradient(115deg, #ffffff 30%, #9be8d2 60%, #9db8ff);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: #ffffff;
}

html.theme-dark #header h1 a {
	color: #d7dfec;
	border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
}

html.theme-dark #header h1 a:hover {
	color: var(--accent) !important;
}

/* Social icons as chips */
html.theme-dark #header .icons li {
	padding: 0 0.35em 0.45em 0;
}

html.theme-dark #header .icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.3em;
	height: 2.3em;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	color: rgba(255, 255, 255, 0.6);
	background: rgba(255, 255, 255, 0.04);
	transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

html.theme-dark #header .icons a:hover {
	transform: translateY(-3px);
	border-color: rgba(45, 212, 167, 0.6);
	background: rgba(45, 212, 167, 0.12);
	color: #6ce8c5 !important;
	box-shadow: 0 8px 20px -8px rgba(45, 212, 167, 0.5);
}

html.theme-dark #header .icons a .icon:before,
html.theme-dark #header .icons li .icon:before {
	font-size: 1.15em;
}

/* Main ------------------------------------------------------------------- */

html.theme-dark #main > section {
	border-top: 1px solid rgba(255, 255, 255, 0.07);
}

html.theme-dark #main > section:first-child {
	border-top: 0;
}

html.theme-dark #main h2 {
	position: relative;
	font-size: 1.65em;
	font-weight: 700;
	padding-bottom: 0.55em;
	margin-bottom: 1.1em;
}

html.theme-dark #main h2::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 2.6em;
	height: 4px;
	border-radius: 999px;
	background: var(--gradient);
}

html.theme-dark #main header.major h2 {
	font-size: 1.9em;
}

html.theme-dark #main p {
	color: var(--text);
}

html.theme-dark #main i,
html.theme-dark #main em {
	color: var(--muted);
}

/* Work / passion cards --------------------------------------------------- */

html.theme-dark .work-item {
	margin-bottom: 1.5em;
}

html.theme-dark .work-item .image.thumb {
	position: relative;
	display: block;
	margin: 0 0 1em 0;
	border: 1px solid var(--card-border);
	border-radius: 16px;
	overflow: hidden;
	background: var(--bg-raise);
	box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.7);
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

html.theme-dark .work-item:hover .image.thumb {
	transform: translateY(-6px);
	border-color: rgba(45, 212, 167, 0.5);
	box-shadow:
		0 22px 44px -18px rgba(0, 0, 0, 0.8),
		0 14px 40px -14px rgba(45, 212, 167, 0.28);
}

html.theme-dark .work-item .image.thumb img {
	border-radius: 0;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

html.theme-dark .work-item:hover .image.thumb img {
	transform: scale(1.06);
}

html.theme-dark .work-item h3 {
	font-size: 0.95em;
	font-weight: 600;
	color: var(--text-strong);
	margin-bottom: 0.3em;
	transition: color 0.25s ease;
}

html.theme-dark .work-item:hover h3 {
	color: var(--accent);
}

html.theme-dark .work-item p {
	color: var(--muted);
}

/* Hover overlay on any thumb image */
html.theme-dark .image:before {
	background: linear-gradient(160deg, rgba(45, 212, 167, 0.18), rgba(139, 92, 246, 0.18));
}

html.theme-dark .image.thumb:hover:before {
	background: linear-gradient(160deg, rgba(45, 212, 167, 0.22), rgba(139, 92, 246, 0.22));
	opacity: 1;
}

html.theme-dark .image.thumb:after {
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(7, 11, 22, 0.55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-family: var(--font-body);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.65em;
}

/* Content images on article pages */
html.theme-dark #main .image.fit.thumb,
html.theme-dark #main img.image {
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--card-border);
	box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.65);
}

html.theme-dark #main img.image.fit.thumb,
html.theme-dark #main img.thumb {
	border-radius: 14px;
	border: 1px solid var(--card-border);
	box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.65);
}

/* Tech logo strip: uniform white chips, readable on dark background */
html.theme-dark img[src*="thumbs/tech/"] {
	background: #f6f8fb;
	border-radius: 14px;
	width: 88px !important;
	height: 62px !important;
	object-fit: contain;
	margin: 0 auto !important;
	padding: 9px 12px !important;
	box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Buttons ---------------------------------------------------------------- */

html.theme-dark input[type="submit"],
html.theme-dark input[type="reset"],
html.theme-dark input[type="button"],
html.theme-dark .button {
	background: var(--gradient) !important;
	background-size: 150% 150% !important;
	color: #051018 !important;
	font-family: var(--font-body);
	font-weight: 700 !important;
	letter-spacing: 0.06em;
	border: 0 !important;
	border-radius: 999px;
	box-shadow: 0 10px 26px -10px rgba(45, 212, 167, 0.55);
	transition: transform 0.25s ease, box-shadow 0.25s ease, background-position 0.4s ease;
}

html.theme-dark input[type="submit"]:hover,
html.theme-dark input[type="reset"]:hover,
html.theme-dark input[type="button"]:hover,
html.theme-dark .button:hover {
	transform: translateY(-2px);
	background-position: 90% 50% !important;
	box-shadow: 0 16px 34px -12px rgba(74, 168, 255, 0.55);
}

html.theme-dark input[type="submit"]:active,
html.theme-dark .button:active {
	transform: translateY(0);
}

/* Forms ------------------------------------------------------------------ */

html.theme-dark input[type="text"],
html.theme-dark input[type="password"],
html.theme-dark input[type="email"],
html.theme-dark input[type="tel"],
html.theme-dark select,
html.theme-dark textarea {
	background: rgba(255, 255, 255, 0.045);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	color: var(--text-strong);
	transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

html.theme-dark input[type="text"]:focus,
html.theme-dark input[type="password"]:focus,
html.theme-dark input[type="email"]:focus,
html.theme-dark input[type="tel"]:focus,
html.theme-dark select:focus,
html.theme-dark textarea:focus {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(45, 212, 167, 0.65);
	box-shadow: 0 0 0 3px rgba(45, 212, 167, 0.18);
}

html.theme-dark input::placeholder,
html.theme-dark textarea::placeholder {
	color: var(--muted) !important;
	opacity: 1;
}

/* Labeled icons (contacts) ----------------------------------------------- */

html.theme-dark ul.labeled-icons h3.icon:before {
	color: var(--accent);
}

html.theme-dark ul.labeled-icons li {
	color: var(--muted);
}

html.theme-dark ul.labeled-icons li a {
	color: var(--text);
	border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* Lists ------------------------------------------------------------------ */

html.theme-dark ul.alt li {
	border-top-color: rgba(255, 255, 255, 0.08);
}

/* Tables ----------------------------------------------------------------- */

html.theme-dark table tbody tr {
	border-color: rgba(255, 255, 255, 0.08);
}

html.theme-dark table tbody tr:nth-child(2n + 1) {
	background: rgba(255, 255, 255, 0.03);
}

html.theme-dark table thead {
	border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* Poptrox lightbox ------------------------------------------------------- */

html.theme-dark .poptrox-popup {
	background: #0d1424;
	border-radius: 14px;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

html.theme-dark .poptrox-popup .caption {
	background: #0d1424;
	color: var(--text);
	font-family: var(--font-body);
}

html.theme-dark .poptrox-popup .closer,
html.theme-dark .poptrox-popup .loader {
	color: rgba(255, 255, 255, 0.7);
}

/* Accessibility ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
	}
	html.has-reveal .rv {
		opacity: 1;
		transform: none;
	}
}
