/* ============================================
   Breyon Williams — Personal Website
   Design System & Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  --navy: #1e3a5f;
  --navy-light: #2b5084;
  --gold: #c8a250;
  --gold-light: #d4b76a;
  --gold-subtle: rgba(200, 162, 80, 0.12);
  --bg: #faf9f6;
  --bg-alt: #f3f1ec;
  --bg-card: #ffffff;
  --text: #2d3436;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --border: #e5e1d8;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1100px;
  --transition: 0.3s ease;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}

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

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

::selection {
  background: var(--gold-subtle);
  color: var(--navy);
}

/* --- Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

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

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 680px;
  margin-bottom: 2.5rem;
}

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

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

.nav-logo span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  padding: 10rem 0 5rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
  font-size: 3.2rem;
  line-height: 1.15;
}

.hero-intro {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  color: var(--text-light);
  transition: all var(--transition);
}

.hero-social a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-subtle);
}

.hero-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-photo {
  position: relative;
}

.hero-photo-frame {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 5;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-lighter);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem;
  margin-left: auto;
  position: relative;
  overflow: hidden;
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.hero-photo-accent {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 5;
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  z-index: -1;
  margin-left: auto;
}

/* --- About Section --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.85;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.highlight-item {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow);
}

.highlight-item h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.highlight-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* --- Featured Work Section --- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.featured-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.featured-card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.featured-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.featured-card h3 a {
  color: var(--navy);
}

.featured-card h3 a:hover {
  color: var(--gold);
}

.featured-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  flex-grow: 1;
}

.featured-card-meta {
  font-size: 0.8rem;
  color: var(--text-lighter);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* --- Interests Section --- */
.interests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.interests-text {
  font-size: 1.05rem;
  line-height: 1.85;
}

.interests-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.interest-tag {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.interest-tag:hover {
  border-color: var(--gold);
}

.interest-tag .icon {
  font-size: 1.3rem;
}

/* --- Contact / CTA Section --- */
.cta-section {
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-light);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-text {
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--gold);
}

/* --- Publications Page --- */
.page-header {
  padding: 8rem 0 3rem;
  background: var(--bg-alt);
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 640px;
}

.pub-category {
  margin-bottom: 3rem;
}

.pub-category:last-child {
  margin-bottom: 0;
}

.pub-category h2 {
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 1.5rem;
}

.pub-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.pub-title a {
  color: var(--navy);
}

.pub-title a:hover {
  color: var(--gold);
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.pub-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pub-link {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pub-link:hover {
  color: var(--navy);
}

.pub-link svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* --- Projects Page --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.project-card-icon {
  width: 48px;
  height: 48px;
  background: var(--gold-subtle);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.project-card-links {
  display: flex;
  gap: 0.75rem;
}

.project-card-links a {
  color: var(--text-lighter);
}

.project-card-links a:hover {
  color: var(--gold);
}

.project-card-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.project-card h3 {
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: var(--bg-alt);
  border-radius: 20px;
  color: var(--text-light);
}

.project-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}

.project-empty h3 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.project-empty p {
  color: var(--text-lighter);
  max-width: 480px;
  margin: 0 auto;
}

/* --- Writing Page --- */
.writing-intro-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.writing-intro-box .substack-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: #FF6719;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
}

.writing-intro-box p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.writing-posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.writing-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.writing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.writing-card-date {
  font-size: 0.8rem;
  color: var(--text-lighter);
  margin-bottom: 0.75rem;
}

.writing-card h3 {
  margin-bottom: 0.5rem;
}

.writing-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.writing-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 1rem;
}

/* --- Resume Page --- */
.resume-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.resume-section {
  margin-bottom: 2.5rem;
}

.resume-section h2 {
  font-size: 1.4rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 1.25rem;
}

.resume-entry {
  margin-bottom: 1.5rem;
}

.resume-entry:last-child {
  margin-bottom: 0;
}

.resume-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.resume-entry h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.resume-entry .org {
  font-style: italic;
  color: var(--text-light);
  font-size: 0.95rem;
}

.resume-entry .dates {
  font-size: 0.85rem;
  color: var(--text-lighter);
  white-space: nowrap;
}

.resume-entry ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.resume-entry li {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  h1 { font-size: 2.2rem; }

  .hero {
    padding: 8rem 0 3rem;
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero-photo {
    order: -1;
  }

  .hero-photo-frame {
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-photo-accent {
    max-width: 280px;
    margin: 0 auto;
    right: auto;
    left: 50%;
    transform: translateX(calc(-50% + 12px));
  }

  .about-content {
    grid-template-columns: 1fr;
  }

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

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

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

  .writing-posts {
    grid-template-columns: 1fr;
  }

  .writing-intro-box {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.25rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }

  .hero h1 { font-size: 2rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

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

  .nav-toggle {
    display: block;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .interests-list {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .page-header {
    padding: 7rem 0 2rem;
  }
}
