/* ===========================================================
   sainyam.me — modern professional stylesheet
   Overrides the Nix theme. Loaded after nix.css.
   =========================================================== */

:root {
	--ink: #0f172a;
	--ink-soft: #334155;
	--muted: #64748b;
	--line: #e2e8f0;
	--bg: #ffffff;
	--bg-alt: #f7f8fa;
	--accent: #10b981;
	--accent-strong: #059669;
	--hero-bg: #0b1220;
	--hero-bg-2: #0f172a;
	--hero-grid: rgba(255, 255, 255, .035);
	--nav-bg: rgba(255, 255, 255, .82);
	--radius: 14px;
	--shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -16px rgba(15, 23, 42, .18);
	--maxw: 980px;
	--mono: 'JetBrains Mono', 'Inconsolata', ui-monospace, monospace;
	--sans: 'Inter', 'Open Sans', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ink: #e6edf5;
		--ink-soft: #b8c3d4;
		--muted: #7d8aa0;
		--line: #243149;
		--bg: #0d1424;
		--bg-alt: #111a2c;
		--accent: #34d399;
		--accent-strong: #10b981;
		--hero-bg: #060b16;
		--hero-bg-2: #0a1322;
		--hero-grid: rgba(255, 255, 255, .04);
		--nav-bg: rgba(13, 20, 36, .84);
		--shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 32px -16px rgba(0, 0, 0, .55);
	}
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--sans);
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
.site-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--nav-bg);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--line);
}
.site-nav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}
.site-nav__brand { text-decoration: none; }
.site-nav__prompt {
	font-family: var(--mono);
	font-weight: 600;
	font-size: .98rem;
	color: var(--ink);
}
.cursor {
	color: var(--accent);
	animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.site-nav__links { display: flex; align-items: center; gap: 4px; }
.site-nav__links a {
	font-size: .92rem;
	font-weight: 500;
	color: var(--ink-soft);
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 8px;
	transition: color .15s, background .15s;
}
.site-nav__links a:hover { color: var(--ink); background: var(--bg-alt); }
.site-nav__cta {
	color: var(--accent-strong) !important;
	border: 1px solid var(--accent) !important;
	padding: 7px 14px !important;
}
.site-nav__cta:hover { background: var(--accent) !important; color: #fff !important; }

.site-nav__toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: 8px;
	width: 40px; height: 40px;
	color: var(--ink);
	font-size: 1.05rem;
	cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	background: radial-gradient(120% 120% at 80% -10%, #16233d 0%, var(--hero-bg) 55%, var(--hero-bg-2) 100%);
	color: #e2e8f0;
	padding: 84px 0 72px;
	overflow: hidden;
}
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(80% 70% at 50% 30%, #000 0%, transparent 75%);
	pointer-events: none;
}
.hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: 1.4fr .9fr;
	align-items: center;
	gap: 56px;
}
.hero__text { min-width: 0; }
.eyebrow {
	font-family: var(--mono);
	font-size: .82rem;
	color: var(--accent);
	letter-spacing: .02em;
	margin: 0 0 14px;
	overflow-wrap: anywhere;
}
.hero__name {
	font-size: clamp(2.4rem, 5vw, 3.5rem);
	font-weight: 800;
	letter-spacing: -.02em;
	margin: 0 0 10px;
	color: #fff;
	line-height: 1.08;
}
.hero__title {
	font-size: clamp(1.05rem, 2.2vw, 1.35rem);
	font-weight: 500;
	color: #cbd5e1;
	margin: 0 0 18px;
}
.hero__bio {
	font-size: 1.05rem;
	color: #94a3b8;
	max-width: 54ch;
	margin: 0 0 26px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero__social { list-style: none; display: flex; gap: 14px; margin: 0; padding: 0; }
.hero__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border-radius: 10px;
	color: #cbd5e1;
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(255, 255, 255, .08);
	font-size: 1rem;
	transition: all .15s;
}
.hero__social a:hover { color: #fff; background: rgba(16, 185, 129, .15); border-color: var(--accent); transform: translateY(-1px); }

.hero__photo { display: flex; justify-content: center; }
.hero__photo img {
	width: 260px;
	height: 260px;
	object-fit: cover;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, .14);
	box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .65);
}

.hero__scroll {
	text-align: center;
	margin-top: 56px;
	color: #64748b;
	animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--sans);
	font-size: .95rem;
	font-weight: 600;
	padding: 11px 20px;
	border-radius: 10px;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all .15s;
}
.btn i { font-size: .9em; }
.btn-primary { background: var(--accent); color: #06281f; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-strong); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(16, 185, 129, .6); }
.btn-ghost { background: rgba(255, 255, 255, .04); color: #e2e8f0; border-color: rgba(255, 255, 255, .14); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); color: #fff; transform: translateY(-1px); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: 40px; }
.section__kicker {
	display: block;
	font-family: var(--mono);
	font-size: .8rem;
	color: var(--accent-strong);
	letter-spacing: .04em;
	margin-bottom: 8px;
}
.section__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	letter-spacing: -.015em;
	margin: 0;
	color: var(--ink);
}

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about__lead {
	font-size: 1.18rem;
	font-weight: 500;
	color: var(--ink);
	margin: 0;
	line-height: 1.55;
}
.about__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
	box-shadow: var(--shadow);
}
.stat__num { display: block; font-family: var(--mono); font-weight: 600; font-size: 1.1rem; color: var(--accent-strong); }
.stat__label { display: block; font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 6px;
	bottom: 6px;
	width: 2px;
	background: var(--line);
}
.timeline__item { position: relative; padding-left: 36px; padding-bottom: 34px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
	position: absolute;
	left: 1px;
	top: 6px;
	width: 14px; height: 14px;
	border-radius: 50%;
	background: var(--bg);
	border: 3px solid var(--accent);
	box-shadow: 0 0 0 4px var(--bg-alt);
}
.timeline__body {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 22px 24px;
	box-shadow: var(--shadow);
	transition: transform .15s, box-shadow .15s;
}
.timeline__body:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 20px 40px -22px rgba(15,23,42,.25); }
.timeline__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.timeline__role { font-size: 1.12rem; font-weight: 700; margin: 0; color: var(--ink); }
.timeline__acting, .timeline__sub { font-weight: 500; color: var(--muted); font-size: .82rem; }
.timeline__date { font-family: var(--mono); font-size: .8rem; color: var(--accent-strong); white-space: nowrap; }
.timeline__org { font-size: .96rem; font-weight: 600; color: var(--ink-soft); margin: 4px 0 12px; }
.timeline__bullets { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: .94rem; }
.timeline__bullets li { margin-bottom: 6px; }
.timeline__bullets strong { color: var(--ink); font-weight: 600; }

/* ---------- Expertise ---------- */
.expertise__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.expertise-card {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow);
}
.expertise-card__index {
	display: block;
	font-family: var(--mono);
	font-size: .78rem;
	font-weight: 600;
	color: var(--accent-strong);
	margin-bottom: 28px;
}
.expertise-card h3 { font-size: 1.06rem; line-height: 1.35; margin: 0 0 10px; }
.expertise-card p { color: var(--muted); font-size: .91rem; line-height: 1.65; margin: 0; }
.toolkit { margin-top: 28px; display: flex; align-items: flex-start; gap: 20px; }
.toolkit__label {
	flex: 0 0 auto;
	font-family: var(--mono);
	font-size: .78rem;
	font-weight: 600;
	color: var(--accent-strong);
	padding-top: 9px;
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.chips li {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: .9rem;
	font-weight: 500;
	color: var(--ink-soft);
	transition: all .15s;
}
.chips li:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }

/* ---------- Education ---------- */
.edu { max-width: 560px; }
.edu__card {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px 26px;
	box-shadow: var(--shadow);
}
.edu__degree { font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.edu__school { margin: 0; color: var(--ink-soft); font-weight: 500; }
.edu__meta { margin: 6px 0 0; font-family: var(--mono); font-size: .82rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { text-align: center; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact .section__kicker, .contact .section__title { text-align: center; }
.contact__lead { color: var(--muted); max-width: 50ch; margin: 4px auto 26px; font-size: 1.05rem; }
.contact__social { justify-content: center; margin-top: 26px; }
.contact__social a { color: var(--ink-soft); background: var(--bg); border-color: var(--line); }
.contact__social a:hover { color: var(--accent-strong); }

/* ---------- Footer ---------- */
.site-footer {
	border-top: 1px solid var(--line);
	padding: 28px 0;
	text-align: center;
	color: var(--muted);
	font-size: .86rem;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent-strong); }

/* ---------- Not found ---------- */
.not-found {
	min-height: calc(100vh - 145px);
	display: grid;
	place-items: center;
	text-align: center;
}
.not-found__inner { display: flex; flex-direction: column; align-items: center; }
.not-found .section__title { font-size: clamp(2rem, 6vw, 3.5rem); }
.not-found p { color: var(--muted); margin: 12px 0 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.hero__inner { grid-template-columns: 1fr; gap: 36px; text-align: left; }
	.hero__photo { order: -1; }
	.hero__photo img { width: 180px; height: 180px; }
	.about__grid { grid-template-columns: 1fr; gap: 32px; }
	.expertise__grid { grid-template-columns: 1fr; }
	.about__stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
	.site-nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
	.site-nav__links {
		position: absolute;
		top: 64px; left: 0; right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--bg);
		border-bottom: 1px solid var(--line);
		padding: 8px 16px 16px;
		display: none;
		box-shadow: 0 16px 24px -16px rgba(15,23,42,.18);
	}
	.site-nav__links.open { display: flex; }
	.site-nav__links a { padding: 12px 10px; border-radius: 8px; }
	.site-nav__cta { margin-top: 6px; text-align: center; }
	.section { padding: 64px 0; }
	.hero { padding: 64px 0 56px; }
	.hero__actions { align-items: flex-start; flex-direction: column; }
	.hero__actions .btn { max-width: 100%; }
	.timeline__date { white-space: normal; }
	.toolkit { flex-direction: column; gap: 10px; }
	.toolkit__label { padding-top: 0; }
}

@media (max-width: 380px) {
	.about__stats { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Small inline JS for the mobile nav toggle + scrollspy highlight.
   Kept inline to avoid an extra network request for a tiny script. */
