/* ═══════════════════════════════════════════════════════════
   ART BLOG - MINIMAL BLACK & WHITE
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Ballet:opsz@16..72&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --bg: #f8f6f1;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #1a1a1a;
  --border-light: #d4d0c8;
  --font-mono: "Courier New", Courier, monospace;
  --font-body: "Crimson Pro", Georgia, serif;
  --font-script: "Ballet", cursive;
}

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

/* Base */
html {
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

/* Links */
a {
  color: var(--text);
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

/* Layout */
.page-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 24px 50px;
}

/* Header */
.site-header {
  margin-bottom: 40px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 24px;
}

.logo {
  line-height: 1;
}

.logo a {
  text-decoration: none;
}

.logo a:hover {
  opacity: 0.7;
}

.logo .name {
  font-family: var(--font-script);
  font-size: 40px;
  font-weight: normal;
  letter-spacing: 0.01em;
  color: #722f37;
}

.main-nav {
  display: flex;
  gap: 28px;
  padding-bottom: 2px;
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 15px;
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.main-nav a:hover {
  text-decoration: underline;
}

/* Search */
.search-box {
  position: relative;
  margin-left: auto;
}

#search-input {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 8px 0;
  width: 150px;
  border: none;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
  color: var(--text);
  text-align: right;
}

#search-input:focus {
  outline: none;
  border-bottom-color: var(--text);
  background: transparent;
}

#search-input::placeholder {
  color: var(--text-muted);
}

#search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

#search-results.active {
  display: block;
}

#search-results a {
  display: block;
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}

#search-results a:last-child {
  border-bottom: none;
}

#search-results a:hover {
  background: #f5f5f5;
}

#search-results .search-date {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Main Content */
.site-content {
  min-height: 50vh;
}

/* HR */
hr, .fancy-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 30px 0;
}

/* Welcome Banner */
.welcome-banner {
  display: none;
}

/* ASCII Art */
.ascii-art {
  font-family: var(--font-mono);
  white-space: pre;
  font-size: 11px;
  line-height: 1.2;
}

/* Post List */
.post-list h2 {
  font-size: 14px;
  font-weight: normal;
  text-transform: lowercase;
  margin-bottom: 20px;
}

.post-item {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: baseline;
  font-family: var(--font-mono);
}

.post-item time {
  font-size: 14px;
  color: var(--text-muted);
  min-width: 110px;
}

.post-item > a {
  font-size: 16px;
  text-decoration: none;
}

.post-item > a:hover {
  text-decoration: underline;
}

.post-item .tags {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
}

.tag {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 4px;
}

.tag:hover {
  color: var(--text);
}

/* Single Post */
.post-header h1 {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: normal;
  margin: 0 0 12px 0;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.post-meta time {
  margin-right: 15px;
}

.post-content {
  margin: 30px 0;
}

.post-content p {
  margin: 1.5em 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  cursor: pointer;
  display: block;
  margin: 2em 0;
}

.post-content h2 {
  font-size: 14px;
  font-weight: bold;
  margin-top: 2.5em;
  margin-bottom: 1em;
}

.post-content h3 {
  font-size: 14px;
  font-weight: normal;
  font-style: italic;
  margin-top: 2em;
}

.post-content code {
  background: #f5f5f5;
  padding: 2px 5px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.post-content pre {
  background: #f5f5f5;
  padding: 15px;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  margin: 1.5em 0;
}

.post-content pre code {
  background: transparent;
  padding: 0;
}

.post-content blockquote {
  border-left: 2px solid var(--border);
  margin: 1.5em 0;
  padding: 0 0 0 20px;
  font-style: italic;
  color: var(--text-muted);
}

.post-content ul, .post-content ol {
  padding-left: 20px;
}

.post-content li {
  margin: 0.5em 0;
}

/* Comments */
.comments-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.comments-section h2 {
  font-size: 14px;
  font-weight: normal;
  text-transform: lowercase;
  margin-bottom: 20px;
}

#comment-auth {
  margin: 15px 0;
}

#user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

#user-avatar {
  border-radius: 50%;
  border: 1px solid var(--border);
}

#comment-form {
  margin: 20px 0;
}

#comment-text {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px;
  border: 1px solid var(--border);
  resize: vertical;
  min-height: 80px;
  background: var(--bg);
}

#comment-text:focus {
  outline: none;
}

#comments-list {
  margin-top: 30px;
}

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

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

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

.comment-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
}

.comment-author {
  font-weight: bold;
}

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

.comment-content {
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Button */
.retro-button {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}

.retro-button:hover {
  background: var(--text);
  color: var(--bg);
}

.retro-button.small {
  font-size: 12px;
  padding: 6px 12px;
}

#google-signin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#google-signin::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Tag Page */
.tag-page h1 {
  font-size: 16px;
  font-weight: normal;
  margin-bottom: 30px;
}

.back-link {
  margin-top: 30px;
  font-size: 13px;
}

/* About Page */
.about-page h1 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: normal;
  margin-bottom: 30px;
}

.about-content p {
  margin: 1.5em 0;
}

.about-content a {
  color: #0000ee;
}

.about-content a:visited {
  color: #551a8b;
}

.about-content a:hover {
  color: #0000ee;
  text-decoration: none;
}

/* Error Page */
.error-page {
  text-align: center;
  padding: 60px 20px;
}

.error-page .ascii-art {
  margin-bottom: 30px;
}

.error-message {
  margin: 20px 0;
}

/* Hide blink effect */
blink {
  animation: none;
}

/* Footer */
.site-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

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

.rss-link {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.rss-link svg {
  vertical-align: middle;
}

.visitor-counter {
  display: none;
}

.under-construction {
  display: none;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border: 1px solid var(--border);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-mono);
}

.lightbox-close:hover {
  opacity: 0.6;
}

/* Loading */
.loading {
  color: var(--text-muted);
  font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
  .page-wrapper {
    padding: 24px 16px;
  }

  .site-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .header-inner {
    gap: 12px;
  }

  .logo .name {
    font-size: 32px;
  }

  .main-nav {
    gap: 12px;
  }

  .main-nav a {
    font-size: 12px;
  }

  #search-input {
    width: 60px;
    font-size: 11px;
    padding: 4px 0;
  }

  #search-input:focus {
    width: 80px;
  }

  #search-results {
    position: fixed;
    left: 16px;
    right: 16px;
    top: auto;
    max-height: 60vh;
  }

  .post-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
  }

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

  .post-item time {
    font-size: 11px;
    order: 1;
  }

  .post-item > a {
    order: 2;
    line-height: 1.4;
  }

  .post-item .tags {
    order: 3;
    margin-left: 0;
    margin-top: 4px;
  }

  /* Post page */
  .post-header h1 {
    font-size: 16px;
    line-height: 1.4;
  }

  .post-meta {
    flex-direction: column;
    gap: 6px;
  }

  .post-content {
    margin: 24px 0;
  }

  .post-content h2 {
    font-size: 13px;
  }

  .post-content img {
    margin: 1.5em -16px;
    width: calc(100% + 32px);
    max-width: calc(100% + 32px);
  }

  /* Comments */
  .comments-section {
    margin-top: 40px;
    padding-top: 24px;
  }

  #comment-text {
    font-size: 16px; /* Prevents iOS zoom */
  }

  /* Footer */
  .site-footer {
    margin-top: 40px;
    padding-top: 16px;
  }

  .footer-inner {
    font-size: 11px;
  }

  /* Lightbox */
  .lightbox-overlay img {
    max-width: 100vw;
    max-height: 85vh;
    border: none;
  }

  .lightbox-close {
    top: 10px;
    right: 16px;
    font-size: 32px;
  }

  /* Font indicator */
  #font-indicator {
    font-size: 11px !important;
    bottom: 10px !important;
    left: 10px !important;
  }
}

/* Small phones */
@media (max-width: 360px) {
  .logo .name {
    font-size: 24px;
  }

  .main-nav {
    gap: 16px;
  }

  .main-nav a {
    font-size: 11px;
  }
}
