/* Modern design for nutritionmodels.com/tedeschi (proposal, 2026-10-16).
   One stylesheet for every page of the tedeschi folder once converted.
   System fonts only: nothing is fetched from other servers. */

:root {
	--bg: #fbfaf7;
	--surface: #ffffff;
	--ink: #1f2420;
	--ink-soft: #5a625c;
	--line: #e3e0d8;
	--accent: #1f6b3a;        /* the site's old #006600, softened */
	--accent-2: #b4502d;      /* terracotta, as in the mini memoir */
	--accent-wash: #eaf2ec;
	--shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
	--serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
	--sans: Bahnschrift, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
	--measure: 70ch;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #141715; --surface: #1c201d; --ink: #e8ebe7; --ink-soft: #a6ada7;
		--line: #2e342f; --accent: #7cc494; --accent-2: #e08a64; --accent-wash: #1f2b23;
		--shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #141715; --surface: #1c201d; --ink: #e8ebe7; --ink-soft: #a6ada7;
	--line: #2e342f; --accent: #7cc494; --accent-2: #e08a64; --accent-wash: #1f2b23;
	--shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 18px/1.65 var(--serif);
	-webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }

/* ---------- top bar ---------- */
.topbar {
	position: sticky; top: 0; z-index: 20;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}
.topbar .inner {
	max-width: 1180px; margin: 0 auto; padding: 10px 20px;
	display: flex; align-items: center; gap: 24px;
	font-family: var(--sans);
}
.brand { font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
.brand span.first { color: var(--ink); }
.nav { display: flex; gap: 4px; overflow-x: auto; margin-left: auto; min-width: 0; scrollbar-width: none; }
@media (max-width: 600px) {
	.topbar .inner { gap: 10px; padding: 8px 16px; }
	.brand { font-size: 15px; }
	.brand .first { display: none; }
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
	padding: 6px 12px; border-radius: 999px; font-size: 15px;
	color: var(--ink-soft); text-decoration: none; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--accent-wash); color: var(--accent); }
.theme-toggle {
	border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
	border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 16px; flex: none;
}

/* ---------- hero ---------- */
.hero {
	position: relative; min-height: min(62vh, 620px); display: flex; align-items: flex-end;
	background: #222 center/cover no-repeat;
	color: #fff;
}
.hero::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.65) 100%);
}
.hero .inner { position: relative; z-index: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 48px 20px; }
.hero .kicker { font: 600 13px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.hero h1 { font: 600 clamp(32px, 5.4vw, 60px)/1.08 var(--sans); margin: 12px 0 14px; max-width: 18ch; }
.hero p { font-size: clamp(17px, 2vw, 21px); max-width: 52ch; margin: 0; opacity: .95; }
.hero .hero-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero .button { background: #fff; color: #1f2420; }
.hero .button:hover { background: var(--accent-2); color: #fff; }
.hero .button.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.8); }
.hero .credit { position: absolute; right: 20px; bottom: 12px; z-index: 1; font: 12px var(--sans); opacity: .7; }

/* ---------- timeline ---------- */
.timeline {
	max-width: 1180px; margin: 0 auto; padding: 28px 20px 8px;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0;
	font-family: var(--sans);
}
.timeline a {
	display: block; padding: 12px 14px 12px 0; text-decoration: none; color: var(--ink);
	border-top: 3px solid var(--line);
}
.timeline a:hover { border-top-color: var(--accent); }
.timeline b { display: block; font-size: 22px; color: var(--accent); }
.timeline span { font-size: 14px; color: var(--ink-soft); line-height: 1.35; display: block; }

/* ---------- chapters ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 20px 40px; }
.chapter { padding: 56px 0 24px; border-bottom: 1px solid var(--line); }
.chapter:last-of-type { border-bottom: 0; }
.chapter > header { max-width: var(--measure); margin-bottom: 20px; }
.chapter .num { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.chapter h2 { font: 600 clamp(26px, 3.4vw, 38px)/1.15 var(--sans); margin: 8px 0 0; }
.chapter h3 { font: 600 22px/1.3 var(--sans); margin: 36px 0 8px; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1em; }
.lede { font-size: 21px; color: var(--ink-soft); }

/* text + photo side by side on wide screens */
.split { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); gap: 40px; align-items: start; }
.split > .side { position: sticky; top: 84px; display: grid; gap: 20px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split > .side { position: static; } }

figure { margin: 0; }
figure img {
	display: block; width: 100%; border-radius: 10px; box-shadow: var(--shadow);
	cursor: zoom-in; background: var(--line);
}
figcaption { font: 14px/1.4 var(--sans); color: var(--ink-soft); margin-top: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin: 24px 0; align-items: start; }
.gallery.tall img { aspect-ratio: 3/4; object-fit: cover; }
.gallery.even img { aspect-ratio: 4/3; object-fit: cover; }

.pull {
	max-width: var(--measure); margin: 32px 0; padding: 4px 0 4px 22px;
	border-left: 4px solid var(--accent-2);
	font: italic 600 clamp(21px, 2.6vw, 27px)/1.35 var(--serif); color: var(--ink);
}
.quote { max-width: var(--measure); margin: 24px 0; padding: 20px 24px; background: var(--accent-wash); border-radius: 10px; font-style: italic; }
.quote cite { display: block; font: normal 14px var(--sans); color: var(--ink-soft); margin-top: 8px; }

.rules { max-width: var(--measure); counter-reset: r; list-style: none; padding: 0; margin: 16px 0 24px; }
.rules li { counter-increment: r; position: relative; padding: 12px 0 12px 52px; border-top: 1px solid var(--line); }
.rules li::before {
	content: counter(r); position: absolute; left: 0; top: 10px;
	width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--bg);
	font: 600 16px/34px var(--sans); text-align: center;
}
.note { font: 14px/1.5 var(--sans); color: var(--ink-soft); }

/* ---------- interests ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 32px; }
.cards a {
	display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
	text-decoration: none; color: var(--ink); font: 600 15px var(--sans); text-align: center;
	transition: transform .15s, box-shadow .15s;
}
.cards a:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--accent); }
.cards img { width: 44px; height: 44px; object-fit: contain; }
.interest { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.interest > img { width: 56px; height: 56px; object-fit: contain; }
.interest h3 { margin: 0 0 8px; }
.interest .body { min-width: 0; }
.interest .body > .split { gap: 28px; }
.more { font: 600 15px var(--sans); }
.links { font-size: 16px; color: var(--ink-soft); }
@media (max-width: 600px) {
	body { font-size: 17px; }
	.interest { grid-template-columns: 1fr; gap: 8px; }
	.interest > img { width: 40px; height: 40px; }
	.hero { min-height: min(70vh, 560px); }
	main, .timeline { padding-left: 16px; padding-right: 16px; }
	.hero .inner { padding: 32px 16px; }
}

/* ---------- inner pages ----------
   <main class="page"> holds an inner page. Its first child is usually
   <header class="page-head"> with .num (kicker), <h1> and an optional .lede.
   Sections inside are <section class="chapter"> with <h2>, as on the home page. */
.page-head { padding: 48px 0 8px; max-width: var(--measure); }
.page-head .num { font: 600 13px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.page-head h1 { font: 600 clamp(30px, 4.4vw, 48px)/1.1 var(--sans); margin: 8px 0 12px; }
.page-head .lede { margin: 0; }
.banner { margin: 8px 0 8px; }
.banner img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow); }
main.page .chapter:first-of-type { padding-top: 32px; }
main.page h2 { font: 600 clamp(24px, 3vw, 32px)/1.2 var(--sans); }
main.page h4 { font: 600 18px/1.3 var(--sans); margin: 24px 0 6px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }

/* plain link lists (links, journals, books) */
.linklist { list-style: none; padding: 0; margin: 12px 0 24px; max-width: var(--measure); }
.linklist li { padding: 10px 0; border-top: 1px solid var(--line); }
.linklist li small { display: block; color: var(--ink-soft); font: 14px/1.45 var(--sans); }
.columns { columns: 2 280px; column-gap: 40px; }
.columns > * { break-inside: avoid; }

/* tables */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; }
table.data { border-collapse: collapse; width: 100%; font: 15px/1.45 var(--sans); }
table.data th, table.data td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
table.data th { color: var(--ink-soft); font-weight: 600; background: var(--accent-wash); }

/* video and other embeds, 16:9 */
.embed { position: relative; max-width: 860px; aspect-ratio: 16 / 9; margin: 16px 0 24px; }
.embed iframe, .embed video, .embed object { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
audio { width: 100%; max-width: 520px; }

/* notices: something no longer works, under construction, etc. */
.notice { max-width: var(--measure); margin: 16px 0; padding: 14px 18px; border-radius: 10px; background: var(--accent-wash); border-left: 4px solid var(--accent-2); font: 15px/1.5 var(--sans); }

/* small cards with a title and a line of text (models, profiles) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 16px 0 28px; }
.tiles > * { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.tiles h4 { margin: 0 0 6px; font: 600 17px/1.3 var(--sans); }
.tiles p { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink-soft); }
.tiles a.tile { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
.tiles a.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tiles a.tile h4 { color: var(--accent); }

/* buttons, forms */
.button, button.button, input[type=submit] {
	display: inline-block; padding: 9px 18px; border-radius: 999px; border: 0; cursor: pointer;
	background: var(--accent); color: var(--bg); font: 600 15px var(--sans); text-decoration: none;
}
.button:hover { background: var(--accent-2); color: var(--bg); }
input[type=text], input[type=email], textarea, select {
	font: 16px var(--sans); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
	background: var(--surface); color: var(--ink); width: 100%; max-width: 520px;
}
label { font: 600 14px var(--sans); display: block; margin: 12px 0 4px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); font: 14px/1.5 var(--sans); color: var(--ink-soft); }
.site-footer .inner { max-width: 1180px; margin: 0 auto; padding: 24px 20px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }

/* ---------- lightbox ---------- */
.lightbox {
	position: fixed; inset: 0; z-index: 50; display: none; place-items: center;
	background: rgba(0,0,0,.88); padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 86vh; width: auto; border-radius: 6px; }
.lightbox p { color: #ddd; font: 15px var(--sans); text-align: center; margin: 12px 0 0; }
