:root {
  --bg: #f3efe7;
  --bg-accent: radial-gradient(circle at top left, rgba(227, 119, 65, 0.28), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(34, 93, 162, 0.2), transparent 28%),
    linear-gradient(180deg, #f8f4ee 0%, #ece5d8 100%);
  --panel: rgba(255, 252, 246, 0.72);
  --panel-strong: #fffaf2;
  --text: #1d2330;
  --muted: #5f6673;
  --line: rgba(29, 35, 48, 0.12);
  --accent: #d96f2c;
  --accent-dark: #a84d18;
  --deep: #18314f;
  --shadow: 0 20px 60px rgba(24, 49, 79, 0.14);
}

body.night {
  --bg: #11161d;
  --bg-accent: radial-gradient(circle at top left, rgba(221, 126, 75, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(78, 145, 228, 0.18), transparent 26%),
    linear-gradient(180deg, #0f141b 0%, #171f29 100%);
  --panel: rgba(22, 29, 39, 0.72);
  --panel-strong: #17202b;
  --text: #edf2fb;
  --muted: #b2bfd0;
  --line: rgba(237, 242, 251, 0.12);
  --accent: #f28d4d;
  --accent-dark: #ffb07a;
  --deep: #9fd4ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image: var(--bg-accent);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  transition: background 240ms ease, color 240ms ease;
}

a {
  color: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.hero {
  padding-top: 0.5rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
  background: var(--panel-strong);
}

.toplinks {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.toplinks a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.project-card,
.journal-entry,
.contact-panel {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2.25rem;
  border-radius: 2rem;
}

.hero-panel {
  padding: 1.5rem;
  border-radius: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.eyebrow,
.panel-kicker,
.section-tag,
.project-type,
.journal-date,
.status-label {
  font-family: "Manrope", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
}

.eyebrow,
.section-tag,
.project-type,
.journal-date {
  color: var(--accent);
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.7rem, 5vw, 5.5rem);
  line-height: 0.95;
  margin-bottom: 1.2rem;
  max-width: 10ch;
}

.lede {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions,
.contact-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button {
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  text-decoration: none;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.button-secondary {
  background: var(--panel-strong);
  color: var(--text);
}

.signal-list {
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.signal-list li + li {
  margin-top: 0.75rem;
}

.status-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.status-dot {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #29c272, #0d8f4e);
  box-shadow: 0 0 0 0.35rem rgba(41, 194, 114, 0.14);
}

.status-copy,
.contact-panel p,
.card p,
.project-card p,
.journal-entry p,
.detail-body p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-body h2,
.detail-body h3,
.detail-body ul,
.detail-body ol,
.detail-body blockquote {
  margin-top: 1.25rem;
  margin-bottom: 0.9rem;
}

.detail-body ul,
.detail-body ol {
  color: var(--muted);
  padding-left: 1.4rem;
  line-height: 1.7;
}

.detail-body a {
  color: var(--accent);
}

.detail-body blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.detail-body img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1.4rem 0 1.6rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--panel-strong);
}

.detail-body p:has(img) {
  margin-bottom: 0;
}

.section {
  margin-top: 1.75rem;
}

.section-heading {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 0;
}

.section-heading .section-tag {
  margin-bottom: 0;
}

.intro-grid,
.projects-grid,
.journal-list {
  display: grid;
  gap: 1rem;
}

.intro-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.project-card,
.journal-entry,
.contact-panel,
.detail-card {
  padding: 1.4rem;
  border-radius: 1.4rem;
}

.card h3,
.project-card h3,
.journal-entry h3 {
  margin-bottom: 0.7rem;
}

.project-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
  margin-bottom: 0;
}

.project-meta li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.project-card,
.journal-entry {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card p:last-of-type,
.journal-entry p:last-of-type {
  margin-top: auto;
}

.journal-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.journal-list-stacked {
  grid-template-columns: 1fr;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: center;
}

.contact-links a {
  text-decoration: none;
  font-weight: 700;
}

.hero-compact {
  padding-top: 0.5rem;
}

.page-hero {
  padding: 2rem 0 0.5rem;
}

.detail-card {
  max-width: 860px;
  margin: 0 auto;
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-body {
  margin: 1.5rem 0 2rem;
}

.inline-link-button {
  display: inline-flex;
  margin-top: 0.5rem;
}

.section-footer-link {
  margin: 0.9rem 0 0;
}

.section-footer-link a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 980px) {
  .hero-grid,
  .intro-grid,
  .contact-panel,
  .journal-list,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 1rem, 100%);
  }

  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy,
  .hero-panel,
  .card,
  .project-card,
  .journal-entry,
  .contact-panel {
    border-radius: 1.2rem;
  }

  h1 {
    max-width: 12ch;
  }
}
