/*
Theme Name: Kelvin Rodrigues
Theme URI: https://kelvinx.com
Author: Kelvin Rodrigues
Description: Full-stack engineer, Kochi
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: kelvinx
*/
/* Kelvin X — the site is an editor window
   Paper-white document, syntax colours, file tree, status bar. */

:root {
	--desk: #ddd9ce;
	--paper: #fbfaf7;
	--chrome: #f1eee6;
	--side: #f6f4ee;
	--line: #d9d5c9;
	--edge: #b9b4a6;
	--ink: #26251f;
	--muted: #7a776b;
	--blue: #2f5c9e;
	--green: #4a7a50;
	--orange: #b4662b;
	--purple: #6a4c93;
	--mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
	--sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
	--pad: clamp(18px, 3.4vw, 52px);
	--ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--desk);
	background-image: radial-gradient(rgba(0, 0, 0, .055) 1px, transparent 1px);
	background-size: 18px 18px;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	padding: clamp(10px, 2vw, 28px);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1rem; }

h1, h2, h3 {
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin: 0;
}
h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.2rem, 1.9vw, 1.5rem); }
h3 { font-size: 1rem; }

code, .mono { font-family: var(--mono); font-size: .86em; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: .7rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- window ---------- */

.win {
	width: min(1180px, 100%);
	margin-inline: auto;
	background: var(--paper);
	border: 1px solid var(--edge);
	box-shadow: 0 26px 46px -34px rgba(30, 28, 22, .65);
}

.win-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .8rem;
	padding: .5rem .9rem;
	background: var(--chrome);
	border-bottom: 1px solid var(--line);
	font-family: var(--mono);
	font-size: .66rem;
	color: var(--muted);
	flex-wrap: wrap;
}
.win-bar .dots { display: flex; gap: .35rem; }
.win-bar .dots i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--line);
	display: block;
}
.win-bar .dots i:nth-child(2) { background: #cfc8b4; }
.win-bar .dots i:nth-child(3) { background: #c2d2bf; }
.win-bar .path { display: flex; align-items: center; gap: .5rem; }
.pill {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	border: 1px solid var(--line);
	background: var(--paper);
	padding: .15rem .45rem;
	border-radius: 999px;
	font-family: var(--mono);
	font-size: .6rem;
	color: var(--green);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tabs {
	display: flex;
	overflow-x: auto;
	background: var(--chrome);
	border-bottom: 1px solid var(--line);
	scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .6rem .9rem;
	font-family: var(--mono);
	font-size: .7rem;
	color: var(--muted);
	border-right: 1px solid var(--line);
	white-space: nowrap;
	transition: background .18s var(--ease), color .18s var(--ease);
}
.tab:hover { background: #e9e6db; color: var(--ink); }
.tab[aria-current="page"] {
	background: var(--paper);
	color: var(--ink);
	box-shadow: inset 0 2px 0 var(--blue);
}
.tab .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }

.pane { display: grid; grid-template-columns: 232px 1fr; align-items: stretch; }

/* ---------- file tree ---------- */

.tree {
	background: var(--side);
	border-right: 1px solid var(--line);
	padding: 1rem .7rem 1.6rem;
	font-family: var(--mono);
	font-size: .72rem;
	line-height: 1.9;
	color: #4a473e;
}
.tree .root { color: var(--muted); margin-bottom: .3rem; }
.tree ul { list-style: none; margin: 0 0 .5rem; padding-left: .1rem; }
.tree li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree .dir { color: #6b6659; margin-top: .35rem; }
.tree a {
	display: block;
	padding: .05rem .35rem;
	border-radius: 3px;
	color: inherit;
}
.tree a:hover { background: #eae7dd; }
.tree a[aria-current="page"] { background: #e3eaf5; color: var(--blue); }
.tree .ext { color: var(--muted); }

/* ---------- document ---------- */

.doc { padding: clamp(22px, 3vw, 44px) var(--pad) clamp(30px, 4vw, 56px); min-width: 0; }
.doc > * + * { margin-top: 0; }

.doc h1 { margin-bottom: .5rem; }
.doc .role {
	font-family: var(--mono);
	font-size: .76rem;
	color: var(--muted);
	margin-bottom: 1.4rem;
}
.doc h2 {
	margin: 2.4rem 0 .9rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--line);
	display: flex;
	align-items: baseline;
	gap: .5rem;
}
.doc h2::before {
	content: "##";
	font-family: var(--mono);
	font-size: .8rem;
	color: var(--line);
	font-weight: 400;
}
.doc p, .doc li { max-width: 64ch; }
.doc p { color: #38362f; }
.lede { font-size: 1.06rem; }
.doc a.inline { color: var(--blue); border-bottom: 1px solid rgba(47, 92, 158, .35); }
.doc a.inline:hover { border-color: var(--blue); }
.chip {
	display: inline-block;
	font-family: var(--mono);
	font-size: .74rem;
	background: #f0ede4;
	border: 1px solid var(--line);
	border-radius: 3px;
	padding: .05rem .35rem;
	white-space: nowrap;
}

/* the three-column capability list, kept as plain markdown list */
.spec-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.spec-list li {
	display: grid;
	grid-template-columns: 132px 1fr;
	gap: 1rem;
	padding-block: .55rem;
	border-bottom: 1px dashed var(--line);
	margin: 0;
	max-width: none;
}
.spec-list b { font-family: var(--mono); font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.spec-list span { font-size: .95rem; }

/* file listing table */
.listing { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .78rem; }
.listing th {
	text-align: left;
	font-weight: 500;
	color: var(--muted);
	padding: .4rem .5rem .4rem 0;
	border-bottom: 1px solid var(--ink);
	font-size: .64rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.listing td { padding: .55rem .5rem .55rem 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.listing tr:hover td { background: #f5f3ec; }
.listing .name { color: var(--blue); }
.listing .name a { border-bottom: 1px solid transparent; }
.listing tr:hover .name a { border-color: rgba(47, 92, 158, .4); }
.listing .num { text-align: right; white-space: nowrap; }
.listing .muted { color: var(--muted); }

/* code block with line numbers */
.code {
	background: #f4f2ea;
	border: 1px solid var(--line);
	border-left: 3px solid var(--blue);
	padding: .9rem 0 .9rem 0;
	font-family: var(--mono);
	font-size: .78rem;
	line-height: 1.75;
	overflow-x: auto;
	counter-reset: ln;
	margin: 1.2rem 0;
}
.code .ln {
	display: block;
	padding: 0 1rem 0 3rem;
	position: relative;
	white-space: pre;
	counter-increment: ln;
}
.code .ln::before {
	content: counter(ln);
	position: absolute;
	left: 0;
	width: 2.2rem;
	text-align: right;
	color: #b3afa1;
	font-size: .7rem;
}
.code .k { color: var(--blue); }
.code .s { color: var(--green); }
.code .n { color: var(--orange); }
.code .c { color: #8f8b7c; font-style: italic; }
.code .f { color: var(--purple); }
.code .add { background: #e6efe4; display: block; }
.code .del { background: #f6e6e2; display: block; }
.code .add::after, .code .del::after { content: ""; }

/* figures inside the document */
.fig { margin: 1.4rem 0; border: 1px solid var(--line); background: #fff; }
.fig img { width: 100%; object-fit: cover; }
.fig figcaption {
	font-family: var(--mono);
	font-size: .66rem;
	color: var(--muted);
	padding: .45rem .6rem;
	border-top: 1px solid var(--line);
}
.fig figcaption::before { content: "▲ "; }

/* a working note, styled like a TODO comment */
.todo {
	border-left: 3px solid var(--orange);
	background: #f8f1e6;
	padding: .7rem .9rem;
	font-family: var(--mono);
	font-size: .74rem;
	color: #6a5a45;
	margin: 1.4rem 0;
	max-width: 58ch;
}
.todo b { color: var(--orange); font-weight: 500; }

/* status bar */
.status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: .4rem .8rem;
	background: var(--chrome);
	border-top: 1px solid var(--line);
	font-family: var(--mono);
	font-size: .62rem;
	color: var(--muted);
}
.status .left { display: flex; gap: 1rem; }
.status .right { display: flex; gap: 1rem; }
.status .ok { color: var(--green); }

/* footer of the page (outside the window) */
.below {
	width: min(1180px, 100%);
	margin: .9rem auto 0;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	font-family: var(--mono);
	font-size: .62rem;
	color: #6f6b5e;
}

/* ---------- career log ---------- */

.commit { display: grid; grid-template-columns: 74px 1fr; gap: 1rem; padding-block: .7rem; border-bottom: 1px solid var(--line); }
.commit .hash { font-family: var(--mono); font-size: .72rem; color: var(--purple); }
.commit .msg { font-size: .95rem; }
.commit .msg small { display: block; font-family: var(--mono); font-size: .64rem; color: var(--muted); margin-top: .15rem; }

/* ---------- contact form ---------- */

.contact-form { display: grid; gap: .9rem; max-width: 520px; margin-top: 1.2rem; }
.contact-form .row { display: grid; gap: .25rem; }
.contact-form label { font-family: var(--mono); font-size: .64rem; color: var(--muted); letter-spacing: .06em; }
.contact-form input,
.contact-form textarea {
	background: #fff;
	border: 1px solid var(--line);
	padding: .55rem .65rem;
	font-family: var(--sans);
	font-size: .94rem;
	border-radius: 2px;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 92, 158, .12); }
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form button {
	justify-self: start;
	background: var(--ink);
	color: var(--paper);
	border: 1px solid var(--ink);
	padding: .55rem 1rem;
	font-family: var(--mono);
	font-size: .7rem;
	cursor: pointer;
	transition: background .2s var(--ease);
}
.contact-form button:hover { background: var(--blue); border-color: var(--blue); }

/* ---------- reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
	.js .reveal { opacity: 0; translate: 0 8px; transition: opacity .5s var(--ease), translate .5s var(--ease); }
	.js .reveal.in { opacity: 1; translate: 0; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
	.pane { grid-template-columns: 1fr; }
	.tree { display: none; }
	.spec-list li { grid-template-columns: 100px 1fr; }
}

@media (max-width: 620px) {
	body { padding: 8px; }
	.win { border-width: 1px; }
	.win-bar { font-size: .6rem; }
	.win-bar .dots { display: none; }
	.doc { padding-inline: 16px; }
	.listing { font-size: .7rem; }
	.listing .hide-sm { display: none; }
	.code { font-size: .72rem; }
	.code .ln { padding-left: 2.4rem; }
	.below { font-size: .58rem; }
}

/* ---------- developer credit ---------- */

.theme-credit {
	font-size: inherit;
	opacity: .75;
	margin: 0;
	letter-spacing: .02em;
	display: inline;
}

.theme-credit a {
	border-bottom: 1px solid currentColor;
	text-decoration: none;
}