/* ==========================================================================
   Andrew K. Atwell — site-wide styles
   Fonts: Cormorant Garamond (headers) + EB Garamond (body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --color-bg: #faf7f1;
  --color-text: #2b2724;
  --color-text-muted: #6b6560;
  --color-rule: #ddd6cb;
  --color-link: #2b2724;
  --font-display: 'Cormorant Garamond', 'Garamond', 'Times New Roman', serif;
  --font-body: 'EB Garamond', 'Garamond', 'Times New Roman', serif;
  --page-max-width: 46rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-bg);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Site header (name + title) ---- */

.site-header {
  text-align: center;
  padding: 3.5rem 1.5rem 1.5rem;
}

.site-header__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.6rem;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1;
}

.site-header__name a {
  color: inherit;
  text-decoration: none;
}

.site-header__title {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: 0.01em;
}

.site-header__marker {
  display: block;
  margin: 0.45rem 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
}

.site-header__marker span {
  display: inline-block;
  transform: scaleX(3.2);
}

/* ---- Navigation ---- */

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  padding: 0 1.5rem 2.5rem;
  border-bottom: 1px solid var(--color-rule);
  margin: 0 auto;
  max-width: var(--page-max-width);
}

.site-nav a {
  color: var(--color-link);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom: 1px solid var(--color-text);
}

/* ---- Main content ---- */

main {
  flex: 1;
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

main h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
}

main h2:first-child {
  margin-top: 0;
}

main p {
  margin: 0 0 1.25rem;
}

main ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

main li {
  margin: 0 0 0.6rem;
}

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

/* ---- Home / landing page ---- */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem 4rem;
}

.landing__image {
  max-width: 100%;
  height: auto;
}

.landing__caption {
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 32rem;
}

/* ---- About page: inset headshot ---- */

.about-portrait {
  float: left;
  width: 220px;
  margin: 0 1.75rem 1rem 0;
}

.about-portrait img {
  width: 100%;
  height: auto;
}

.about-content::after {
  content: "";
  display: block;
  clear: both;
}

/* ---- CV page ---- */

.cv-download {
  margin-bottom: 2rem;
}

.cv-embed {
  width: 100%;
  height: 85vh;
  border: 1px solid var(--color-rule);
}

/* ---- Site footer ---- */

.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--color-rule);
  margin-top: 2rem;
}

.site-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer__links a:hover {
  border-bottom: 1px solid var(--color-text-muted);
}

@media (max-width: 480px) {
  .site-header__name {
    font-size: 2.1rem;
  }

  .about-portrait {
    float: none;
    width: 180px;
    margin: 0 auto 1.5rem;
    display: block;
  }
}
