/* Site overrides on top of Oat UI */

/* Theme toggle */
#theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  padding: 8px;
  background: none;
  border: none;
  border-radius: var(--radius-medium, 6px);
  cursor: pointer;
  color: var(--foreground);
  opacity: 0.7;
  transition: opacity 0.2s;
  pointer-events: auto;
}
#theme-toggle:hover {
  opacity: 1;
}
#theme-toggle:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Font override */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
}

/* Layout */
main {
  max-width: 580px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* Vertically center content on minimal pages (home, contact, projects) */
.page-centered main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

section {
  margin-top: 0;
}

section + section {
  margin-top: 1.5em;
}

/* Paragraph spacing */
p {
  margin-top: 0;
  margin-bottom: 1em;
}

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

/* Intro section - extra breathing room between paragraphs */
.intro-section p {
  margin-bottom: 1.5em;
}

.intro-section p:last-child {
  margin-bottom: 0;
}

/* Home page sections - clear visual separation */
.intro-section + .tech-section,
.tech-section + .cta-section {
  margin-top: 2.5em;
}

/* Tech stack as code block */
.tech-stack {
  display: block;
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  font-size: 0.9em;
  white-space: normal;
}

.tech-stack-wrap {
  margin-bottom: 1.5em;
}

.cta-section + .current-role,
.current-role + nav {
  margin-top: 2.5em;
}

.current-role {
  font-size: 0.9375rem;
  margin: 0;
  opacity: 0.8;
}

/* Navigation */
nav {
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 8px;
}

nav a,
nav .nav-current {
  margin: 0;
}

nav .nav-current {
  font-weight: 600;
  color: var(--foreground);
  cursor: default;
  text-decoration: none;
}

nav span {
  opacity: 0.5;
  user-select: none;
}

/* Work experience */
.job {
  margin-bottom: 40px;
}

.job:last-child {
  margin-bottom: 0;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.job-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0;
}

.job-company {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 4px 0;
}

.job-dates {
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0.8;
}

.job-description {
  font-style: italic;
  margin-bottom: 10px;
  font-size: 0.875rem;
  opacity: 0.8;
}

.job ul {
  margin-top: 10px;
}

.job-tech {
  margin-top: 10px;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Project details */
details {
  margin-bottom: 20px;
}

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

details[open] summary {
  margin-bottom: 16px;
}

.project-section {
  margin: 16px 0;
}

.project-section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: 8px;
}

.project-section-content {
  padding-left: var(--space-4, 1rem);
  border-left: 2px solid var(--border);
}

.project-section-content > * {
  margin-top: 0;
  margin-bottom: var(--space-2, 0.5rem);
}

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

.project-links {
  margin-top: 12px;
}

/* Projects page section intros and archived */
.section-intro {
  margin-top: 0;
  margin-bottom: 1em;
}

.section-intro--archived {
  opacity: 0.85;
}

/* Section headings on projects page */
section[aria-labelledby="current-projects-heading"] h2,
.archived-projects h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.5em;
}

/* Contact links */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.contact-links a {
  font-size: 1rem;
  display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
  main {
    padding: 40px 20px;
  }

  section + section {
    margin-top: 1.25em;
  }

  .intro-section + .tech-section,
  .tech-section + .cta-section,
  .cta-section + .current-role,
  .current-role + nav {
    margin-top: 1.75em;
  }

  nav {
    margin-top: 40px;
  }

  .job-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-dates {
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 32px 16px;
  }

  section + section {
    margin-top: 1.25em;
  }

  nav {
    margin-top: 32px;
  }

  nav a {
    font-size: 0.875rem;
  }
}
