
/* --------------------------------
   Christina Sun — Writer Portfolio
   -------------------------------- */

:root {
  --sage: #526F50;
  --soft-sage: #D6E3D0;
  --pale-yellow: #F5E9A8;
  --ivory: #F7F4EC;
  --text: #343A32;
  --muted: #73796F;
}

/* Reset */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.75;
}

/* Main website container */

.site-container {
  width: min(100% - 64px, 900px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* Header */

/* Header */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 42px 0 25px;
  border-bottom: 1px solid rgba(82, 111, 80, 0.25);
}

.site-title {
  display: inline-block;
  color: var(--sage);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -1.2px;
  text-decoration: none;
}

.site-title:hover {
  color: var(--text);
  text-decoration: none;
}

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

.site-subtitle {
  margin: 7px 0 28px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Navigation */

/* Navigation */

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-tab {
  position: relative;
  padding: 5px 0;
  border: none;
  background: none;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-tab:hover,
.nav-tab.active {
  color: var(--sage);
}

.nav-tab.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--sage);
  content: "";
}

.nav-tab:focus-visible,
.site-title:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 5px;
}

/* Main content */

.main-content {
  flex: 1;
  padding: 65px 0 100px;
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography */

.eyebrow {
  margin: 0 0 15px;
  color: var(--sage);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 25px;
  color: var(--sage);
  font-size: clamp(42px, 7vw, 64px);
  font-weight: normal;
  letter-spacing: -2px;
  line-height: 1.15;
}

h2 {
  margin: 0 0 12px;
  color: var(--sage);
  font-size: 25px;
  font-weight: normal;
  line-height: 1.3;
}

p {
  max-width: 680px;
}

/* Decorative divider */

.divider {
  width: 55px;
  height: 3px;
  margin: 28px 0 32px;
  background: var(--pale-yellow);
}

/* About */

.intro {
  max-width: 690px;
}

.intro p {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.9;
}

/* Work */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 35px;
}

.work-card {
  padding: 30px;
  background: var(--soft-sage);
  border: 1px solid rgba(82, 111, 80, 0.12);
  transition: transform 0.2s ease;
}

.work-card:hover {
  transform: translateY(-3px);
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Contact */

.contact-intro {
  max-width: 550px;
  font-size: 18px;
}

.email-link {
  display: inline-block;
  margin-top: 15px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--sage);
  color: var(--sage);
  transition: color 0.2s ease;
}

.email-link:hover {
  color: var(--text);
}

/* Footer */

.site-footer {
  padding: 25px 0;
  border-top: 1px solid rgba(82, 111, 80, 0.25);
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  text-align: center;
}

.site-footer p {
  margin: 0 auto;
}

/* Mobile */

@media (max-width: 600px) {
  .site-container {
    width: calc(100% - 40px);
  }

.site-header {
  align-items: flex-start;
  flex-direction: column;
  gap: 20px;
  padding-top: 32px;
}

.site-title {
  font-size: 28px;
}

.site-nav {
  gap: 25px;
}

  .main-content {
    padding: 55px 0 75px;
  }

  .intro p {
    font-size: 17px;
  }

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

  .work-card {
    padding: 25px;
  }
}

/* Reduced motion accessibility */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
