/* =========================================
   Luke Strong — Portfolio
   ========================================= */

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

/* ---- THEME VARIABLES ---- */
:root {
  --bg:           #0d0c0a;
  --bg-card:      #131210;
  --text:         #e8e4dc;
  --text-muted:   #908c86;
  --text-subtle:  #524f4b;
  --accent:       #c0a96a;
  --border:       #232018;
  --max-width:    700px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --ease: 0.18s ease;
}

[data-theme="light"] {
  --bg:           #f5f2ea;
  --bg-card:      #ede9df;
  --text:         #1c1a14;
  --text-muted:   #7c7870;
  --text-subtle:  #b8b4a8;
  --accent:       #7a5e20;
  --border:       #dbd7cc;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--ease), color var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- TYPOGRAPHY ---- */
h1 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.25;
}

p {
  margin-bottom: 1.25rem;
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--ease), color var(--ease);
}

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

strong {
  font-weight: 600;
}

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

main {
  flex: 1;
  padding-top: 57px;
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--ease), border-color var(--ease);
}

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

.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--text-muted);
  transition: color var(--ease);
  white-space: nowrap;
}

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

/* Theme toggle — lives in footer */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--ease), border-color var(--ease);
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Hamburger — visible on mobile only */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger-line {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-muted);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---- SHARED LABEL ---- */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  display: block;
}

/* ---- PAGE HEADER (shared) ---- */
.page-header {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.page-header--borderless {
  border-bottom: none;
  margin-bottom: 0;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-top: 0.5rem;
}

.page-intro {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 0;
  line-height: 1.75;
}

/* ==============================================
   HOME PAGE
   ============================================== */
.home-hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}

/* Photo sits beside the tagline + heading, height matches text column */
.home-hero-inner {
  display: flex;
  align-items: stretch;
  gap: 2.25rem;
}

.home-photo {
  flex-shrink: 0;
  display: flex;
}

.home-photo img {
  width: 108px;
  height: 100%;
  min-height: 130px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 1px solid var(--border);
}

.home-hero-text {
  flex: 1;
  padding-top: 0.125rem;
}

.home-tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* About section — text only */
.home-about {
  padding: 3.5rem 0;
}

.home-about p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.82;
}

.home-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 3.5rem;
}

/* ---- VALUES ---- */
.home-values {
  margin-bottom: 3.5rem;
}

.home-values h2,
.home-education h2,
.home-recognition h2 {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.values-list {
  list-style: none;
}

.values-list li {
  padding: 1.125rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text);
}

.values-list li:last-child {
  border-bottom: 1px solid var(--border);
}

.values-list li p {
  margin: 0;
}

/* ---- EDUCATION ---- */
.home-education {
  margin-bottom: 3.5rem;
}

.edu-list {
  list-style: none;
}

.edu-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: 1px solid var(--border);
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding-top: 0.125rem;
}

.edu-school {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.edu-degree {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ---- RECOGNITION ---- */
.home-recognition {
  padding-bottom: 5rem;
}

.recognition-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.recognition-list li {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.recognition-year {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  min-width: 36px;
  flex-shrink: 0;
}

/* ==============================================
   PROJECTS PAGE
   ============================================== */
.projects-list {
  padding-bottom: 5rem;
}

/* Each role is a card separated by a top border */
.role-card {
  padding: 3rem 0 0;
  border-top: 1px solid var(--border);
}

/* Remove double line above the first card (page-header already has border-bottom) */
.role-card:first-child {
  border-top: none;
  padding-top: 0;
}

.work-org {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.work-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.work-date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.role-description {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.75;
  margin-bottom: 0;
}

/* Projects sub-list within a role */
.role-projects-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-top: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: block;
}

.project-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.project-row-name {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
}

.project-row-output {
  flex-shrink: 0;
  text-align: right;
}

.project-row-output a {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color var(--ease);
}

.project-row-output a:hover {
  color: var(--text);
  text-decoration: none;
}

.coming-soon {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-subtle);
  white-space: nowrap;
}

/* Padding at the bottom of the last card's project list */
.role-card:last-child {
  padding-bottom: 5rem;
}

/* Output link inside accordion trigger */
.project-row-output-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color var(--ease);
}

.project-row-output-link:hover {
  color: var(--text);
  text-decoration: none;
}

/* ---- ACCORDION ---- */
.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem 0;
  color: var(--text);
  font-family: inherit;
  text-align: left;
}

.accordion-trigger:hover .project-row-name {
  color: var(--accent);
}

.accordion-trigger-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.accordion-icon {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-subtle);
  width: 14px;
  text-align: center;
  transition: transform var(--ease), color var(--ease);
  display: inline-block;
  line-height: 1;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.accordion-panel {
  /* visibility controlled via hidden attr */
}

.accordion-body {
  padding: 1.25rem 0 2rem;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Smooth open/close animation */
.accordion-panel[data-animating] {
  overflow: hidden;
}

/* Prose blocks inside accordion body */
.prose-block {
  display: flex;
  flex-direction: column;
}

.prose-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.625rem;
}

.prose-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  display: block;
}

.prose-block p {
  font-size: 0.9375rem;
  line-height: 1.82;
  color: var(--text);
  margin-bottom: 0;
}

/* Numbered learned list */
.learned-list {
  list-style: decimal;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.82;
  color: var(--text);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ==============================================
   WRITING PAGE
   ============================================== */
.writing-body {
  padding-bottom: 5rem;
}

.writing-section {
  margin-bottom: 4rem;
}

.writing-section-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

/* Dissertation entry */
.dissertation-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.dissertation-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.dissertation-desc {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

.talk-output {
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}

.talk-output-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  display: block;
  margin-bottom: 0.875rem;
}

.output-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.625rem 1.125rem;
  transition: border-color var(--ease), color var(--ease);
}

.output-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.output-link-note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-subtle);
  margin-top: 0.625rem;
  line-height: 1.5;
}

/* Essays / newsletter block */
.substack-block {
  border: 1px dashed var(--border);
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.substack-block-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.substack-block-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 360px;
  line-height: 1.7;
}

/* ==============================================
   NOW PAGE
   ============================================== */
.now-body {
  padding-bottom: 5rem;
}

.now-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.now-meta::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.now-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.now-section:last-child {
  border-bottom: none;
}

.now-section h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.now-section p {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.82;
}

.now-book {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.875rem 0;
  border-top: 1px solid var(--border);
}

.now-book:last-child {
  border-bottom: 1px solid var(--border);
}

.now-book-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
}

.now-book-title {
  font-size: 0.9375rem;
  color: var(--text);
}

.now-book-author {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.125rem;
}

/* ==============================================
   CONTACT PAGE
   ============================================== */
.contact-body {
  padding-bottom: 5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-link {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.375rem 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: color var(--ease);
}

.contact-link:last-child {
  border-bottom: 1px solid var(--border);
}

.contact-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.contact-link-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  transition: color var(--ease);
}

.contact-link:hover .contact-link-label {
  color: var(--accent);
}

.contact-link-value {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* ==============================================
   FOOTER
   ============================================== */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  transition: border-color var(--ease);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
}

/* Toggle + links grouped on the right */
.footer-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color var(--ease);
}

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

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 640px) {
  /* Hamburger visible, nav links collapse */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0 1.5rem;
    z-index: 99;
  }

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

  .nav-links a {
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
}

@media (max-width: 500px) {
  .contact-link {
    grid-template-columns: 70px 1fr;
    gap: 1rem;
  }

  .edu-item {
    grid-template-columns: 60px 1fr;
    gap: 0.875rem;
  }

  h1 {
    font-size: 2rem;
  }

  .home-photo img {
    width: 80px;
  }
}
