/*
 * Anchor Development — design system.
 * Values are a literal port of the Claude Design source's inline styles.
 */

/* Tokens are defined four times so an explicit choice (html[data-theme]) beats the OS preference. */
:root {
	--bg: #F5F7FA;
	--text: #15181D;
	--muted: #565C66;
	--line: #E3E7EE;
	--surface: #FFFFFF;
	--accent: #123E8C;
	--accent-hover: #0E3272;
	--ok: #1C8A55;
	--sea-mid: #6B95D8;
	--sea-deep: #0B2A5E;
	--sea-ray: #FFFFFF;
	--sea-ink: #E8ECF2;
	--sea-rope: #D9C08F;
	--sea-weed: #2F8A66;
	--sea-bubble: rgba(255, 255, 255, 0.55);
	--sea-fish: rgba(255, 255, 255, 0.35);
	--sand: #DCD0B0;
	--sand-text: #4F4734;
	--sand-link: #123E8C;
	--sand-link-hover: #0E3272;
	--row-hover: #FFFFFF;
	--row-hover-shadow: 0 1px 2px rgba(21, 24, 29, 0.05);
	--sans: 'Plus Jakarta Sans', system-ui, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	--wrap: 880px;
	--gutter: 24px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0F1216;
		--text: #E8ECF2;
		--muted: #9AA3B0;
		--line: #262C35;
		--surface: #171B21;
		--accent: #7FA3E8;
		--accent-hover: #A3BEF0;
		--ok: #34B678;
	--sea-mid: #12274D;
	--sea-deep: #04091A;
	--sea-ray: #9FBCEB;
	--sea-ink: #C9D3E3;
	--sea-rope: #A8935F;
	--sea-weed: #1E5C45;
	--sea-bubble: rgba(200, 216, 240, 0.45);
	--sea-fish: rgba(200, 216, 240, 0.25);
	--sand: #1B1F27;
	--sand-text: #9AA3B0;
	--sand-link: #7FA3E8;
	--sand-link-hover: #A3BEF0;
	--row-hover: #171B21;
	--row-hover-shadow: none;
		color-scheme: dark;
	}
}
html[data-theme="light"] {
	--bg: #F5F7FA;
	--text: #15181D;
	--muted: #565C66;
	--line: #E3E7EE;
	--surface: #FFFFFF;
	--accent: #123E8C;
	--accent-hover: #0E3272;
	--ok: #1C8A55;
	--sea-mid: #6B95D8;
	--sea-deep: #0B2A5E;
	--sea-ray: #FFFFFF;
	--sea-ink: #E8ECF2;
	--sea-rope: #D9C08F;
	--sea-weed: #2F8A66;
	--sea-bubble: rgba(255, 255, 255, 0.55);
	--sea-fish: rgba(255, 255, 255, 0.35);
	--sand: #DCD0B0;
	--sand-text: #4F4734;
	--sand-link: #123E8C;
	--sand-link-hover: #0E3272;
	--row-hover: #FFFFFF;
	--row-hover-shadow: 0 1px 2px rgba(21, 24, 29, 0.05);
	color-scheme: light;
}
html[data-theme="dark"] {
	--bg: #0F1216;
	--text: #E8ECF2;
	--muted: #9AA3B0;
	--line: #262C35;
	--surface: #171B21;
	--accent: #7FA3E8;
	--accent-hover: #A3BEF0;
	--ok: #34B678;
	--sea-mid: #12274D;
	--sea-deep: #04091A;
	--sea-ray: #9FBCEB;
	--sea-ink: #C9D3E3;
	--sea-rope: #A8935F;
	--sea-weed: #1E5C45;
	--sea-bubble: rgba(200, 216, 240, 0.45);
	--sea-fish: rgba(200, 216, 240, 0.25);
	--sand: #1B1F27;
	--sand-text: #9AA3B0;
	--sand-link: #7FA3E8;
	--sand-link-hover: #A3BEF0;
	--row-hover: #171B21;
	--row-hover-shadow: none;
	color-scheme: dark;
}

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

html, body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	-webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

.mono { font-family: var(--mono); }

.page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.site-main { flex: 1; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header__inner { padding-top: 22px; padding-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__mark { height: 26px; width: auto; display: block; }
.brand__mark--svg { width: 26px; color: var(--accent); }
.brand__name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }

/* Theme toggle (left-click flips light/dark, right-click opens the menu) */
.theme { position: relative; }
.theme__btn {
	width: 32px; height: 32px; padding: 0; border-radius: 8px; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--muted); border: 1px solid var(--line); background: var(--surface);
	font: inherit;
}
.theme__btn:hover, .theme__btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.theme__btn svg { width: 16px; height: 16px; }
.theme__btn .icon--sun, .theme__btn .icon--moon { display: none; }
html[data-theme="dark"] .theme__btn .icon--sun { display: block; }
html[data-theme="light"] .theme__btn .icon--moon { display: block; }
html:not([data-theme]) .theme__btn .icon--moon { display: block; }
@media (prefers-color-scheme: dark) {
	html:not([data-theme]) .theme__btn .icon--moon { display: none; }
	html:not([data-theme]) .theme__btn .icon--sun { display: block; }
}
.theme__menu {
	position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 150px;
	margin: 0; padding: 6px; list-style: none;
	background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.theme__menu[hidden] { display: none; }
.theme__item {
	width: 100%; display: flex; align-items: center; gap: 10px;
	padding: 7px 10px; border: 0; border-radius: 6px; background: none; cursor: pointer;
	font: inherit; font-size: 14px; color: var(--text); text-align: left;
}
.theme__item:hover { background: var(--bg); color: var(--accent); }
.theme__item svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.theme__item .check { margin-left: auto; opacity: 0; color: var(--accent); }
.theme__item[aria-checked="true"] .check { opacity: 1; }
.theme__hint { white-space: nowrap; font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 6px 10px 4px; border-top: 1px solid var(--line); margin-top: 4px; }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 28px; }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.eyebrow__dot--off { background: var(--muted); }
.hero__title {
	margin: 0 0 20px;
	font-size: clamp(40px, 7vw, 72px);
	line-height: 1.02;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--text);
	text-wrap: balance;
	max-width: 16ch;
}
.hero__title--page { font-size: clamp(32px, 5vw, 48px); max-width: 24ch; }
.hero__subtitle { margin: 0; font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 44ch; text-wrap: pretty; }

/* Directory sections (Business, Projects) */
.directory { padding-bottom: 56px; }
.directory:last-of-type { padding-bottom: 0; }
.projects__head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
	border-bottom: 1px solid var(--text); padding-bottom: 12px; margin-bottom: 4px;
}
.projects__label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.projects__count { font-size: 13px; color: var(--muted); }

.projects__list { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0 40px; }
.projects__list--grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.projects__list { position: relative; z-index: 0; }
.project {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	gap: 18px;
	align-items: center;
	padding: 22px 0;
	border-bottom: 1px solid var(--line);
	color: var(--text);
}
/* Hover highlights the whole bar: a pill behind the row that bleeds 14px past the column. */
.project::before {
	content: ""; position: absolute; z-index: -1; inset: 6px -14px;
	border-radius: 12px; background: var(--row-hover); box-shadow: var(--row-hover-shadow);
	opacity: 0; transition: opacity 120ms ease;
}
.project:hover::before { opacity: 1; }
.project:hover .project__name { color: var(--accent); }
.project:hover .project__host { color: var(--accent); }
/* In list mode each row borrows the list's column tracks, so the host and GitHub columns share one width. */
@supports (grid-template-columns: subgrid) {
	.projects__list--list .project { grid-column: 1 / -1; grid-template-columns: subgrid; }
}
.project__logo {
	width: 40px; height: 40px; border-radius: 9px;
	background: var(--surface); border: 1px solid var(--line);
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.project__logo img { width: 26px; height: 26px; object-fit: contain; display: block; }
.project__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.project__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: var(--text); }

/* Subprojects: a chip row under the description, each chip linking to its repo */
.project__subs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.project__sub {
	display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px 0 8px;
	border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
	color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
}
.project__sub svg { width: 14px; height: 14px; flex: none; }
.project__sub-name { color: var(--text); }
.project__sub-stars { font-size: 12px; line-height: 1; font-weight: 400; }
.project__sub:hover { color: var(--accent); border-color: var(--accent); }
.project__sub:hover .project__sub-name { color: var(--accent); }
.project--parent .project__host, .project--parent .project__github, .project--parent .project__logo { align-self: start; margin-top: 7px; }
.project--parent .project__logo { margin-top: 3px; }
.project--parent .project__host { line-height: 32px; }
.project__body:hover { color: var(--accent); }
.project__name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.project__desc { font-size: 15px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.project__host { font-size: 13px; color: var(--muted); white-space: nowrap; text-align: right; }
.project__host:hover { color: var(--accent); }
.project__github {
	height: 32px; min-width: 32px; padding: 0 9px; justify-self: start;
	display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px;
	border-radius: 8px; color: var(--muted);
	border: 1px solid var(--line); background: var(--surface);
}
.project__github:hover { color: var(--accent); border-color: var(--accent); }
.project__github svg { flex: none; }
.project__github--none { visibility: hidden; }
.project__stars { font-size: 12px; line-height: 1; padding-right: 1px; }

/* The ocean: full-bleed, fades in from the page background, ends on the seabed */
.sea { margin-top: 48px; line-height: 0; }
.sea__svg { display: block; width: 100%; height: 360px; }
.sea__stop-top { stop-color: var(--bg); }
.sea__stop-mid { stop-color: var(--sea-mid); }
.sea__stop-deep { stop-color: var(--sea-deep); }
.sea__stop-ray { stop-color: var(--sea-ray); stop-opacity: 0.16; }
.sea__fish { fill: var(--sea-fish); }
.sea__bubbles { stroke: var(--sea-bubble); stroke-width: 1.5; }
.sea__weed { stroke: var(--sea-weed); stroke-width: 4; }
.sea__stop-rope { stop-color: var(--sea-rope); }
.sea__rope { stroke-width: 3.5; stroke-dasharray: 9 6; }
.sea__anchor { stroke: var(--sea-ink); stroke-width: 2.1; }
.sea__sand { fill: var(--sand); }

.sea__ray { animation: sea-shimmer 9s ease-in-out infinite; transform-origin: top; }
.sea__ray--2 { animation-delay: -3s; }
.sea__ray--3 { animation-delay: -6s; }
.sea__bubble { animation: sea-rise 7s ease-in infinite; }
.sea__bubble--2 { animation-delay: -1.6s; animation-duration: 8s; }
.sea__bubble--3 { animation-delay: -3.1s; animation-duration: 6.5s; }
.sea__bubble--4 { animation-delay: -4.4s; animation-duration: 7.5s; }
.sea__bubble--5 { animation-delay: -5.9s; animation-duration: 9s; }
@keyframes sea-shimmer { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes sea-rise {
	0% { transform: translateY(0); opacity: 0; }
	12% { opacity: 1; }
	100% { transform: translateY(-230px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.sea__ray, .sea__bubble { animation: none; }
}
body:not(.home) .sea { display: none; }

/* Footer: on the home page it is the seabed; elsewhere a plain strip */
.site-footer { border-top: 1px solid var(--line); }
.home .site-footer { border-top: 0; background: var(--sand); color: var(--sand-text); }
.home .site-footer a { color: var(--sand-link); }
.home .site-footer a:hover { color: var(--sand-link-hover); }
.site-footer__inner {
	padding-top: 28px; padding-bottom: 28px;
	display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
	font-size: 14px; color: var(--muted);
}
.home .site-footer__inner { color: inherit; }
.site-footer__inner .mono { font-size: 13px; }

/* Pages, posts, archives (not in the design; kept to the same vocabulary) */
.prose-page { padding-top: 64px; padding-bottom: 96px; }
.prose { font-size: 17px; line-height: 1.65; color: var(--text); max-width: 64ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { letter-spacing: -0.02em; line-height: 1.2; margin-top: 2em; }
.prose h2 { font-size: 26px; } .prose h3 { font-size: 20px; }
.prose pre, .prose code { font-family: var(--mono); font-size: 0.9em; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 16px; overflow-x: auto; }
.prose img { border-radius: 9px; }
.prose blockquote { margin: 0; padding-left: 18px; border-left: 2px solid var(--line); color: var(--muted); }

.entry--summary {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: baseline;
	padding: 22px 0; border-bottom: 1px solid var(--line);
}
.entry__link { display: flex; flex-direction: column; gap: 3px; color: var(--text); }
.entry__link:hover { color: var(--accent); }
.entry__title { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.entry__excerpt { font-size: 15px; line-height: 1.45; color: var(--muted); }
.entry__date { font-size: 13px; color: var(--muted); white-space: nowrap; }

.pagination .nav-links { display: flex; gap: 8px; padding-top: 28px; font-family: var(--mono); font-size: 13px; }
.pagination .page-numbers { padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); }
.pagination .page-numbers.current { color: var(--accent); border-color: var(--accent); }

/* Small screens: the list stacks; logo, body and GitHub pill share the first row, host under the body. */
@media (max-width: 640px) {
	.hero { padding-top: 64px; padding-bottom: 48px; }
	.sea__svg { height: 240px; }
	.project::before { inset: 4px -10px; }
	.projects__list, .projects__list--list .project { grid-template-columns: auto minmax(0, 1fr) auto; }
	.project { row-gap: 8px; }
	.project__logo { grid-row: 1; grid-column: 1; }
	.project__main { grid-row: 1; grid-column: 2; }
	.project__github { grid-row: 1; grid-column: 3; }
	.project__subs { gap: 6px; }
	.project__host { grid-row: 2; grid-column: 2 / 4; text-align: left; }
}
