/*
Theme Name: Autofarm Blog
Theme URI: https://github.com/
Author: autofarm
Description: Minimal, fast, SEO/AdSense-friendly blog theme. Content-first layout, no page-builder bloat. Shared by the KR and Global sites (language/site title set per-install in WordPress settings, not in the theme).
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: Unlicense
Text Domain: autofarm-blog
*/

@font-face {
  font-family: "Pretendard";
  src: url("assets/fonts/Pretendard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("assets/fonts/Pretendard-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("assets/fonts/Pretendard-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("assets/fonts/Pretendard-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Display";
  src: url("assets/fonts/Fraunces-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Display";
  src: url("assets/fonts/Fraunces-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Display";
  src: url("assets/fonts/Fraunces-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbfaf7;
  --fg: #1a1b1d;
  --muted: #6b6a66;
  --border: #e4e1da;
  --accent: #1f3d5c;
  --accent-soft: #e9eef2;
  --panel: #f3f1ec;
  --shadow-color: 214, 30%, 25%;
  --serif: "Fraunces Display", ui-serif, Georgia, "Noto Serif KR", serif;
  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --max-width: 1100px;
  --content-width: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.75;
  font-size: 17px;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { text-decoration: underline; }
a:active { opacity: .75; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

h1, h2, h3 { text-wrap: balance; }

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.6rem 1.5rem;
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.site-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.site-title a { color: var(--fg); }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .01em;
  position: relative;
  padding-bottom: .2rem;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right .18s ease;
}
.site-nav a:hover {
  color: var(--fg);
  text-decoration: none;
}
.site-nav a:hover::after { right: 0; }

.layout {
  max-width: var(--max-width);
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, var(--content-width)) 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; gap: 2rem; }
}

main { min-width: 0; }

.post-list-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left .2s ease;
}
.post-list-item:first-child { padding-top: 0; }
.post-list-item:last-child { border-bottom: none; }
.post-list-item:hover { padding-left: .5rem; }
.post-list-item h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  margin: 0 0 .5rem;
  line-height: 1.3;
}
.post-list-item h2 a { color: var(--fg); transition: color .15s ease; }
.post-list-item:hover h2 a { color: var(--accent); }
.post-meta {
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: .7rem;
  letter-spacing: .01em;
}
.post-excerpt { color: var(--fg); }

article.single h1.entry-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.4rem;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin: 0 0 .5rem;
}
.entry-content { font-size: 1.06rem; max-width: 68ch; }
.entry-content h2 { font-size: 1.4rem; margin-top: 2.2rem; font-weight: 600; letter-spacing: -.005em; }
.entry-content h3 { font-size: 1.15rem; margin-top: 1.7rem; font-weight: 600; }
.entry-content p { margin: 1rem 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: .5rem .7rem; text-align: left; }
.entry-content th { font-weight: 600; background: var(--panel); }
.entry-content blockquote {
  margin: 1.4rem 0;
  padding: .3rem 1.2rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.ad-slot {
  margin: 1.8rem 0;
  padding: .5rem;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: .3rem;
  text-align: center;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .07em;
}

aside.sidebar { font-size: .92rem; }
aside.sidebar .widget {
  margin-bottom: 1.4rem;
  padding: 1.4rem;
  background: var(--panel);
  border-radius: .3rem;
}
aside.sidebar .widget-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  margin-bottom: .9rem;
}
aside.sidebar input[type="search"] {
  border: 1px solid var(--border);
  border-radius: .3rem;
  padding: .5rem .7rem;
  background: var(--bg);
  transition: border-color .15s ease;
}
aside.sidebar input[type="search"]:focus { border-color: var(--accent); }
aside.sidebar input[type="submit"],
aside.sidebar button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: .3rem;
  padding: .5rem .9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease, opacity .15s ease;
}
aside.sidebar input[type="submit"]:hover,
aside.sidebar button:hover { opacity: .88; }
aside.sidebar input[type="submit"]:active,
aside.sidebar button:active { transform: scale(.97); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}
.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: .85rem;
}
.site-footer a { color: var(--muted); }

.tags { margin-top: 1.5rem; }
.tags a {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: .25rem .65rem;
  border-radius: .25rem;
  font-size: .78rem;
  font-weight: 500;
  margin: 0 .4rem .4rem 0;
  transition: background .15s ease;
}
.tags a:hover { background: var(--accent); color: #fff; text-decoration: none; }

.pagination { margin-top: 2rem; display: flex; gap: 1rem; }

.related-posts { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.related-posts h2 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-bottom: .9rem; }
.related-posts ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.related-posts li { border-bottom: 1px solid var(--border); }
.related-posts li:last-child { border-bottom: none; }
.related-posts a {
  display: block;
  padding: .8rem .2rem;
  color: var(--fg);
  font-weight: 500;
  transition: color .15s ease, padding-left .15s ease;
}
.related-posts a:hover {
  color: var(--accent);
  padding-left: .5rem;
  text-decoration: none;
}
