:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --heading-color: #222222;
  --link-color: var(--text-color);
  --link-hover: #000000;
  --border-color: #e5e5e5;
  --subtle-text: #555555;
  --footer-bg: #222222;
  --footer-text: #888888;
  --max-width: 820px;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

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

header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 1.15rem 2.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--heading-color);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.site-title:hover {
  color: #000000;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--subtle-text);
  text-decoration: none;
  transition: color 0.15s ease;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: var(--heading-color);
}

nav a.active {
  color: var(--heading-color);
  border-bottom-color: var(--heading-color);
}

main {
  flex: 1;
  max-width: var(--max-width);
  margin: 3.5rem auto 5.5rem;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

article {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  scroll-margin-top: 5rem;
}

article + article {
  border-top: 1px solid var(--border-color);
  padding-top: 4.5rem;
}

h1 {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--heading-color);
  margin-bottom: 2rem;
  line-height: 1.3;
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-top: 2.6rem;
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

p {
  margin-bottom: 1.25rem;
}

strong {
  font-weight: 700;
  color: #111111;
}

ul {
  list-style-type: none;
  margin-bottom: 1.25rem;
  padding-left: 0;
}

ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.35rem;
}

ul li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--text-color);
}

.address-block {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

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

a strong {
  color: inherit;
}

.date-stamp {
  margin-top: 2.75rem;
  font-style: italic;
  color: var(--subtle-text);
  font-size: 1rem;
}

.intro-lead {
  font-size: 1.15rem;
  color: var(--subtle-text);
  margin-bottom: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-color);
  transition: border-color 0.15s ease, transform 0.15s ease;
  display: block;
}

.card:hover {
  border-color: #bbbbbb;
  transform: translateY(-2px);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

.card p {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--subtle-text);
  margin-bottom: 0;
}

.status-note {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--subtle-text);
  font-style: italic;
}

.app-list {
  margin-top: 1.5rem;
}

.app-list li {
  margin-bottom: 0.75rem;
}

.sub-nav {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  display: flex;
  gap: 1.5rem;
  margin: -1rem 0 2.5rem;
}

footer {
  background-color: var(--footer-bg);
  padding: 2.5rem 2.25rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--footer-text);
  line-height: 1.6;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: left;
}

.footer-links {
  margin-bottom: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: #aaaaaa;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-container p {
  margin-bottom: 0;
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  background-color: #d0d0d0;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, background-color 0.15s ease;
  z-index: 100;
}

.back-to-top:hover {
  background-color: #b5b5b5;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
}

@media (max-width: 600px) {
  header {
    padding: 1rem 1.25rem;
  }
  .site-title {
    font-size: 1.65rem;
  }
  nav {
    gap: 1rem;
  }
  main {
    margin: 2rem auto 3.5rem;
    padding: 0 1.25rem;
    gap: 3rem;
  }
  article {
    scroll-margin-top: 4.5rem;
  }
  article + article {
    padding-top: 3rem;
  }
  h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }
  h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
  }
  footer {
    padding: 2rem 1.25rem;
  }
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
  }
}

@media print {
  header {
    position: static;
    border-bottom: 1px solid #000;
  }
  nav, footer, .back-to-top {
    display: none;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
}

/* Added for app detail pages (e.g. TimeTracker) */
h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-top: 1.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--subtle-text);
  margin-bottom: -2rem;
}

.lead-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 1rem;
}

.contact-form {
  font-family: var(--font-sans);
  max-width: 480px;
  margin-top: 1.5rem;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 0.35rem;
  margin-top: 1.1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  background-color: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #999999;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form button {
  margin-top: 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background-color: var(--heading-color);
  border: none;
  border-radius: 4px;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.contact-form button:hover {
  background-color: #000000;
}

.contact-form .form-note {
  font-size: 0.85rem;
  color: var(--subtle-text);
  margin-top: 0.75rem;
  font-style: italic;
}
