@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --canvas: #f7f7f4;
  --canvas-soft: #fafaf7;
  --surface-card: #ffffff;
  --surface-strong: #e6e5e0;
  --primary: #f54e00;
  --primary-active: #d04200;
  --ink: #26251e;
  --body: #5a5852;
  --body-strong: #26251e;
  --muted: #807d72;
  --muted-soft: #a09c92;
  --on-primary: #ffffff;
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  --success: #1f8a65;
  --error: #cf2d56;
  --rounded-xs: 4px;
  --rounded-sm: 6px;
  --rounded-md: 8px;
  --rounded-lg: 12px;
  --rounded-xl: 16px;
  --rounded-pill: 9999px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--canvas);
  color: var(--body);
  line-height: 1.5;
  font-weight: 400;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAV */
.site-nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  line-height: 1.4;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--ink); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.2s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 24px;
  gap: 16px;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--body);
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

/* HERO */
.hero {
  padding: 80px 0;
  border-bottom: 1px solid var(--hairline);
}

.hero-label {
  display: inline-block;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  border-radius: var(--rounded-pill);
  padding: 4px 10px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 72px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -2.16px;
  color: var(--ink);
  max-width: 860px;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  max-width: 560px;
  margin-bottom: 0;
}

/* SECTION */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--hairline);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.section-title {
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.72px;
  color: var(--ink);
  margin-bottom: 48px;
}

.section-title-sm {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin-bottom: 32px;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--hairline-strong); }

.card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 12px;
}

.card-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  margin-bottom: 16px;
}

.card-date {
  font-size: 13px;
  color: var(--muted);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--rounded-md);
  margin-bottom: 16px;
}

.card-link {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-top: 1px solid var(--hairline-soft);
  padding-top: 16px;
  margin-top: 16px;
}

.card-link:hover { color: var(--primary); }

/* ARTICLE CARD */
.article-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  overflow: hidden;
  transition: border-color 0.15s;
}

.article-card:hover { border-color: var(--hairline-strong); }

.article-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-body { padding: 20px 24px 24px; }

/* BREADCRUMB */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { color: var(--hairline-strong); }

/* ARTICLE PAGE */
.article-hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--hairline);
}

.article-hero .tag {
  display: inline-block;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  border-radius: var(--rounded-pill);
  padding: 4px 10px;
  margin-bottom: 20px;
}

.article-hero h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--ink);
  max-width: 780px;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.article-meta .dot { color: var(--hairline-strong); }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  padding: 48px 0 80px;
  align-items: start;
}

.article-content h2 {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin: 40px 0 16px;
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin: 28px 0 12px;
}

.article-content p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  margin-bottom: 20px;
}

.article-content ul, .article-content ol {
  margin: 0 0 20px 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

.article-content li { margin-bottom: 8px; }

.article-content img {
  border-radius: var(--rounded-lg);
  margin: 28px 0;
  width: 100%;
}

.article-content .caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: -20px;
  margin-bottom: 28px;
}

.article-content a { color: var(--primary); text-decoration: underline; }

.info-box {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 20px 24px;
  margin: 28px 0;
}

.info-box-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.info-box p, .info-box li {
  font-size: 14px;
  color: var(--body);
  margin-bottom: 8px;
}

.code-block {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  margin: 20px 0;
  overflow-x: auto;
}

/* SIDEBAR */
.sidebar { position: sticky; top: 80px; }

.sidebar-box {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline-soft);
}

.sidebar-links { display: flex; flex-direction: column; gap: 10px; }

.sidebar-links a {
  font-size: 14px;
  color: var(--body);
  line-height: 1.4;
  padding: 6px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.sidebar-links a:hover { color: var(--ink); }
.sidebar-links a:last-child { border-bottom: none; }

.toc-list { display: flex; flex-direction: column; gap: 8px; }

.toc-list a {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.toc-list a:hover { color: var(--ink); }

/* FORM */
.contact-form {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 32px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--rounded-md);
  padding: 12px 16px;
  font-size: 16px;
  color: var(--ink);
  font-family: inherit;
  height: 44px;
  transition: border-color 0.15s;
}

.form-group textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 18px;
  height: 40px;
  border-radius: var(--rounded-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}

.btn-primary:hover { background: var(--primary-active); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.form-success {
  display: none;
  background: #f0faf6;
  border: 1px solid #9fd4be;
  border-radius: var(--rounded-md);
  padding: 16px;
  font-size: 14px;
  color: var(--success);
  margin-top: 16px;
}

.form-success.visible { display: block; }

/* DIVIDER */
.divider { height: 1px; background: var(--hairline); }

/* FOOTER */
.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.footer-brand span { color: var(--primary); }

.footer-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
}

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
}

.footer-links a:hover { color: var(--ink); }

.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

.footer-legal { display: flex; gap: 20px; }

.footer-legal a {
  font-size: 13px;
  color: var(--muted);
}

.footer-legal a:hover { color: var(--ink); }

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--rounded-lg);
  padding: 20px 28px;
  max-width: 560px;
  width: calc(100% - 48px);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 999;
  box-shadow: none;
  border: 1px solid rgba(255,255,255,0.08);
}

.cookie-banner.hidden { display: none; }

.cookie-text {
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.cookie-text a { color: var(--canvas); text-decoration: underline; }

.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-cookie-accept {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--rounded-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-cookie-reject {
  background: transparent;
  color: var(--canvas-soft);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--rounded-md);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  white-space: nowrap;
}

/* PAGE HEADER */
.page-header {
  padding: 48px 0;
  border-bottom: 1px solid var(--hairline);
}

.page-header .tag {
  display: inline-block;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  border-radius: var(--rounded-pill);
  padding: 4px 10px;
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--ink);
  max-width: 680px;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  max-width: 520px;
}

/* PAGE CONTENT */
.page-content {
  padding: 48px 0 80px;
  max-width: 780px;
}

.page-content h2 {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin: 40px 0 16px;
}

.page-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin: 28px 0 12px;
}

.page-content p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  margin-bottom: 20px;
}

.page-content ul, .page-content ol {
  margin: 0 0 20px 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
}

.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }

.page-content li { margin-bottom: 8px; }

.page-content a { color: var(--primary); text-decoration: underline; }

.updated-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline-soft);
}

/* DISCLAIMER */
.disclaimer-box {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 16px 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 32px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero h1 { font-size: 56px; letter-spacing: -1.5px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 40px; letter-spacing: -1px; }
  .section-title { font-size: 28px; }
  .article-hero h1 { font-size: 32px; letter-spacing: -0.5px; }
  .page-header h1 { font-size: 32px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .cards-grid, .cards-grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 48px 0; }
  .section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
