/* matthias-ernst.ch — personal CV, design system shared with ernstconte.ch */

:root {
	--ink: #1a1a2e;
	--ink-soft: #2d2d4e;
	--accent: #3b5cc6;
	--accent-soft: #6b8aff;
	--body: #444;
	--muted: #666;
	--faint: #888;
	--line: #eee;
	--line-strong: #e0e0e8;
	--bg-alt: #f8f9fb;
	--bg-chip: #f0f0f5;
	--radius: 12px;
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	font-family: var(--font-sans);
	color: var(--ink);
	background: #fff;
	line-height: 1.65;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.t-container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 2rem;
}

/* Skip link */
.t-skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	z-index: 9999;
	background: #fff;
	color: var(--ink);
	padding: 0.5rem 1.5rem;
	border: 2px solid var(--accent);
	border-radius: 4px;
	font-weight: 600;
}
.t-skip-link:focus { left: 1rem; top: 1rem; }

/* Nav */
.t-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 100;
	background: rgba(255,255,255,0.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(0,0,0,0.06);
}
.t-nav-inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}
.t-nav-logo {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--ink);
}
.t-nav-logo span { color: var(--accent); }
.t-nav-links {
	display: flex;
	align-items: center;
	gap: 2rem;
}
.t-nav-links a:not(.t-btn) {
	font-size: 0.9rem;
	color: #555;
	transition: color 0.2s;
}
.t-nav-links a:not(.t-btn):hover { color: var(--ink); }

/* Buttons */
.t-btn {
	display: inline-block;
	padding: 0.7rem 1.6rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	transition: all 0.2s;
	cursor: pointer;
	border: 2px solid transparent;
	text-align: center;
}
.t-btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.t-btn-primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.t-btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.t-btn-outline:hover { background: var(--ink); color: #fff; }
.t-btn-sm { padding: 0.45rem 1.1rem; font-size: 0.82rem; }
.t-btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* Badges, tags, pills */
.t-badge {
	display: inline-block;
	padding: 0.3rem 0.9rem;
	border-radius: 50px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	background: #e8e8f0;
	color: #555;
	margin-bottom: 1.2rem;
}
.t-badge-light { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }
.t-tag {
	display: inline-block;
	padding: 0.2rem 0.7rem;
	border-radius: 4px;
	font-size: 0.78rem;
	font-weight: 600;
	background: var(--bg-chip);
	color: var(--muted);
}
.t-pill-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	list-style: none;
}
.t-pill-row li {
	padding: 0.4rem 1rem;
	background: #fff;
	border: 1px solid var(--line-strong);
	border-radius: 50px;
	font-size: 0.88rem;
	color: #555;
}

/* Kicker — mono section label */
.cv-kicker {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 0.8rem;
}

/* Sections */
.t-section { padding: 5rem 0; }
.t-section-alt { background: var(--bg-alt); }
.t-section-dark { background: var(--ink); color: #e0e0e8; }
.t-section-dark h2, .t-section-dark h3 { color: #fff; }
.t-section-header { max-width: 640px; margin: 0 0 3rem; }
.t-section-header h2 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 0.6rem;
	color: var(--ink);
	letter-spacing: -0.01em;
}
.t-section-header p { color: var(--muted); font-size: 1.1rem; }

/* Hero */
.cv-hero {
	padding: 10rem 0 6rem;
	background: linear-gradient(165deg, #f8f9fb 0%, #fff 50%, #f0f1f8 100%);
	overflow: hidden;
}
.cv-hero-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 4rem;
	align-items: center;
}
.cv-hero h1 {
	font-size: 3.2rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin-bottom: 1.2rem;
}
.cv-hero-sub {
	font-size: 1.15rem;
	color: #555;
	line-height: 1.7;
	margin-bottom: 2rem;
	max-width: 560px;
}
.cv-hero-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 2rem;
}
.cv-hero-meta {
	font-size: 0.85rem;
	color: var(--faint);
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
}
.cv-hero-meta .dot { color: var(--line-strong); }

/* Hero photo */
.cv-photo {
	max-width: 300px;
	justify-self: end;
}
.cv-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: top;
	border-radius: var(--radius);
	box-shadow: 0 20px 60px rgba(26,26,46,0.18);
}

/* Load-in reveal (hero only) */
@media (prefers-reduced-motion: no-preference) {
	.cv-reveal {
		opacity: 0;
		transform: translateY(14px);
		animation: cv-rise 0.6s ease-out forwards;
	}
	.cv-reveal-1 { animation-delay: 0.05s; }
	.cv-reveal-2 { animation-delay: 0.15s; }
	.cv-reveal-3 { animation-delay: 0.25s; }
	.cv-reveal-4 { animation-delay: 0.35s; }
	@keyframes cv-rise {
		to { opacity: 1; transform: translateY(0); }
	}
}

/* Social icon links */
.cv-social {
	display: flex;
	gap: 1.2rem;
	margin-top: 1.6rem;
}
.cv-social a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.88rem;
	color: #555;
	transition: color 0.2s;
}
.cv-social a:hover { color: var(--accent); }
.cv-social svg { width: 18px; height: 18px; fill: currentColor; }

/* About + at-a-glance */
.cv-about-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 3rem;
	align-items: start;
}
.cv-prose p { color: var(--body); line-height: 1.75; margin-bottom: 1rem; }
.cv-prose p:last-child { margin-bottom: 0; }
.cv-prose a { color: var(--accent); }
.cv-prose a:hover { text-decoration: underline; }
.cv-glance {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.6rem 1.8rem;
	background: #fff;
}
.cv-glance h3 {
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 0.8rem;
}
.cv-glance table { width: 100%; border-collapse: collapse; }
.cv-glance tr { border-bottom: 1px solid var(--bg-chip); }
.cv-glance tr:last-child { border-bottom: none; }
.cv-glance td { padding: 0.6rem 0; font-size: 0.88rem; vertical-align: top; }
.cv-glance td:first-child {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--faint);
	width: 38%;
	padding-right: 0.8rem;
	padding-top: 0.75rem;
}
.cv-glance td:last-child { color: var(--body); }
.cv-glance a { color: var(--accent); }
.cv-glance a:hover { text-decoration: underline; }

/* Skill cards */
.t-features-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}
.t-feature-card {
	padding: 2rem;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: #fff;
	transition: box-shadow 0.25s, transform 0.25s;
}
.t-feature-card:hover {
	box-shadow: 0 8px 30px rgba(0,0,0,0.06);
	transform: translateY(-2px);
}
.t-feature-icon {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: #f0f0f8;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
	margin-bottom: 1.2rem;
}
.t-feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.t-feature-card h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
}
.t-feature-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* Skill tag groups */
.cv-skill-groups {
	margin-top: 2.5rem;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem 2.5rem;
}
.cv-skill-group h3 {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 0.7rem;
}
.cv-skill-group ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	list-style: none;
}
.cv-skill-group li {
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	font-size: 0.82rem;
	font-weight: 500;
	background: #fff;
	border: 1px solid var(--line-strong);
	color: #555;
}

/* Experience timeline */
.cv-timeline {
	list-style: none;
	position: relative;
	max-width: 860px;
}
.cv-timeline::before {
	content: "";
	position: absolute;
	top: 0.5rem;
	bottom: 0.5rem;
	left: 0.35rem;
	width: 2px;
	background: var(--line-strong);
}
.cv-timeline li {
	position: relative;
	padding: 0 0 2.8rem 2.2rem;
}
.cv-timeline li:last-child { padding-bottom: 0; }
.cv-timeline li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5rem;
	width: 0.8rem;
	height: 0.8rem;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--accent);
}
.cv-period {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.05em;
	color: var(--accent);
	display: block;
	margin-bottom: 0.25rem;
}
.cv-timeline h3 {
	font-size: 1.15rem;
	font-weight: 700;
	margin-bottom: 0.1rem;
}
.cv-place {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 0.5rem;
}
.cv-timeline p { font-size: 0.95rem; color: var(--body); line-height: 1.7; max-width: 720px; }

/* Dark company callout */
.t-product-callout {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
}
.t-product-callout h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.t-product-callout p {
	color: rgba(255,255,255,0.7);
	font-size: 1.05rem;
	line-height: 1.7;
	margin-bottom: 2rem;
}
.t-product-callout p a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.t-section-dark .t-btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.t-section-dark .t-btn-primary:hover { background: #e0e0e8; border-color: #e0e0e8; }

/* Education cards */
.cv-edu-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}
.cv-edu-card {
	padding: 1.8rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}
.cv-edu-card h3 { font-size: 1rem; font-weight: 700; margin: 0.3rem 0 0.15rem; }
.cv-edu-school { font-size: 0.88rem; font-weight: 600; color: var(--muted); margin-bottom: 0.5rem; }
.cv-edu-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* FAQ */
.cv-faq { max-width: 760px; }
.cv-faq h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 2rem 0 0.4rem;
}
.cv-faq h3:first-of-type { margin-top: 0; }
.cv-faq p { color: var(--body); line-height: 1.75; }
.cv-faq a { color: var(--accent); }
.cv-faq a:hover { text-decoration: underline; }
.cv-faq-more { margin-top: 2.2rem; font-size: 0.95rem; }

/* Contact */
.t-contact-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 3rem;
	align-items: start;
}
.t-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.t-form-field { grid-column: 1 / -1; }
.t-form-field.t-form-half { grid-column: auto; }
.t-form-field label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink);
	margin-bottom: 0.4rem;
}
.t-form-field input,
.t-form-field textarea {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 0.9rem;
	font-family: inherit;
	background: #fff;
	color: var(--ink);
	transition: border-color 0.2s;
}
.t-form-field input:focus,
.t-form-field textarea:focus {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-color: var(--accent);
}
.t-form-field textarea { resize: vertical; }
.t-contact-form-wrap .t-btn { margin-top: 1rem; }
.t-contact-info { display: flex; flex-direction: column; gap: 2rem; }
.t-contact-block h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.t-contact-block p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.t-contact-block a { color: var(--accent); transition: color 0.2s; }
.t-contact-block a:hover { color: var(--ink); }
.t-contact-block .cv-social { margin-top: 0.5rem; }

/* Footer */
.t-footer { padding: 2rem 0; border-top: 1px solid var(--line); }
.t-footer-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	font-size: 0.82rem;
	color: #999;
	flex-wrap: wrap;
}
.t-footer-inner a { color: var(--muted); transition: color 0.2s; }
.t-footer-inner a:hover { color: var(--ink); }

/* FAQ standalone page */
.cv-page { padding: 9rem 0 4rem; }
.cv-page .t-back-link,
.cv-page .cv-page-header,
.cv-page .cv-faq,
.cv-page .cv-author {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}
.cv-page-header { margin-bottom: 2.5rem; }
.cv-page-header h1 {
	font-size: 2.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin-bottom: 0.6rem;
}
.cv-page-header p { color: var(--muted); font-size: 1.05rem; }
.t-back-link { margin-bottom: 2rem; font-size: 0.9rem; }
.t-back-link a { color: var(--faint); transition: color 0.2s; }
.t-back-link a:hover { color: var(--ink); }

/* Author box on FAQ page */
.cv-author {
	max-width: 760px;
	margin-top: 3.5rem;
	padding: 1.8rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	display: flex;
	gap: 1.4rem;
	align-items: center;
	background: var(--bg-alt);
}
.cv-author img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	flex-shrink: 0;
}
.cv-author h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.cv-author p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.cv-author a { color: var(--accent); }
.cv-author a:hover { text-decoration: underline; }

/* Responsive */
@media screen and (max-width: 900px) {
	.cv-hero-grid { grid-template-columns: 1fr; gap: 3rem; }
	.cv-photo { justify-self: start; max-width: 240px; }
	.cv-about-grid { grid-template-columns: 1fr; }
}
@media screen and (max-width: 768px) {
	.cv-hero { padding: 8rem 0 4rem; }
	.cv-hero h1 { font-size: 2.4rem; }
	.t-section { padding: 3.5rem 0; }
	.t-features-grid { grid-template-columns: 1fr; }
	.cv-skill-groups { grid-template-columns: 1fr; }
	.cv-edu-grid { grid-template-columns: 1fr; }
	.t-contact-grid { grid-template-columns: 1fr; }
	.t-form-fields { grid-template-columns: 1fr; }
	.t-form-field.t-form-half { grid-column: 1 / -1; }
	.t-nav-links a:not(.t-btn) { display: none; }
	.cv-author { flex-direction: row; }
}
@media screen and (max-width: 480px) {
	.cv-hero h1 { font-size: 2rem; }
	.cv-hero-sub { font-size: 1rem; }
	.cv-hero-actions { flex-direction: column; }
	.cv-hero-actions .t-btn { width: 100%; }
	.cv-author { flex-direction: column; align-items: flex-start; }
}

/* Print — the page doubles as a CV */
@media print {
	.t-nav, .cv-hero-actions, .cv-social, #contact, .t-footer, .cv-faq-more, #faq, .t-section-dark { display: none !important; }
	.cv-hero { padding: 1rem 0; background: none; }
	.t-section { padding: 1.2rem 0; }
	body { font-size: 12px; }
	.cv-photo { max-width: 120px; }
	.cv-photo img { box-shadow: none; }
	.cv-timeline li { padding-bottom: 1.2rem; }
}
