/* ========================================
   Sarah Theme - Base Styles
   ======================================== */

:root {
  --bg: #271510;
  --text: #FDFBD4;
  --primary: #38240D;
  --secondary: #1C280F;
}

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

html {
  scroll-behavior: smooth;
}

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

main {
  flex: 1;
}

a {
  color: var(--secondary);
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   Navigation
   ======================================== */

.site-header {
  padding: 1.5rem 2rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-title:hover {
  color: var(--secondary);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.site-nav a:hover {
  opacity: 1;
  color: var(--secondary);
}

/* Hamburger menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   Homepage
   ======================================== */

.home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.profile-photo {
  margin: 2rem auto 1.5rem;
}

.profile-photo img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
}

.bio {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.social-links a {
  color: var(--text);
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}

.social-links a:hover {
  opacity: 1;
  color: var(--secondary);
}

.featured-work {
  margin-top: 2rem;
}

.featured-work h2 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

/* ========================================
   Work Tiles
   ======================================== */

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tile {
  display: block;
  background: var(--primary);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: var(--text);
}

.tile-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.tile-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  background: var(--secondary);
  color: var(--text);
  padding: 0.25rem 0.55rem 0.15rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* ========================================
   Content Pages
   ======================================== */

.content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.content-wide {
  max-width: 1200px;
}

.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header .subtitle,
.subtitle {
  opacity: 0.8;
  font-size: 1.05rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.article-header time {
  display: block;
  opacity: 0.6;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* Content typography */
.content h1 { font-size: 1.8rem; margin: 2rem 0 0.75rem; }
.content h2 { font-size: 1.4rem; margin: 1.75rem 0 0.5rem; }
.content h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

/* Reset content typography inside tiles */
.content .tile h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.content .tile p { margin: 0; }

.content p {
  margin-bottom: 1rem;
}

.content ul, .content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.35rem;
}

.content blockquote {
  border-left: 3px solid var(--secondary);
  padding-left: 1rem;
  margin: 1.25rem 0;
  opacity: 0.85;
}

.content pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.content code {
  font-size: 0.9em;
}

.content p code {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.content img {
  border-radius: 8px;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.content th,
.content td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(253, 251, 212, 0.15);
  text-align: left;
}

.content thead th {
  border-bottom: 2px solid var(--secondary);
}

/* ========================================
   About Page
   ======================================== */

.about-image {
  max-width: 500px;
  margin: 0 auto 2rem;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
}

/* ========================================
   Resume Page
   ======================================== */

.resume-download {
  text-align: center;
  margin-bottom: 2rem;
}

.resume-download a {
  display: inline-block;
  background: var(--primary);
  color: var(--text);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.resume-download a:hover {
  background: var(--secondary);
  color: var(--text);
}

.resume-image {
  max-width: 900px;
  margin: 0 auto;
}

.resume-image img {
  width: 100%;
  border-radius: 10px;
}

/* ========================================
   Page List (generic)
   ======================================== */

.page-list {
  list-style: none;
  padding: 0;
}

.page-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(253, 251, 212, 0.1);
}

.page-list a {
  text-decoration: none;
  font-weight: 600;
}

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

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  text-align: center;
  opacity: 0.5;
  font-size: 0.85rem;
}

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

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .site-header {
    position: relative;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1rem 2rem 1.5rem;
    border-bottom: 1px solid var(--primary);
    z-index: 9;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  .site-nav a {
    font-size: 1.05rem;
    opacity: 1;
  }

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

  .content {
    padding: 1.5rem;
  }

  .home {
    padding: 1.5rem;
  }
}
