/*
Theme Name: Google Docs
Theme URI: https://liamatkins.co.uk
Author: Liam Atkins
Description: A clean, distraction-free theme inspired by Google Docs. Perfect for blogs and simple websites.
Version: 1.1.0
License: GNU General Public License v2 or later
Tags: blog, minimal, clean, simple, one-column
*/

/* ==========================================
   RESET & BASE
========================================== */

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

:root {
  --page-bg: #f0f4f9;
  --doc-bg: #ffffff;
  --doc-width: 816px;
  --doc-padding: 72px 96px;
  --doc-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-muted: #9aa0a6;
  --link-color: #1a73e8;
  --link-hover: #1557b0;
  --border-color: #e0e0e0;
  --header-bg: #ffffff;
  --header-border: #e0e0e0;
  --font-body: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --font-size-base: 11pt;
  --line-height-base: 1.75;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--page-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  min-height: 100vh;
}

/* ==========================================
   TYPOGRAPHY
========================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.5em;
  margin-top: 1.5em;
}

h1 { font-size: 2rem; }     /* 32px */
h2 { font-size: 1.625rem; } /* 26px */
h3 { font-size: 1.375rem; } /* 22px */
h4 { font-size: 1.125rem; } /* 18px */
h5 { font-size: 1rem; }     /* 16px */
h6 { font-size: 0.875rem; } /* 14px */

p {
  margin-bottom: 1.1em;
}

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

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

ul, ol {
  margin: 0.5em 0 1em 1.5em;
}

li {
  margin-bottom: 0.3em;
}

blockquote {
  border-left: 3px solid var(--border-color);
  padding: 0.5em 0 0.5em 1.25em;
  margin: 1.5em 0;
  color: var(--text-secondary);
  font-style: italic;
}

code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85em;
  background: #f1f3f4;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: #d93025;
}

pre {
  background: #f1f3f4;
  padding: 1em 1.25em;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.25em 0;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2em 0;
}

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

/* ==========================================
   BUTTONS
========================================== */

.btn,
button.btn,
a.btn,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
  height: 40px;
  border-radius: 6px;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
  -webkit-appearance: none;
}

/* Primary — Google blue */
.btn,
.btn-primary,
input[type="submit"] {
  background: #1a73e8;
  color: #ffffff;
}

.btn:hover,
.btn-primary:hover,
input[type="submit"]:hover {
  background: #1765cc;
  box-shadow: 0 1px 3px rgba(26,115,232,0.4);
  text-decoration: none;
  color: #ffffff;
}

.btn:active,
.btn-primary:active,
input[type="submit"]:active {
  background: #1557b0;
  box-shadow: none;
}

/* Secondary — white/outlined */
.btn-secondary {
  background: #ffffff;
  color: #1a73e8;
  border: 1px solid #dadce0;
}

.btn-secondary:hover {
  background: #f8fbff;
  border-color: #1a73e8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-decoration: none;
  color: #1a73e8;
}

/* Danger — red */
.btn-danger {
  background: #d93025;
  color: #ffffff;
}

.btn-danger:hover {
  background: #c5221f;
  box-shadow: 0 1px 3px rgba(217,48,37,0.4);
  text-decoration: none;
  color: #ffffff;
}

/* Small */
.btn-sm {
  height: 32px;
  padding: 0 1rem;
  font-size: 0.8rem;
  border-radius: 4px;
}

/* Large */
.btn-lg {
  height: 48px;
  padding: 0 2rem;
  font-size: 1rem;
  border-radius: 8px;
}

/* Disabled state */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================
   LAYOUT
========================================== */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: var(--doc-width);
  margin: 0 auto;
  padding: 0 96px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* ==========================================
   BRANDING / LOGO
========================================== */

.site-branding {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.custom-logo-link {
  display: flex;
  align-items: center;
}

.custom-logo-link img {
  max-height: 36px;
  width: auto;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.site-title .doc-icon {
  width: 20px;
  height: 20px;
  background: #1a73e8;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-title .doc-icon svg {
  width: 12px;
  height: 12px;
  fill: white;
}

/* ==========================================
   DESKTOP NAVIGATION
========================================== */

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

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav ul li {
  margin: 0;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  display: block;
  white-space: nowrap;
}

.site-nav a:hover {
  background: #f1f3f4;
  color: var(--text-primary);
  text-decoration: none;
}

/* ==========================================
   BURGER BUTTON
========================================== */

.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: background 0.15s;
  flex-shrink: 0;
  line-height: 0;
}

.burger-btn:hover {
  background: #f1f3f4;
  color: var(--text-primary);
}

.burger-btn svg {
  display: block;
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.burger-btn .icon-close { display: none; }
.burger-btn.is-open .icon-menu { display: none; }
.burger-btn.is-open .icon-close { display: block; }

/* ==========================================
   MOBILE NAV DRAWER
========================================== */

.mobile-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 99;
  overflow-y: auto;
  border-top: 1px solid var(--border-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.mobile-nav ul li {
  margin: 0;
}

.mobile-nav a {
  display: block;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.mobile-nav ul li:last-child a {
  border-bottom: none;
}

.mobile-nav a:hover {
  background: #f1f3f4;
  text-decoration: none;
}

/* ==========================================
   PAGE AREA
========================================== */

.page-area {
  flex: 1;
  padding: 40px 0 80px;
}

.document {
  background: var(--doc-bg);
  max-width: var(--doc-width);
  margin: 0 auto;
  padding: var(--doc-padding);
  box-shadow: var(--doc-shadow);
  min-height: 1056px;
}

/* ==========================================
   BLOG INDEX
========================================== */

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

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

.post-item:first-child {
  padding-top: 0;
}

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

.post-meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.post-meta .category a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
}

.post-item h2 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.post-item h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-item h2 a:hover {
  color: var(--link-color);
  text-decoration: none;
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.92em;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.read-more {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--link-color);
  text-decoration: none;
  font-weight: 700;
}

.read-more:hover {
  text-decoration: underline;
}

/* ==========================================
   SINGLE POST
========================================== */

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.post-header h1 {
  font-size: 2em;
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.post-thumbnail {
  margin-bottom: 2rem;
  border-radius: 3px;
  overflow: hidden;
}

.post-content {
  max-width: 100%;
}

/* ==========================================
   STATIC PAGE
========================================== */

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  margin-top: 0;
  font-size: 2em;
}

/* ==========================================
   PAGINATION
========================================== */

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

.pagination a {
  color: var(--link-color);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: background 0.15s;
}

.pagination a:hover {
  background: #f1f3f4;
  text-decoration: none;
}

/* ==========================================
   COMMENTS
========================================== */

.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.comments-area h2 {
  font-size: 1.2rem;
  margin-top: 0;
}

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

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

.comment-author {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.comment-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #fafafa;
  transition: border-color 0.15s;
  margin-bottom: 0.75rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--link-color);
  background: white;
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form .submit {
  background: var(--link-color);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.comment-form .submit:hover {
  background: var(--link-hover);
}

/* ==========================================
   FOOTER WIDGETS
========================================== */

.footer-widgets {
  background: #f8f9fa;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
}

.footer-widgets-inner {
  max-width: var(--doc-width);
  margin: 0 auto;
  padding: 0 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.footer-col .widget {
  margin-bottom: 0;
}

/* ==========================================
   FOOTER BAR
========================================== */

.site-footer {
  background: var(--header-bg);
  border-top: 1px solid var(--header-border);
  padding: 1.5rem 0;
}

.footer-inner {
  max-width: var(--doc-width);
  margin: 0 auto;
  padding: 0 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

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

/* ==========================================
   UTILITY
========================================== */

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ==========================================
   RESPONSIVE - TABLET
========================================== */

@media (max-width: 900px) {
  :root {
    --doc-padding: 48px 40px;
  }

  .header-inner,
  .footer-inner {
    padding: 0 40px;
  }

  .footer-widgets-inner {
    padding: 0 40px;
    gap: 2rem;
  }
}

/* ==========================================
   RESPONSIVE - MOBILE
========================================== */

@media (max-width: 640px) {
  :root {
    --doc-padding: 28px 20px;
    --font-size-base: 10.5pt;
  }

  .header-inner {
    padding: 0 16px;
    height: 52px;
  }

  /* Show burger, hide desktop nav */
  .burger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
  }

  /* Show mobile nav */
  .mobile-nav {
    display: block;
    top: 52px;
  }

  /* Document loses shadow on mobile — feels more native */
  .document {
    min-height: unset;
    box-shadow: none;
    border-radius: 0;
  }

  .page-area {
    padding: 0 0 48px;
  }

  /* Footer */
  .footer-inner {
    padding: 0 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .footer-widgets-inner {
    padding: 0 16px;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Typography scale */
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.375rem; }

  .post-header h1 {
    font-size: 1.625rem;
  }

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

/* ==========================================
   PRINT
========================================== */

@media print {
  .site-header,
  .site-footer,
  .burger-btn,
  .mobile-nav {
    display: none;
  }

  .document {
    box-shadow: none;
    padding: 0;
  }

  .page-area {
    padding: 0;
  }

  body {
    background: white;
  }
}
