/* Stresszdoki static site — Twenty Ten inspired, responsive */

:root {
  --color-bg: #e2e2e2;
  --color-content-bg: #fff;
  --color-text: #333;
  --color-muted: #666;
  --color-link: #0066cc;
  --color-link-hover: #004499;
  --color-header-bg: #f7f7f7;
  --color-border: #ddd;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: "Helvetica Neue", Arial, sans-serif;
  --max-width: 1100px;
  --sidebar-width: 240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-link);
  text-decoration: none;
}

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

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

/* Header */
.site-header {
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1rem;
}

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

.site-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: normal;
  line-height: 1.2;
}

.site-title a {
  color: var(--color-text);
  text-decoration: none;
}

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

.site-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1.5rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  line-height: 1;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.main-nav a {
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Layout */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 2rem;
  align-items: start;
}

.site-content {
  background: var(--color-content-bg);
  padding: 1.75rem 2rem;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  min-width: 0;
}

.site-sidebar {
  min-width: 0;
}

.widget {
  background: var(--color-content-bg);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  margin-bottom: 1rem;
}

.widget-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: normal;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.widget p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Content */
.entry-header {
  margin-bottom: 1.25rem;
}

.entry-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: normal;
  line-height: 1.3;
}

.home-page .entry-title {
  display: none;
}

.entry-meta {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.entry-content {
  font-size: 1rem;
  line-height: 1.7;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--font-serif);
  font-weight: normal;
  margin: 1.5rem 0 0.75rem;
  line-height: 1.3;
}

.entry-content h1 { font-size: 1.5rem; }
.entry-content h2 { font-size: 1.35rem; }
.entry-content h3 { font-size: 1.15rem; }

.entry-content p {
  margin: 0 0 1rem;
  display: flow-root;
}

/* Leading / inline images — always block, text below */
.entry-content figure.post-figure {
  display: block;
  clear: both;
  margin: 1.25rem auto;
  padding: 0;
  border: none;
  text-align: center;
}

.entry-content figure.post-figure img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.entry-content img {
  display: block;
  float: none !important;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto;
  clear: both;
}

.entry-content a:has(> img) {
  display: block;
  float: none !important;
  clear: both;
  width: fit-content;
  max-width: 100%;
  margin: 1.25rem auto;
  text-decoration: none;
}

.entry-content a:has(> img):hover {
  text-decoration: none;
}

.entry-content a:has(> img) img {
  margin: 0;
}

.entry-content img.alignleft,
.entry-content img.alignright,
.entry-content img.aligncenter,
.entry-content img.alignnone,
.entry-content .alignleft,
.entry-content .alignright,
.entry-content .aligncenter {
  float: none !important;
  margin-left: auto;
  margin-right: auto;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
}

.entry-content li {
  margin-bottom: 0.35rem;
}

.entry-content blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--color-border);
  color: var(--color-muted);
}

.entry-content iframe {
  max-width: 100%;
}

.entry-content .wp-caption {
  display: block;
  float: none !important;
  clear: both;
  max-width: 100%;
  margin: 1.25rem auto;
  padding: 0;
  border: none;
  background: transparent;
}

.entry-content .wp-caption img {
  margin: 0 auto 0.5rem;
}

.entry-content .wp-caption-text,
.entry-content dd.wp-caption-dd {
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: center;
  margin: 0 0 0.5rem;
}

.entry-content img[style*="float"] {
  float: none !important;
}

/* Blog list */
.post-list {
  margin-top: 1rem;
}

.post-excerpt {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-excerpt:last-child {
  border-bottom: none;
}

.post-excerpt h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: normal;
}

.post-excerpt .excerpt {
  margin: 0.5rem 0 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.page-info {
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  background: var(--color-header-bg);
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 1rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-inner p {
  margin: 0;
}

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

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }

  .site-wrapper {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .site-content {
    padding: 1.25rem;
  }

  .site-sidebar {
    order: 2;
  }

  .entry-title {
    font-size: 1.4rem;
  }
}

/* Comments */
.comments-area {
  clear: both;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.comments-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: normal;
  margin: 0 0 1.5rem;
  line-height: 1.35;
  color: var(--color-text);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list .children {
  list-style: none;
  margin: 1rem 0 0 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--color-border);
}

.comment {
  margin: 0 0 1.5rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.comment:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.comment-meta {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.comment-author {
  font-style: normal;
  font-weight: 600;
  color: var(--color-text);
}

.comment-by-author .comment-author {
  color: var(--color-accent, #6b4c9a);
}

.comment-date {
  color: var(--color-muted);
}

.comment-date::before {
  content: " · ";
}

.comment-content {
  font-size: 0.95rem;
  line-height: 1.65;
}

.comment-content p {
  margin: 0 0 0.75rem;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .comment-list .children {
    padding-left: 1rem;
  }
}

/* Contact CTA (replaces legacy forms on pages) */
.contact-cta {
  margin: 2rem 0 1.5rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--color-border);
  border-left: 4px solid #993300;
  background: #faf8f5;
  border-radius: 4px;
}

.contact-cta-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: normal;
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

.contact-cta p {
  margin: 0 0 0.75rem;
}

.contact-email {
  font-size: 1.1rem;
}

.contact-email a {
  color: #993300;
  text-decoration: none;
}

.contact-email a:hover {
  text-decoration: underline;
}

.contact-more {
  font-size: 0.95rem;
}

@media print {
  .site-sidebar,
  .nav-toggle,
  .main-nav {
    display: none !important;
  }

  .site-wrapper {
    display: block;
  }

  body {
    background: #fff;
  }
}
