:root {
  color-scheme: dark;
  --bg: #151517;
  --text: #dedede;
  --muted: #9a9a9a;
  --rule: #303034;
  --link: #d98bab;
  --link-visited: #b87490;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

main,
.site-header,
.site-footer {
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:visited {
  color: var(--link-visited);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Header */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.5rem;
}

.site-mark {
  font-size: 1.5rem;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 0.4rem;
  margin-right: -0.85rem;
}

.site-header nav a {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border-radius: 2px;
}

.site-header nav a:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Banner — image acts as a tinted background behind the page title card */

.banner {
  position: relative;
  margin-block: 0.5rem 2.5rem;
  border-radius: 2px;
  overflow: hidden;
}

.banner img {
  display: block;
  width: 100%;
  height: clamp(18rem, 38vw, 28rem);
  object-fit: cover;
}

.banner-small img {
  height: clamp(14rem, 28vw, 21rem);
}

.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(24, 18, 43, 0.55),
    rgba(15, 24, 46, 0.45)
  );
}

.banner-text {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.banner-text h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.banner-text p {
  margin: 0.35rem 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
}

/* Projects */

.project {
  display: grid;
  grid-template-columns: minmax(16rem, 26rem) 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 44rem) {
  .project {
    grid-template-columns: 1fr;
  }
}

.project-media img {
  display: block;
  width: 100%;
  border-radius: 2px;
}

.project-links {
  margin: 0.6rem 0 0;
  display: flex;
  gap: 1.25rem;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

.project-text h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.project-fact {
  color: var(--muted);
  font-size: 0.95rem;
  margin-block: 0.4rem;
}

/* Blog */

.post-header h1 {
  margin-bottom: 0.15rem;
  font-size: 1.5rem;
}

.post-header h1 a {
  color: inherit;
  text-decoration: none;
}

.post-header h1 a:hover {
  text-decoration: underline;
}

.post-meta {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.post,
.page-body {
  max-width: 44rem;
}

.comment-link {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

.comments {
  max-width: 44rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.comments h2 {
  font-size: 1.1rem;
  margin-top: 0;
}

.comment {
  margin-block: 1.25rem;
}

.comment-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  margin-bottom: 0.25rem;
}

.comment > p:last-child {
  margin-top: 0;
}

#comment-form {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.35rem;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

#comment-form label {
  color: var(--muted);
}

#comment-form input,
#comment-form textarea {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.5rem 0.6rem;
  font: inherit;
  margin-bottom: 0.75rem;
}

#comment-form input:focus,
#comment-form textarea:focus {
  outline: 1px solid var(--link);
  border-color: var(--link);
}

#comment-form button {
  justify-self: start;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 2px;
  padding: 0.45rem 1.1rem;
  font: inherit;
  cursor: pointer;
}

#comment-form button:hover {
  color: var(--link);
  border-color: var(--link);
}

#comment-form button:disabled {
  opacity: 0.5;
  cursor: default;
}

#comment-form .hp {
  position: absolute;
  left: -9999px;
}

.resume-embed iframe {
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.embed-caption {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2.5rem 3rem;
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}
