:root {
  --ink: #171717;
  --muted: #5f6468;
  --paper: #ffffff;
  --line: #d9dddf;
  --accent: #145f55;
  --accent-warm: #984b39;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

img {
  max-width: 100%;
}

p {
  margin-top: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 4px;
}

a:hover {
  color: var(--accent-warm);
}

/* Navigation */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 18px clamp(20px, 5vw, 64px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.logo {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.1;
  font-weight: 500;
}

.logo a,
.navbar a {
  color: var(--ink);
  text-decoration: none;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px clamp(14px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar a {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
}

.navbar a:hover,
.navbar a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

/* Shared layout */

main {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 84px) 0 clamp(64px, 8vw, 104px);
  flex: 1;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: clamp(24px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
}

.page-header h1,
.home-heading h1,
main > h1 {
  margin: 0;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 8vw, 76px);
  line-height: 0.98;
  font-weight: 500;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-warm);
  font-size: 14px;
  font-weight: 700;
}

.lede {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.45;
}

.section-block {
  padding: clamp(34px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.section-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.section-block h2,
.section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 500;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  color: var(--accent);
}

/* Home page */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end;
  gap: clamp(28px, 6vw, 72px);
  padding-bottom: clamp(34px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
}

.home-image {
  margin: 0;
}

.home-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
}

.about {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(24px, 5vw, 64px);
}

.about-text {
  max-width: 760px;
  font-size: 17px;
}

.about-text p {
  margin-bottom: 18px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Portfolio */

.project-list {
  margin-top: clamp(34px, 5vw, 56px);
}

.project {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
  padding: clamp(24px, 4vw, 42px) 0;
  border-bottom: 1px solid var(--line);
}

.project:first-child {
  padding-top: 0;
}

.item-link {
  display: block;
}

.project-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-details p {
  margin: 0;
}

.project-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.05;
}

.project-description {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
}

.project-cta {
  width: fit-content;
  margin-top: 10px;
  font-weight: 700;
  text-decoration-thickness: 2px;
}

/* Resume */

.resume {
  margin-top: clamp(34px, 5vw, 56px);
}

.section {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 0.72fr);
  gap: clamp(22px, 5vw, 64px);
  padding: clamp(26px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}

.section:first-child {
  padding-top: 0;
}

.section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.entry {
  margin-bottom: 26px;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-title {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.entry p {
  color: var(--muted);
}

.course-list,
.resume-list {
  margin: 0;
  padding-left: 20px;
}

.course-list li,
.resume-list li {
  margin-bottom: 8px;
}

.course-list li:last-child,
.resume-list li:last-child {
  margin-bottom: 0;
}

/* Contact */

.contact-form {
  width: min(620px, 100%);
  margin-top: clamp(34px, 5vw, 56px);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  margin-bottom: 24px;
  padding: 12px 0;
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

textarea {
  min-height: 132px;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 0;
}

::placeholder {
  color: #8a8f93;
}

/* Simple pages */

.empty-page {
  width: min(620px, 100%);
  margin-top: clamp(34px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 18px;
}

/* Footer */

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 58px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 780px) {
  .navbar,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-list {
    justify-content: flex-start;
  }

  .home-hero,
  .about,
  .project,
  .section {
    grid-template-columns: 1fr;
  }

  .home-hero {
    align-items: start;
  }

  .home-image img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 480px) {
  main {
    width: min(var(--max-width), calc(100% - 28px));
  }

  .navbar {
    padding-inline: 14px;
  }

  .nav-list {
    gap: 7px 14px;
  }
}
