/* ============================================
   BRODIE MEAH — PERSONAL SITE
   Aesthetic: Refined editorial. Quality over noise.
   ============================================ */

:root {
  --cream: #F5F2EC;
  --ink: #1A1814;
  --ink-light: #4A4640;
  --ink-faint: #9A958E;
  --accent: #8B6F47;
  --accent-light: #C4A882;
  --white: #FFFFFF;
  --section-alt: #EFEAE2;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --max-width: 780px;
  --nav-height: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   NAV
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 24, 20, 0.08);
  z-index: 100;
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
  border-radius: 2px;
}

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

.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: all 0.3s ease;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(139, 111, 71, 0.04) 100%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  animation: fadeUp 0.9s ease both;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 40px;
}

.hero-statement {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  color: var(--ink-light);
  max-width: 520px;
  line-height: 1.75;
  animation: fadeUp 0.9s ease 0.15s both;
}

.hero-line {
  margin-top: 60px;
  width: 48px;
  height: 1px;
  background: var(--accent-light);
  animation: fadeUp 0.9s ease 0.3s both;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: 100px 40px;
}

.section-alt {
  background-color: var(--section-alt);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
}

/* ============================================
   PROSE
   ============================================ */

.prose {
  max-width: 640px;
}

.prose p {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-light);
  line-height: 1.85;
  margin-bottom: 1.5em;
}

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

.prose .lead {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 1.5em;
}

.external-link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-light);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border-radius: 2px;
}

.external-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.external-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ============================================
   CONTACT FORM
   ============================================ */

.contact-form {
  margin-top: 48px;
  max-width: 520px;
}

.hidden {
  display: none;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 24, 20, 0.2);
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  border-radius: 0;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--ink-faint);
}

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

.form-group input:focus-visible,
.form-group textarea:focus-visible {
  outline: none;
  border-bottom: 2px solid var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  margin-top: 12px;
  display: inline-block;
  padding: 14px 40px;
  min-height: 44px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  border-radius: 2px;
}

.submit-btn:hover {
  background: var(--accent);
}

.submit-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 32px 40px;
  border-top: 1px solid rgba(26, 24, 20, 0.08);
  text-align: center;
}

.footer p {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .fade-in {
    opacity: 1;
    transform: none;
  }
  .hero-inner,
  .hero-statement,
  .hero-line {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {
  .nav {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 32px 24px;
    gap: 24px;
    border-bottom: 1px solid rgba(26, 24, 20, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 24px 60px;
  }

  .section {
    padding: 72px 24px;
  }

  .contact-form {
    max-width: 100%;
  }

  .footer {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 3.5rem;
  }
}
