/* ============================================================
   Madelin Parsley — Personal Site
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

/* ----------------------------------------------------------
   Custom Properties
   ---------------------------------------------------------- */
:root {
  --bg:          #FFFFFF;
  --text:        #111110;
  --text-muted:  #9B9B98;
  --text-sec:    #6B6B68;
  --accent:      #4D7A62;
  --border:      #E2EAE5;
  --max-width:   680px;
  --font-serif:  Georgia, 'Times New Roman', serif;
  --font-sans:   'Inter', system-ui, sans-serif;
}

/* ----------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.78;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ----------------------------------------------------------
   Layout
   ---------------------------------------------------------- */
.site-wrapper {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

main {
  flex: 1;
}

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.site-header {
  padding: 36px 0 0;
}

.site-header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 0.5px solid var(--border);
}

.site-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: normal;
  letter-spacing: 0.01em;
  color: var(--text);
}

.site-name a {
  color: inherit;
}

/* ----------------------------------------------------------
   Navigation
   ---------------------------------------------------------- */
.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sec);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav a.active {
  color: var(--accent);
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.site-footer {
  margin-top: 80px;
  padding: 32px 0 40px;
  border-top: 0.5px solid var(--border);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-newsletter {
  font-size: 13px;
  color: var(--text-sec);
}

.footer-newsletter a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.footer-newsletter a:hover {
  border-bottom-color: var(--accent);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   Page Content Wrapper
   ---------------------------------------------------------- */
.page-content {
  padding: 56px 0 0;
}

/* ----------------------------------------------------------
   Divider
   ---------------------------------------------------------- */
.divider {
  width: 100%;
  height: 0.5px;
  background: var(--border);
  border: none;
  margin: 48px 0;
}

/* ----------------------------------------------------------
   HOME PAGE
   ---------------------------------------------------------- */

/* Bio section */
.home-bio {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 36px;
  margin-bottom: 48px;
}

.home-text {
  flex: 1;
}

.home-card-photo {
  width: 90px;
  height: 110px;
  object-fit: cover;
  object-position: center top;
  border-radius: 3px;
  flex-shrink: 0;
}

.home-text p {
  color: var(--text);
  margin-bottom: 20px;
}

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

/* Newsletter prompt */
.newsletter-prompt {
  font-size: 14px;
  color: var(--text-sec);
  padding-top: 4px;
}

.newsletter-prompt a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.newsletter-prompt a:hover {
  border-bottom-color: var(--accent);
}

/* ----------------------------------------------------------
   WRITING PAGE
   ---------------------------------------------------------- */
.writing-section {
  margin-bottom: 52px;
}

.section-rule {
  width: 32px;
  height: 1.5px;
  background: var(--accent);
  border: none;
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Story list */
.story-list {
  list-style: none;
}

.story-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--border);
}

.story-item:first-child {
  border-top: 0.5px solid var(--border);
}

.story-title {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  font-size: 15px;
}

.story-title a {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.story-title a:hover {
  border-bottom-color: var(--accent);
}

.story-pub {
  font-size: 14px;
  color: var(--text-sec);
  white-space: nowrap;
}

.story-year {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Awards list */
.award-list {
  list-style: none;
}

.award-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--border);
}

.award-item:first-child {
  border-top: 0.5px solid var(--border);
}

.award-name {
  font-size: 15px;
  color: var(--text);
}

.award-year {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ----------------------------------------------------------
   ABOUT PAGE
   ---------------------------------------------------------- */
.about-photo {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 4px;
  margin-bottom: 36px;
}

.about-content p {
  margin-bottom: 24px;
  color: var(--text);
}

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

/* ----------------------------------------------------------
   CONTACT PAGE
   ---------------------------------------------------------- */
/* Form success / error states */
.form-success {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 32px;
}

.form-error-global {
  font-size: 14px;
  color: #b94a48;
  margin-bottom: 20px;
}

.form-field-error {
  display: block;
  font-size: 13px;
  color: #b94a48;
  margin-top: 4px;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 0.5px solid var(--border);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease;
  resize: vertical;
  line-height: 1.6;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 140px;
}

.form-submit {
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.form-submit:hover {
  opacity: 0.85;
}

/* Newsletter block on contact page */
.newsletter-block {
  padding-top: 40px;
  border-top: 0.5px solid var(--border);
}

.newsletter-block h2 {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.newsletter-block p {
  font-size: 15px;
  color: var(--text-sec);
  margin-bottom: 16px;
}

.newsletter-block a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.newsletter-block a:hover {
  border-bottom-color: var(--accent);
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 520px) {
  .home-card-photo {
    width: 70px;
    height: 86px;
  }

.story-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .story-pub,
  .story-year {
    font-size: 13px;
    color: var(--text-muted);
  }

  .site-header-inner {
    flex-direction: column;
    gap: 16px;
  }

  .site-nav {
    gap: 20px;
  }
}
