/**
 * Barebones Styles - All same size, Times New Roman
 */

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

/* Base */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #000;
  background: #fff;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    color: #ddd;
    background: #111;
  }
  :root:not([data-theme="light"]) a {
    color: inherit;
  }
  :root:not([data-theme="light"]) a:visited {
    color: inherit;
  }
  :root:not([data-theme="light"]) code, 
  :root:not([data-theme="light"]) pre {
    background: #222;
  }
  :root:not([data-theme="light"]) hr,
  :root:not([data-theme="light"]) .header,
  :root:not([data-theme="light"]) .footer,
  :root:not([data-theme="light"]) .post__description,
  :root:not([data-theme="light"]) .post__footer,
  :root:not([data-theme="light"]) .cv-section__title,
  :root:not([data-theme="light"]) .blog-list__item,
  :root:not([data-theme="light"]) .project-card,
  :root:not([data-theme="light"]) .prose blockquote,
  :root:not([data-theme="light"]) .prose th,
  :root:not([data-theme="light"]) .prose td {
    border-color: #444;
  }
}

[data-theme="dark"] body {
  color: #ddd;
  background: #111;
}
[data-theme="dark"] a {
  color: inherit;
}
[data-theme="dark"] a:visited {
  color: inherit;
}
[data-theme="dark"] code,
[data-theme="dark"] pre {
  background: #222;
}
[data-theme="dark"] hr,
[data-theme="dark"] .header,
[data-theme="dark"] .footer,
[data-theme="dark"] .post__description,
[data-theme="dark"] .post__footer,
[data-theme="dark"] .cv-section__title,
[data-theme="dark"] .blog-list__item,
[data-theme="dark"] .project-card,
[data-theme="dark"] .prose blockquote,
[data-theme="dark"] .prose th,
[data-theme="dark"] .prose td {
  border-color: #444;
}

/* Links */
a {
  color: inherit;
}

a:visited {
  color: inherit;
}

a:hover {
  text-decoration: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* Header/Nav */
.header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.site-logo {
  height: 3.5rem;
  width: auto;
}

[data-theme="dark"] .site-logo {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-logo {
    filter: invert(1);
  }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.nav__sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.nav__link {
  color: inherit;
}

.nav__link--active {
  font-weight: bold;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid currentColor;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  margin-left: auto;
}

.theme-toggle::after {
  content: "dark";
}

[data-theme="dark"] .theme-toggle::after {
  content: "light";
}

[data-theme="light"] .theme-toggle::after {
  content: "dark";
}

/* Main */
.main {
  min-height: 60vh;
}

/* Page layout */
.page__header {
  margin-bottom: 2rem;
}

.page__title {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.page__description {
  font-style: italic;
}

/* Post layout */
.post__header {
  margin-bottom: 2rem;
}

.post__title {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.post__meta {
  margin-bottom: 0.5rem;
}

.post__tags {
  display: inline;
  list-style: none;
}

.post__tags::before {
  content: "Tags: ";
}

.post__tag {
  display: inline;
}

.post__tag::after {
  content: ", ";
}

.post__tag:last-child::after {
  content: "";
}

.post__description {
  font-style: italic;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #000;
}

.post__image {
  margin: 1rem 0;
}

.post__image img {
  max-width: 100%;
  height: auto;
}

.post__footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #000;
}

/* Prose - all same size */
.prose {
  white-space: pre-line;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-size: inherit;
  font-weight: bold;
  margin: 1rem 0 0 0;
}

.prose p {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 2rem;
  white-space: normal;
}

.prose li {
  margin: 0;
  white-space: normal;
}

.prose blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid #000;
  font-style: italic;
}

.prose code {
  font-family: 'Courier New', Courier, monospace;
  background: #eee;
  padding: 0.1em 0.3em;
}

.prose pre {
  font-family: 'Courier New', Courier, monospace;
  background: #eee;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose hr {
  border: none;
  border-top: 1px solid #000;
  margin: 2rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.prose th,
.prose td {
  border: 1px solid #000;
  padding: 0.5rem;
  text-align: left;
}

/* Blog list */
.blog-list {
  list-style: none;
}

.blog-list__item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ccc;
}

.blog-list__link {
  text-decoration: none;
  color: inherit;
}

.blog-list__title {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.blog-list__link:hover .blog-list__title {
  text-decoration: underline;
}

.blog-list__meta {
  margin-bottom: 0.25rem;
}

.blog-list__tags {
  display: inline;
  list-style: none;
}

.blog-list__tags::before {
  content: "[";
}

.blog-list__tags::after {
  content: "]";
}

.blog-list__tag {
  display: inline;
}

.blog-list__tag::after {
  content: ", ";
}

.blog-list__tag:last-child::after {
  content: "";
}

/* Home */
.home__hero {
  margin-bottom: 2rem;
}

.home__title {
  margin-bottom: 0.5rem;
}

.home__subtitle {
  margin-bottom: 1rem;
}

.home__cta {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border: 1px solid #000;
}

[data-theme="dark"] .btn {
  border-color: #888;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn {
    border-color: #888;
  }
}

.btn--primary {
  background: #000;
  color: #fff;
}

[data-theme="dark"] .btn--primary {
  background: #ddd;
  color: #111;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--primary {
    background: #ddd;
    color: #111;
  }
}

.btn--secondary {
  background: transparent;
  color: inherit;
}

/* CV */
.cv-section {
  margin-bottom: 1.5rem;
  white-space: normal;
}

.cv-section__title {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #000;
  padding-bottom: 0.25rem;
}

.cv-entry {
  margin-bottom: 0.75rem;
}

.cv-entry__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.cv-entry__date {
  flex-shrink: 0;
  white-space: nowrap;
}

.cv-entry__company {
  font-style: italic;
}

.cv-entry p {
  margin: 0.25rem 0 0 0;
}

/* Projects */
.projects-grid {
  margin: 1rem 0;
}

.project-card {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #000;
}

[data-theme="dark"] .project-card {
  border-color: #444;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .project-card {
    border-color: #444;
  }
}

.project-card__title {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.project-card__description {
  margin-bottom: 0.5rem;
}

.project-card__links {
  display: flex;
  gap: 1rem;
}

/* Footer */
.footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #000;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer__links {
  display: flex;
  gap: 1rem;
}

.footer__link {
  color: inherit;
}

/* Print */
@media print {
  body {
    max-width: 100%;
    padding: 0;
  }
  .header, .footer, .theme-toggle, .skip-link {
    display: none;
  }
}
