:root {
  color-scheme: light;
  --page: #f7f8fb;
  --ink: #172033;
  --muted: #5b6475;
  --line: #dfe4ec;
  --surface: #ffffff;
  --surface-soft: #eef2f7;
  --link: #295f9e;
  --green: #376f54;
  --gold: #b98631;
  --root-bg: #1c1a17;
  --root-panel: #2a2723;
  --root-ink: #f7efd9;
  --root-accent: #c9a86a;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 248, 251, 0)),
    var(--page);
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: #173e6f;
}

.page-shell {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 72px 0 36px;
}

.intro {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.intro-copy {
  display: grid;
  gap: 18px;
  padding-top: 6px;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 720px;
}

.intro-copy p {
  margin-bottom: 0;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.profile-links a:hover,
.profile-links a:focus {
  border-color: #b9c4d3;
}

.projects {
  padding-top: 44px;
}

.section-heading {
  max-width: 620px;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.project-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.project-card {
  display: grid;
  position: relative;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
  overflow: hidden;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(23, 32, 51, 0.08);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.project-card::after {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 32px;
  height: 32px;
  color: var(--muted);
  content: "";
  place-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(223, 228, 236, 0.9);
  border-radius: 999px;
  opacity: 0.76;
  transition:
    color 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.project-card::before {
  position: absolute;
  top: 27px;
  right: 27px;
  z-index: 1;
  width: 8px;
  height: 8px;
  color: var(--muted);
  content: "";
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0.76;
  transform: rotate(45deg);
  transition:
    color 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.project-card,
.project-card:hover,
.project-card:focus,
.project-card:visited {
  color: inherit;
  text-decoration: none;
}

.project-card * {
  text-decoration: none;
}

.project-card:hover,
.project-card:focus {
  border-color: #bac5d4;
  box-shadow: 0 22px 58px rgba(23, 32, 51, 0.13);
  transform: translateY(-2px);
}

.project-card:hover::after,
.project-card:focus::after {
  opacity: 1;
  transform: translate(2px, -2px);
}

.project-card:hover::before,
.project-card:focus::before {
  color: var(--ink);
  opacity: 1;
  transform: translate(2px, -2px) rotate(45deg);
}

.project-card:focus-visible {
  outline: 3px solid rgba(41, 95, 158, 0.28);
  outline-offset: 4px;
}

.project-preview {
  min-width: 0;
}

.root-preview {
  display: flex;
  align-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 30%, rgba(70, 100, 59, 0.36), transparent 42%),
    var(--root-bg);
}

.root-plaque {
  padding: 6px;
  background: #fff6df;
  border: 1px solid rgba(201, 168, 106, 0.76);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(120, 70, 40, 0.08);
}

.root-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: clamp(22px, 4vw, 32px);
}

.project-body h3 {
  margin-bottom: 4px;
  font-size: 1.8rem;
  line-height: 1.1;
}

.project-host {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.project-body > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.site-footer {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 26px 0 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}

@media (max-width: 760px) {
  .page-shell {
    padding-top: 44px;
  }

  .intro-grid,
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-preview {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .page-shell,
  .site-footer {
    width: min(100% - 24px, 920px);
  }

  .section-heading h2 {
    font-size: 1.55rem;
  }

}
