/* ============================================================
   Aayush Goel — portfolio
   Palette: deep blue-black + steel navy (tint of resume RGB 52,67,100)
   Type: Archivo (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
	--bg-deep: #0B0E14;
	--bg-panel: #11161F;
	--bg-panel-2: #151B26;
	--line: #232B3A;
	--ink: #E8ECF4;
	--muted: #8B94A7;
	--steel: #7D9BCE;        /* light tint of resume navy for dark bg */
	--steel-dim: #4A5F82;
	--steel-deep: #344364;   /* the actual resume navy */
	--ok: #5FBF8A;
	--on-steel: #E8ECF4;     /* text on steel-deep surfaces */
	--btn-hover: #3E5178;
	--header-bg: rgba(11, 14, 20, 0.85);
	--glow: rgba(125, 155, 206, 0.07);

	--font-display: "Archivo", sans-serif;
	--font-body: "IBM Plex Sans", sans-serif;
	--font-mono: "IBM Plex Mono", monospace;

	--container: 980px;
}

/* light theme — mirrors the resume: white paper + navy 52,67,100 */
:root[data-theme="light"] {
	--bg-deep: #FFFFFF;
	--bg-panel: #F4F6FA;
	--bg-panel-2: #EAEEF5;
	--line: #DCE2EC;
	--ink: #1C2536;
	--muted: #5B6579;
	--steel: #344364;        /* the resume navy, straight up */
	--steel-dim: #8FA3C4;
	--steel-deep: #344364;
	--ok: #2E9E63;
	--on-steel: #F4F6FA;
	--btn-hover: #455A85;
	--header-bg: rgba(255, 255, 255, 0.85);
	--glow: rgba(52, 67, 100, 0.05);
}

html { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* swish: applied only during a theme toggle so normal hovers stay snappy */
:root.theme-anim, :root.theme-anim * {
	transition: background-color 0.4s ease, background 0.4s ease,
		border-color 0.4s ease, color 0.4s ease, fill 0.4s ease, stroke 0.4s ease,
		box-shadow 0.4s ease;
}

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

html { scroll-behavior: smooth; }

body {
	background: var(--bg-deep);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	transition: background 0.3s ease, color 0.3s ease;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }

a { color: inherit; }

::selection { background: var(--steel-deep); color: var(--on-steel); }

/* ---------- header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header-bg);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-inner {
	display: flex; align-items: center; justify-content: space-between;
	height: 60px;
}
.logo {
	font-family: var(--font-mono); font-weight: 500; font-size: 24px;
	text-decoration: none; letter-spacing: 0.02em;
}
.logo-bracket { color: var(--steel); }
.header-nav { display: flex; gap: 26px; align-items: center; }
.header-nav a {
	text-decoration: none; font-size: 14px; color: var(--muted);
	transition: color 0.15s;
}
.header-nav a:hover { color: var(--ink); }
.nav-resume { color: var(--steel) !important; font-weight: 500; }

/* ---------- theme toggle ---------- */
.theme-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--muted);
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--steel); border-color: var(--steel-dim); }
.theme-toggle svg {
	width: 16px; height: 16px;
	transition: transform 0.4s ease, opacity 0.3s ease;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.theme-toggle:active svg { transform: rotate(40deg) scale(0.85); }

/* ---------- scroll progress ---------- */
.scroll-progress {
	position: fixed; top: 0; left: 0; z-index: 60;
	height: 2px; width: 100%;
	background: var(--steel);
	transform-origin: 0 50%;
	transform: scaleX(0);
	pointer-events: none;
}

/* ---------- hero ---------- */
.hero { padding: 92px 0 72px; position: relative; overflow: hidden; }
.hero > .container { position: relative; z-index: 2; }
.hero-canvas {
	position: absolute; inset: 0; z-index: 0;
	width: 100%; height: 100%;
	pointer-events: none;
}

/* ---------- cursor spotlight ---------- */
.cursor-glow {
	position: fixed; top: 0; left: 0; z-index: 1;
	width: 520px; height: 520px;
	border-radius: 50%;
	background: radial-gradient(circle, var(--glow) 0%, transparent 65%);
	pointer-events: none;
	transform: translate(-50%, -50%);
	opacity: 0;
	transition: opacity 0.4s ease;
}
@media (pointer: coarse) { .cursor-glow { display: none; } }
.eyebrow {
	font-size: 12px; letter-spacing: 0.14em; color: var(--steel);
	margin-bottom: 18px;
}
.hero-name {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(44px, 8vw, 76px);
	letter-spacing: -0.03em;
	line-height: 1.02;
	margin-bottom: 18px;
}
.hero-typed {
	font-size: 15px; color: var(--muted); margin-bottom: 22px;
	min-height: 24px;
}
.prompt { color: var(--steel); }
.cursor {
	display: inline-block; width: 8px; height: 17px;
	background: var(--steel); margin-left: 3px; vertical-align: text-bottom;
	animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-pitch {
	max-width: 620px; font-size: 17.5px; color: var(--muted);
	margin-bottom: 32px;
}
.hero-pitch strong { color: var(--ink); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }

.btn {
	display: inline-block; padding: 11px 22px; border-radius: 8px;
	text-decoration: none; font-size: 14.5px; font-weight: 500;
	transition: transform 0.15s, background 0.15s, border-color 0.15s;
	border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--steel-deep); color: var(--on-steel); border-color: var(--steel-dim); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-ghost { border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { border-color: var(--steel-dim); color: var(--ink); }

/* ---------- signature: status board ---------- */
.statusboard {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-deep) 100%);
	overflow: hidden;
}
.statusboard-head {
	display: flex; align-items: center; gap: 9px;
	padding: 12px 20px;
	font-size: 12.5px; letter-spacing: 0.05em; color: var(--muted);
	border-bottom: 1px solid var(--line);
}
.status-dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--ok);
	box-shadow: 0 0 8px var(--ok);
	animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- interactive terminal ---------- */
.hero-typed { cursor: text; }
.hero-typed.term-live .prompt { color: var(--ok); }
.term-out {
	font-size: 13px;
	color: var(--muted);
	white-space: pre-wrap;
	margin: 8px;
	padding: 10px 14px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--line);
	border-radius: 6px;
}
.term-input {
	position: absolute;
	opacity: 0;
	width: 1px; height: 1px;
	pointer-events: none;
}

.statusboard-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}
.stat {
	padding: 22px 20px;
	border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-value {
	font-size: clamp(22px, 3.4vw, 30px);
	font-weight: 500;
	color: var(--steel);
	letter-spacing: -0.01em;
	margin-bottom: 4px;
}
.stat-label { font-size: 12.5px; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 68px 0; border-top: 1px solid var(--line); }
.section-title {
	font-family: var(--font-display);
	font-weight: 700; font-size: 27px; letter-spacing: -0.02em;
	margin-bottom: 38px;
}
.section-mark { color: var(--steel); font-size: 20px; margin-right: 10px; font-weight: 400; }

/* ---------- experience ---------- */
.xp-company { margin-bottom: 46px; }
.xp-company:last-child { margin-bottom: 0; }
.xp-company-head {
	display: flex; justify-content: space-between; align-items: baseline;
	flex-wrap: wrap; gap: 6px;
}
.xp-company-head h3 {
	font-family: var(--font-display);
	font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
}
.xp-dates, .role-dates { font-size: 13px; color: var(--muted); }
.xp-loc { font-size: 12.5px; color: var(--steel-dim); margin: 3px 0 20px; letter-spacing: 0.03em; }

.timeline {
	position: relative;
	padding-left: 26px;
	border-left: 2px solid var(--steel-deep);
	margin-left: 5px;
}
.timeline-role { position: relative; padding-bottom: 30px; }
.timeline-role:last-child { padding-bottom: 4px; }
.timeline-marker {
	position: absolute; left: -33px; top: 5px;
	width: 12px; height: 12px; border-radius: 50%;
	background: var(--steel);
	border: 2.5px solid var(--bg-deep);
	box-shadow: 0 0 0 2px var(--steel-deep);
}
.role-head {
	display: flex; justify-content: space-between; align-items: baseline;
	flex-wrap: wrap; gap: 4px; margin-bottom: 10px;
}
.role-head h4 { font-size: 16.5px; font-weight: 600; color: var(--steel); }
.timeline-body ul { list-style: none; }
.timeline-body li {
	position: relative; padding-left: 18px;
	font-size: 15px; color: var(--muted); margin-bottom: 9px;
}
.timeline-body li::before {
	content: "–"; position: absolute; left: 0; color: var(--steel-dim);
}
.timeline-body strong { color: var(--ink); font-weight: 600; }

/* ---------- projects ---------- */
.project-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.project-card {
	display: block; text-decoration: none;
	background: var(--bg-panel);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 22px;
	transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover { border-color: var(--steel-dim); transform: translateY(-3px); }
.project-head {
	display: flex; justify-content: space-between; align-items: baseline;
	margin-bottom: 10px; gap: 8px;
}
.project-head h3 {
	font-family: var(--font-display);
	font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em;
}
.project-link { font-size: 11.5px; color: var(--steel); letter-spacing: 0.05em; white-space: nowrap; }
.project-card p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
	font-size: 11px; padding: 3px 9px; border-radius: 20px;
	background: var(--bg-panel-2); border: 1px solid var(--line); color: var(--muted);
	letter-spacing: 0.03em;
}

/* ---------- skills ---------- */
.skills-rows { display: flex; flex-direction: column; }
.skill-row {
	display: grid; grid-template-columns: 150px 1fr; gap: 20px;
	padding: 15px 0; border-bottom: 1px solid var(--line);
	align-items: baseline;
}
.skill-row:last-child { border-bottom: none; }
.skill-key { font-size: 12.5px; color: var(--steel); letter-spacing: 0.07em; }
.skill-vals { font-size: 14.5px; color: var(--muted); }

/* ---------- resume cta ---------- */
.resume-cta {
	display: flex; justify-content: space-between; align-items: center;
	flex-wrap: wrap; gap: 20px;
	background: var(--bg-panel);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 30px 32px;
}
.resume-cta h2 {
	font-family: var(--font-display); font-size: 23px; font-weight: 700;
	letter-spacing: -0.02em; margin-bottom: 4px;
}
.resume-meta { font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }
.resume-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner {
	display: flex; justify-content: space-between; align-items: center;
	flex-wrap: wrap; gap: 12px;
}
.footer-inner p { font-size: 12.5px; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
	font-size: 12.5px; color: var(--muted); text-decoration: none;
	transition: color 0.15s;
}
.footer-links a:hover { color: var(--steel); }

/* ---------- reveal on scroll ---------- */
.reveal {
	opacity: 0; transform: translateY(16px);
	transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	/* only calm the scroll-triggered slide — the real vestibular trigger.
	   ambient decor (cursor blink, glow, particle drift, theme fade) stays. */
	.reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- focus states ---------- */
a:focus-visible, .btn:focus-visible {
	outline: 2px solid var(--steel);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
	.statusboard-grid { grid-template-columns: repeat(2, 1fr); }
	.stat:nth-child(2) { border-right: none; }
	.stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
	.project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.hero { padding: 64px 0 52px; }
	.header-nav { gap: 16px; }
	.header-nav a:not(.nav-resume) { display: none; }
	.skill-row { grid-template-columns: 1fr; gap: 4px; }
	.statusboard-grid { grid-template-columns: 1fr 1fr; }
	.resume-cta { padding: 24px 20px; }
}