/*
 * Personal Academic Website - Steven Denney
 * Color palette inspired by Wes Anderson's "The Grand Budapest Hotel"
 */

/* CSS Variables for Grand Budapest Hotel Palette */
:root {
  --deep-plum: #3D1308;
  --burgundy: #762A3E;
  --dusty-rose: #C4A484;
  --warm-tan: #E8D4C4;
  --cream: #FAF6F1;
  --soft-coral: #D4838F;
  --muted-gold: #C9A86C;
  --text-dark: #2D2926;
  --text-gray: #4A4543;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--cream);
  height: 100%;
}

body {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--cream);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Header / Masthead */
.masthead {
  background-color: var(--burgundy);
  padding: 0.85rem 0;
  position: relative;
  z-index: 100;
  border-bottom: 3px solid var(--muted-gold);
}

.masthead__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.masthead__title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.03em;
}

.masthead__title a {
  color: var(--muted-gold);
  text-decoration: none;
}

.masthead__title a:hover {
  color: var(--warm-tan);
}

/* Navigation */
.masthead__nav {
  display: flex;
  gap: 2rem;
}

.masthead__nav a {
  color: var(--warm-tan);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
}

.masthead__nav a:hover,
.masthead__nav a.active {
  color: var(--muted-gold);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--warm-tan);
}

/* Main Layout */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
  flex: 1;
}

/* Home Page Layout */
.home-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* Sidebar / Author Profile */
.sidebar {
  position: sticky;
  top: 2rem;
}

.author-profile {
  text-align: center;
}

.author__avatar {
  width: 200px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  margin-bottom: 1.25rem;
}

.author__name {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--deep-plum);
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
}

.author__title {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* Social Links */
.author__urls {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.author__urls li {
  margin-bottom: 0.6rem;
}

.author__urls a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.author__urls a:hover {
  color: var(--burgundy);
}

.author__urls svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
}

/* Main Content Area */
.page-content {
  min-width: 0;
}

.page-content h1:first-child {
  margin-top: 0;
}

.page-content > *:last-child {
  margin-bottom: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--deep-plum);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

h1 { font-size: 1.8rem; letter-spacing: 0.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--burgundy);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--soft-coral);
  text-decoration: underline;
}

/* Horizontal Rules */
hr {
  border: none;
  border-top: 1px solid var(--dusty-rose);
  margin: 2rem 0;
}

/* Section Page Layout (Projects, Publications, CV) */
.section-layout {
  max-width: 880px;
}

.section-layout h1 {
  color: var(--deep-plum);
  margin-bottom: 0.5rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-gray);
  margin-bottom: 2rem;
  line-height: 1.75;
}

/* Section Headers */
.section-header {
  font-size: 1.35rem;
  color: var(--deep-plum);
  margin: 2.5rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--muted-gold);
}

.subsection-header {
  font-size: 1.1rem;
  color: var(--burgundy);
  margin: 2rem 0 1rem;
}

/* Project Cards */
.project-card {
  background: white;
  border-radius: 4px;
  padding: 1rem 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 4px solid var(--muted-gold);
}

.project-card h3 {
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
  color: var(--deep-plum);
}

.project-meta {
  font-size: 0.88rem;
  color: var(--text-gray);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.project-meta strong {
  color: var(--text-dark);
}

.repo-link {
  text-decoration: none;
}

.repo-link svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* Collapsible Details */
details {
  margin: 0.25rem 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--burgundy);
  padding: 0.25rem 0;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: '+ ';
  font-weight: 400;
  color: var(--muted-gold);
}

details[open] summary::before {
  content: '− ';
}

details > div {
  padding: 0.75rem 0 0.75rem 1.25rem;
  border-left: 2px solid var(--warm-tan);
  margin-left: 0.25rem;
  font-size: 0.95rem;
}

details h4 {
  font-size: 0.95rem;
  color: var(--burgundy);
  margin: 1.25rem 0 0.5rem;
}

details ul {
  margin: 0;
  padding-left: 1.25rem;
}

details li {
  margin-bottom: 0.5rem;
}

/* Publications */
.publication-item {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.7;
  text-indent: -1.25rem;
  padding-left: 1.25rem;
}

.pub-year {
  font-weight: 600;
  color: var(--burgundy);
}

/* CV Page */
.cv-container {
  background: white;
  border-radius: 4px;
  padding: 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.cv-header h1 {
  margin: 0;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--burgundy);
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
  letter-spacing: 0.02em;
}

.download-btn:hover {
  background-color: var(--deep-plum);
  color: white;
  text-decoration: none;
}

.download-btn svg {
  width: 16px;
  height: 16px;
}

.pdf-viewer {
  width: 100%;
  height: 75vh;
  min-height: 500px;
  border: 1px solid var(--dusty-rose);
  border-radius: 4px;
}

/* Footer */
.site-footer {
  background-color: var(--warm-tan);
  padding: 1.75rem 0;
  margin-top: 0;
  font-size: 0.85rem;
  color: var(--text-gray);
  border-top: 3px solid var(--muted-gold);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-links {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-gray);
  margin-right: 1.25rem;
}

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

.footer-credit {
  font-size: 0.8rem;
  color: var(--burgundy);
  font-style: italic;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .masthead__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--burgundy);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    border-bottom: 3px solid var(--muted-gold);
  }

  .masthead__nav.active {
    display: flex;
  }

  .masthead__nav a {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .home-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
  }

  .author-profile {
    text-align: center;
  }

  .author__urls {
    text-align: center;
  }

  .author__urls a {
    justify-content: center;
  }

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

  .project-card {
    padding: 1.25rem;
  }

  .cv-container {
    padding: 1rem;
  }

  .pdf-viewer {
    height: 60vh;
    min-height: 400px;
  }
}
