/* =========================================================================
   Edward Hayes — developer CV
   Palette derived from Bootswatch "Spacelab" (slate blue + cool greys).
   Typography: IBM Plex Sans (body) + IBM Plex Mono (developer accents).
   ========================================================================= */

:root {
	--slate:        #446e9b;
	--slate-dark:   #38597f;
	--ink:          #2c3e50;
	--body:         #323d49;
	--muted:        #6c7a89;
	--bg:           #ffffff;
	--bg-alt:       #f3f6f9;
	--line:         #e4e9ee;
	--accent:       #2aa198; /* muted teal — the mono/dev accent */

	--sidebar-bg:   #2c3e50;
	--sidebar-ink:  #e8eef4;
	--sidebar-muted:#9fb1c2;
	--sidebar-line: rgba(255, 255, 255, 0.12);

	--code-bg:      #1e2a36;
	--code-ink:     #c8d3de;

	--sans: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

	--radius: 8px;
	--sidebar-w: 320px;
	--chev-col: 1.25rem; /* reserved right column so every date aligns, chevron sits in it */
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--sans);
	font-weight: 400;
	font-size: 16.5px;
	line-height: 1.62;
	color: var(--body);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

a { color: var(--slate); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--ink); line-height: 1.25; }

.prompt { color: var(--accent); font-family: var(--mono); font-weight: 600; }

/* ---- Layout ----------------------------------------------------------- */

.layout { display: flex; align-items: flex-start; }

.content {
	flex: 1 1 auto;
	min-width: 0; /* let code blocks scroll instead of stretching the column */
	padding: clamp(2rem, 4vw, 3.5rem);
}

.section { max-width: 880px; margin: 0 auto 2.9rem; }
.band    { max-width: 880px; margin: 0 auto 2.6rem; }

.section-label {
	font-family: var(--mono);
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--slate);
	margin: 0 0 1.1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--line);
}

.subhead {
	font-size: 0.82rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
	margin: 1.4rem 0 0.6rem;
}

.lead { font-size: 1.12rem; color: var(--ink); margin: 0; }

/* ---- Page header (name + title atop the main column) ------------------ */

.page-head {
	max-width: 880px;
	margin: 0 auto 2rem;
	padding-bottom: 1.1rem;
	border-bottom: 1px solid var(--line);
}
.page-name {
	margin: 0;
	font-size: 2rem;
	font-weight: 600;
	color: var(--ink);
	line-height: 1.15;
}
.page-title {
	margin: 0.4rem 0 0;
	font-family: var(--mono);
	font-size: 0.95rem;
	color: var(--slate);
}

/* ---- Sidebar ---------------------------------------------------------- */

.sidebar {
	flex: 0 0 var(--sidebar-w);
	width: var(--sidebar-w);
	position: sticky;
	top: 0;
	align-self: stretch;
	max-height: 100vh;
	overflow-y: auto;
	background: var(--sidebar-bg);
	color: var(--sidebar-ink);
}

.sidebar-inner { padding: 2.5rem 1.75rem; }

.avatar {
	display: block;
	width: 124px;
	height: 124px;
	margin: 0 auto 1.2rem;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid rgba(42, 161, 152, 0.6);
}

.name {
	margin: 0;
	text-align: center;
	font-size: 1.45rem;
	font-weight: 600;
	color: #fff;
}

.role {
	margin: 0.35rem 0 1.5rem;
	text-align: center;
	font-family: var(--mono);
	font-size: 0.82rem;
	color: var(--sidebar-muted);
}

.contacts { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.contacts li { margin-bottom: 0.55rem; }
.contacts a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--sidebar-ink);
	font-size: 0.86rem;
	font-family: var(--mono);
	word-break: break-all;
}
.contacts a:hover { color: var(--accent); text-decoration: none; }
.contacts svg { flex: 0 0 16px; color: var(--sidebar-muted); }
.contacts a:hover svg { color: var(--accent); }

.btn-resume {
	display: block;
	text-align: center;
	background: var(--slate);
	color: #fff;
	font-weight: 500;
	padding: 0.7rem 1rem;
	border-radius: var(--radius);
	margin-bottom: 2rem;
}
.btn-resume:hover { background: var(--slate-dark); text-decoration: none; }

.skill-group { margin-bottom: 1.1rem; }
.skill-label {
	font-family: var(--mono);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 0.5rem;
}
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li {
	font-family: var(--mono);
	font-size: 0.74rem;
	padding: 0.22rem 0.5rem;
	border: 1px solid var(--sidebar-line);
	border-radius: 5px;
	color: var(--sidebar-ink);
	background: rgba(255, 255, 255, 0.04);
}

/* ---- Impact band: metrics + heatmap ----------------------------------- */

.metrics {
	list-style: none;
	margin: 0 0 1.4rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.9rem;
}
.metrics li {
	background: var(--bg-alt);
	border-left: 3px solid var(--slate);
	border-radius: 0 var(--radius) var(--radius) 0;
	padding: 0.9rem 1rem;
}
.metric-value {
	display: block;
	font-family: var(--mono);
	font-size: 1.75rem;
	font-weight: 600;
	color: var(--slate);
	line-height: 1.1;
}
.metric-label { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }

.heatmap { margin: 0; }
.heatmap img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.6rem;
	background: var(--bg);
}
.heatmap figcaption {
	font-family: var(--mono);
	font-size: 0.76rem;
	color: var(--muted);
	margin-top: 0.5rem;
	text-align: right;
}

/* ---- Education -------------------------------------------------------- */

.edu-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.edu-degree { font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.edu-year { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.edu-fields { margin: 0.25rem 0 0; color: var(--muted); }

.courses { list-style: none; margin: 0; padding: 0; }
.courses li {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--line);
}
.courses li:last-child { border-bottom: 0; }
.course-title { color: var(--body); }
.course-provider { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

/* ---- Design philosophies --------------------------------------------- */

.philosophies { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.philosophies li {
	display: flex;
	align-items: baseline;
	gap: 0.45rem;
	background: var(--bg-alt);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.5rem 0.85rem;
	font-size: 0.9rem;
	color: var(--ink);
}
.philosophies li::before { content: "›"; color: var(--accent); font-family: var(--mono); font-weight: 600; }

/* ---- Projects --------------------------------------------------------- */

.projects { display: flex; flex-direction: column; gap: 1.1rem; }
.project {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.1rem 1.25rem;
	background: var(--bg);
}
.project-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; }
.project-name { margin: 0; font-size: 1.15rem; font-weight: 600; font-family: var(--mono); color: var(--ink); }
.lang-tag {
	font-family: var(--mono);
	font-size: 0.72rem;
	font-weight: 500;
	color: var(--accent);
	background: rgba(42, 161, 152, 0.1);
	border: 1px solid rgba(42, 161, 152, 0.3);
	border-radius: 5px;
	padding: 0.1rem 0.45rem;
}
.repo-link { margin-left: auto; font-family: var(--mono); font-size: 0.8rem; }
.project-desc { margin: 0 0 0.6rem; }
.project-contrib { margin: 0; color: var(--ink); }
.contrib-label {
	font-family: var(--mono);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent);
	margin-right: 0.5rem;
	white-space: nowrap;
}

/* ---- Code showcase ---------------------------------------------------- */
/* Retained for future use — the otto snippet markup was removed for now,
   but these rules let a <figure class="code"> drop back in without restyling. */

.code {
	margin: 1.4rem 0 0;
	background: var(--code-bg);
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid #15202b;
}
.code figcaption {
	font-family: var(--mono);
	font-size: 0.78rem;
	color: #8aa0b4;
	padding: 0.6rem 1rem;
	background: rgba(255, 255, 255, 0.03);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.code pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; }
.code code {
	font-family: var(--mono);
	font-size: 0.82rem;
	line-height: 1.65;
	color: var(--code-ink);
	white-space: pre;
}
.code .c  { color: #6b7e90; font-style: italic; }
.code .k  { color: #c678dd; }
.code .s  { color: #98c379; }
.code .fn { color: #61afef; }
.code .n  { color: #d19a66; }

/* ---- Experience timeline --------------------------------------------- */

.company-head {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: baseline;
	margin-bottom: 1.4rem;
	padding-bottom: 0.7rem;
	padding-right: var(--chev-col);
	border-bottom: 1px solid var(--line);
}
.company-name { font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.company-tenure { font-family: var(--mono); font-size: 0.85rem; color: var(--slate); }

.timeline {
	list-style: none;
	margin: 0;
	padding-left: 1.75rem;
	border-left: 2px solid var(--line);
	position: relative;
}
.role { position: relative; margin-bottom: 1.15rem; }
.role::before {
	content: "";
	position: absolute;
	left: -1.75rem;
	top: 0.45rem;
	transform: translateX(-50%);
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--bg);
	border: 2px solid var(--slate);
}

.role details > summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.55rem;
	padding-right: var(--chev-col);
}
.role details > summary::-webkit-details-marker { display: none; }

/* margin-right: auto pushes the dates (and chevron) to the right edge so they
   line up with the company tenure line. */
.role-title { font-weight: 600; color: var(--slate); margin-right: auto; }
.role-dates { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

.chevron {
	position: absolute;
	right: 0;
	top: 0.4rem;
	width: 0; height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid var(--slate);
	transform: rotate(-90deg);
	transition: transform 0.2s ease;
}
.role details[open] > summary .chevron { transform: rotate(0); }

.role-bullets { margin: 0.6rem 0 0; padding-left: 1.15rem; text-align: left; color: var(--ink); }
.role-bullets li { margin-bottom: 0.3rem; text-align: left; }
.role-bullets li::marker { color: var(--accent); }

.role-static { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.55rem; padding-right: var(--chev-col); }
.role-static .role-title { font-weight: 500; }

/* ---- Footer ----------------------------------------------------------- */

.site-footer {
	max-width: 880px;
	margin: 2rem auto 0;
	padding-top: 1.2rem;
	border-top: 1px solid var(--line);
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--muted);
}
.site-footer p { margin: 0; }

/* ---- Responsive ------------------------------------------------------- */

@media (max-width: 900px) {
	.layout { flex-direction: column; }
	.sidebar {
		position: static;
		width: 100%;
		flex-basis: auto;
		max-height: none;
	}
	.sidebar-inner { max-width: 600px; margin: 0 auto; padding: 2rem 1.5rem; }
	.metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.metrics { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
	.metric-value { font-size: 1.4rem; }
}
