/*
Theme Name: Michael Kayser Portfolio
Theme URI: https://michaelkayser.me
Author: Michael Kayser
Description: A custom, lightweight professional portfolio and resume theme built for Michael Kayser. Designed to scale into writing, projects, tools, and additional professional content over time.
Version: 1.0.2
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: michael-kayser-portfolio
*/

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f9;
  --text: #101828;
  --muted: #526072;
  --border: #dbe3ed;
  --accent: #3157d5;
  --accent-2: #17347f;
  --accent-soft: #e9efff;
  --success: #117a55;
  --shadow: 0 18px 50px rgba(24, 39, 75, .09);
  --radius: 22px;
  --max: 1180px;
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #11182b;
  --surface-2: #151f36;
  --text: #f5f7fb;
  --muted: #aab5c7;
  --border: #26334d;
  --accent: #7d9cff;
  --accent-2: #b8c7ff;
  --accent-soft: #17244b;
  --success: #6bd9ae;
  --shadow: 0 18px 55px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--accent-2); }
button, input, textarea, select { font: inherit; }
::selection { background: var(--accent); color: #fff; }

.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 820px); margin-inline: auto; }
.section { padding: 92px 0; }
.section--tight { padding: 58px 0; }
.section--surface { background: var(--surface); border-block: 1px solid var(--border); }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.display { margin: 0; font-size: clamp(2.75rem, 7vw, 6.2rem); line-height: .95; letter-spacing: -.06em; max-width: 12ch; }
.h1 { margin: 0 0 18px; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1; letter-spacing: -.045em; }
.h2 { margin: 0 0 16px; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08; letter-spacing: -.04em; }
.h3 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -.02em; }
.lead { margin: 20px 0 0; max-width: 720px; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); }
.muted { color: var(--muted); }
.kicker { font-size: .95rem; font-weight: 700; color: var(--muted); }

.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus { left: 20px; top: 20px; z-index: 9999; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-weight: 850; letter-spacing: -.03em; font-size: 1.08rem; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: .78rem; letter-spacing: -.05em; }
.brand:hover { color: var(--text); }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.primary-nav a { display: block; padding: 9px 11px; text-decoration: none; color: var(--muted); font-size: .94rem; font-weight: 700; border-radius: 10px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--text); background: var(--surface); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.icon-button:hover { border-color: var(--accent); }
.menu-toggle { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 13px; border: 1px solid transparent; background: var(--text); color: var(--bg); text-decoration: none; font-weight: 800; line-height: 1; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { color: var(--bg); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(25, 40, 80, .14); }
.button--accent { background: var(--accent); color: #fff; }
.button--accent:hover { color: #fff; background: var(--accent-2); }
.button--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.button--ghost:hover { background: var(--surface); color: var(--text); }
.button--small { min-height: 40px; padding-inline: 14px; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.hero { position: relative; overflow: hidden; padding: 96px 0 74px; }
.hero::before { content: ""; position: absolute; inset: -20% auto auto 55%; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 65%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: center; gap: 70px; }
.hero-copy { position: relative; z-index: 2; }
.status { display: inline-flex; align-items: center; gap: 9px; padding: 7px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .85rem; font-weight: 750; margin-bottom: 24px; box-shadow: 0 8px 30px rgba(20, 40, 80, .04); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 14%, transparent); }
.hero-visual { position: relative; min-height: 500px; display: grid; place-items: center; }
.profile-card { position: relative; width: min(100%, 390px); aspect-ratio: .78; border-radius: 32px; background: linear-gradient(145deg, var(--accent-soft), var(--surface)); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; transform: rotate(2deg); }
.profile-card::after { content: ""; position: absolute; inset: auto -15% -25% 10%; height: 60%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 24%, transparent), transparent 68%); }
.profile-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.03); }
.monogram { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(7rem, 18vw, 11rem); font-weight: 900; letter-spacing: -.12em; color: color-mix(in srgb, var(--text) 12%, transparent); user-select: none; }
.profile-label { position: absolute; left: 22px; right: 22px; bottom: 22px; z-index: 2; border-radius: 18px; padding: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); }
.profile-label strong { display: block; font-size: 1.1rem; }
.profile-label span { color: var(--muted); font-size: .9rem; }

.focus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 36px; }
.focus-card { min-height: 210px; padding: 26px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20,40,80,.035); }
.focus-card .index { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 32px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 850; font-size: .82rem; }
.focus-card p { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }

.split { display: grid; grid-template-columns: .75fr 1.25fr; gap: 70px; align-items: start; }
.sticky-label { position: sticky; top: 120px; }
.prose { font-size: 1.07rem; }
.prose p { margin: 0 0 1.25em; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: .4em 0; }
.prose h2, .prose h3 { line-height: 1.15; letter-spacing: -.03em; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.chip { display: inline-flex; padding: 8px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: .86rem; font-weight: 700; }

.credential-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.credential { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.credential strong { display: block; margin-bottom: 5px; }
.credential span { color: var(--muted); font-size: .94rem; }

.page-hero { padding: 82px 0 48px; border-bottom: 1px solid var(--border); }
.page-content { padding: 64px 0 96px; }
.page-content .prose { max-width: 860px; }

.timeline { display: grid; gap: 18px; margin: 34px 0; }
.timeline-item { display: grid; grid-template-columns: 170px 1fr; gap: 28px; padding: 28px 0; border-top: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 1px solid var(--border); }
.timeline-date { color: var(--muted); font-size: .9rem; font-weight: 750; }
.timeline-role { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.timeline-org { color: var(--accent); font-weight: 750; margin: 4px 0 12px; }
.timeline-item ul { margin: 12px 0 0; padding-left: 1.15rem; color: var(--muted); }
.timeline-item li { margin: 7px 0; }

.skill-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 30px; }
.skill-group { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.skill-group h3 { margin-top: 0; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.skill-list span { padding: 7px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: .88rem; }

.resume-top { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 40px; }
.resume-section { margin-top: 34px; }
.resume-section h2 { padding-bottom: 8px; border-bottom: 2px solid var(--text); font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; }
.resume-entry { margin: 22px 0; }
.resume-entry-head { display: flex; justify-content: space-between; gap: 20px; }
.resume-entry h3 { margin: 0; font-size: 1.08rem; }
.resume-entry p { margin: 5px 0 0; color: var(--muted); }
.resume-entry ul { margin: 10px 0 0; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.post-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.post-card a { color: var(--text); text-decoration: none; }
.post-card a:hover { color: var(--accent); }
.post-meta { color: var(--muted); font-size: .85rem; }

.contact-panel { position: relative; overflow: hidden; border-radius: 30px; padding: 48px; background: var(--text); color: var(--bg); }
.contact-panel::after { content:""; position:absolute; width:360px; height:360px; right:-130px; bottom:-180px; border-radius:50%; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.contact-panel .eyebrow { color: color-mix(in srgb, var(--bg) 70%, var(--accent)); }
.contact-panel h2 { margin: 0; max-width: 13ch; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.contact-links { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.contact-links a { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 25%, transparent); }
.contact-links a:hover { color: var(--bg); background: color-mix(in srgb, var(--bg) 10%, transparent); }

.site-footer { padding: 36px 0 44px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

.empty-state { padding: 42px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.wp-block-image img { border-radius: 18px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .primary-nav { display: none; position: absolute; inset: 76px 20px auto 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 12px; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; }
  .primary-nav a { padding: 12px; }
  .menu-toggle { display: grid; }
  .header-contact { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-visual { min-height: 380px; }
  .profile-card { max-width: 330px; }
  .focus-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .sticky-label { position: static; }
  .credential-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .container, .narrow { width: min(calc(100% - 28px), var(--max)); }
  .admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 68px; }
  .primary-nav { inset: 68px 14px auto 14px; }
  .hero { padding: 66px 0 48px; }
  .display { font-size: clamp(2.65rem, 15vw, 4.6rem); }
  .focus-grid, .skill-groups, .post-grid { grid-template-columns: 1fr; }
  .focus-card { min-height: auto; }
  .timeline-item { grid-template-columns: 1fr; gap: 7px; }
  .section { padding: 68px 0; }
  .contact-panel { padding: 32px 24px; border-radius: 24px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .resume-top, .resume-entry-head { display: block; }
  .resume-entry-head span { display: block; margin-top: 5px; color: var(--muted); }
}

@media print {
  .site-header, .site-footer, #contact, .resume-actions, .page-hero .eyebrow { display: none !important; }
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #333; --border: #bbb; }
  body { background: #fff; font-size: 11pt; }
  .page-content { padding: 0; }
  .container, .narrow { width: 100%; }
  .resume-section { break-inside: avoid; }
}
