:root {
  --text: #111;
  --muted: #666;
  --line: #d9d9d9;
  --page: #fff;
  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.55;
  font-size: 15px;
}

a {
  color: inherit;
}

main {
  width: min(100% - 48px, var(--max-width));
  margin: 0 auto;
  padding: 72px 0;
}

body main {
  padding: 0;
}

/* Header */

body header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

body header.human {
  display: block;
  padding-bottom: 40px;
}

.logo {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

/* Typography */

h1 {
  margin: 0 0 8px;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin: 0;
  color: var(--text);
}

ul {
  margin: 10px 0 0;
  padding-left: 19px;
}

li {
  margin: 5px 0;
  color: var(--text);
}

/* Buttons */

.button {
  display: inline-block;
  padding: 11px 17px;
  border: 1px solid var(--text);
  background: var(--text);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.button:hover {
  opacity: 0.78;
}

/* Hero */

.hero {
  width: 100%;
  padding: 105px 0 95px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  width: 100%;
  margin: 0;
  font-size: clamp(48px, 8vw, 86px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.055em;
}

.hero p {
  width: 100%;
  max-width: 720px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

/* General Sections */

/*
 * Resume-style sections use a two-column layout:
 * label on the left, content on the right.
 */
section {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}

body section {
  padding: 38px 0;
}

body.welcome section {
  padding: 52px 0;
}

/* Resume subsection headings */

section > div > h3 {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

section > div > h3:not(:first-child) {
  margin-top: 48px;
}

/* Intro */

.intro {
  max-width: 650px;
}

.intro p {
  margin: 0 0 18px;
  font-size: 16px;
}

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

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 30px;
  background: var(--line);
  border: 1px solid var(--line);
}

.feature {
  padding: 24px;
  background: var(--page);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.feature p {
  color: var(--muted);
  font-size: 14px;
}

/* =========================================================
   Shared List Pages
   Humans, Educations, and similar full-width lists
   ========================================================= */

/*
 * Override the generic section grid.
 * These sections should use the entire content width.
 */
#humans,
#educations {
  display: block;
  width: 100%;
  grid-template-columns: none;
  gap: 0;
}

#humans > div,
#educations > div {
  width: 100%;
  max-width: none;
}

/* =========================================================
   Humans
   ========================================================= */

.human-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.human-link:first-child {
  border-top: 1px solid var(--line);
}

.human-link > div {
  min-width: 0;
}

.human-link:hover .human-name {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.human-name {
  font-size: 16px;
  font-weight: 600;
}

.human-title {
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.human-url {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* =========================================================
   Educations
   ========================================================= */

.education-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.education-link:first-child {
  border-top: 1px solid var(--line);
}

/*
 * Education information:
 *
 * School
 * Degree
 * Start date – End date
 */
.education-link > a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.education-link > a:hover .human-name {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.education-link .human-name {
  font-size: 16px;
  font-weight: 600;
}

.education-link .human-title {
  margin-left: 0;
  color: var(--muted);
  font-size: 14px;
}

.education-link .human-url {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

/* Education Edit / Delete */

.education-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.education-actions a {
  color: inherit;
  text-decoration: none;
}

.education-actions a:hover {
  color: var(--text);
  text-decoration: underline;
}

.education-actions form {
  margin: 0;
}

.education-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.education-actions button:hover {
  color: var(--text);
  text-decoration: underline;
}

/* =========================================================
   Education Form
   ========================================================= */

.education-form {
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.education-form-header {
  margin-bottom: 24px;
}

.education-form-header h2 {
  margin-bottom: 8px;
}

.education-form-header p {
  color: var(--muted);
  font-size: 14px;
}

.education-form-fields {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 700px;
}

.education-field {
  flex: 1;
}

.education-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.education-field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  outline: none;
  background: var(--page);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.education-field input:focus {
  border-color: var(--text);
}

.education-field input::placeholder {
  color: #999;
}

/* =========================================================
   Authentication
   ========================================================= */

.auth-form {
  max-width: 560px;
  margin: 0 auto;
  padding: 65px 0;
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-header h2 {
  margin-bottom: 8px;
}

.auth-form-header p {
  color: var(--muted);
  font-size: 14px;
}

.auth-form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-field input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  outline: none;
  background: var(--page);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.auth-field input:focus {
  border-color: var(--text);
}

.auth-field input::placeholder {
  color: #999;
}

.auth-form .button {
  align-self: flex-start;
  margin-top: 4px;
}

/* =========================================================
   CTA
   ========================================================= */

.cta {
  padding: 65px 0;
  border-top: 1px solid var(--text);
}

.cta h2 {
  margin-bottom: 14px;
}

.cta p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.cta .actions {
  margin-top: 28px;
}

/* =========================================================
   Site Home
   ========================================================= */

.site-home {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 10;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-home:hover {
  text-decoration: underline;
}

/* =========================================================
   Resume Entries
   ========================================================= */

.entry {
  margin-bottom: 34px;
}

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

.entry-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 3px;
}

.date {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.organization {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.publication {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   Contact
   ========================================================= */

.headline {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

/* =========================================================
   Footer
   ========================================================= */

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 45px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

  main {
    width: min(100% - 32px, var(--max-width));
  }

  body header {
    padding: 20px 0;
  }

  nav {
    gap: 14px;
  }

  .hero {
    padding: 70px 0 65px;
  }

  /*
   * Resume sections become single-column.
   * Full-width list sections remain full-width.
   */
  section {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  body section {
    padding: 38px 0;
  }

  .features {
    grid-template-columns: 1fr;
  }

  /* Humans */

  .human-link {
    display: block;
  }

  .human-title {
    display: block;
    margin: 4px 0 0;
  }

  .human-url {
    display: block;
    margin-top: 5px;
  }

  /* Educations */

  .education-link {
    display: block;
  }

  .education-link > a {
    display: flex;
    flex-direction: column;
  }

  .education-actions {
    margin-top: 10px;
    margin-left: 0;
  }

  /* Education form */

  .education-form-fields {
    display: block;
  }

  .education-form .button {
    margin-top: 12px;
  }

  /* Resume entries */

  .entry-header {
    display: block;
  }

  .date {
    display: block;
    margin-top: 4px;
  }

  /* Site home */

  .site-home {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 10px;
    background: #f3f3f3;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
  }

  .site-home:hover {
    background: #e9e9e9;
    text-decoration: none;
  }

  /* Footer */

  footer {
    display: block;
  }

  footer span {
    display: block;
    margin-bottom: 8px;
  }
}

/* =========================================================
   Print
   ========================================================= */

@media print {

  body nav,
  body .actions,
  body .cta {
    display: none;
  }

  body {
    font-size: 11px;
  }

  body main {
    width: 100%;
  }
}
