/* ==========================================================================
   PakJobSolution — dark editorial theme
   Inspired by modern dev-blog aesthetics, warmed up:
   deep charcoal canvas, amber → coral accents, serif display type.
   Mobile-first, no framework, ~single file.
   ========================================================================== */

:root {
  --bg:            #0B0B0D;
  --bg-soft:       #101014;
  --surface:       #15151A;
  --surface-2:     #1B1B21;
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text:          #F5F3EE;
  --text-soft:    #D8D4CC;
  --muted:         #A39E93;

  --amber:         #F5A524;
  --amber-deep:    #D98A12;
  --coral:         #FF6B4A;
  --amber-dim:     rgba(245, 165, 36, 0.12);
  --gradient:      linear-gradient(135deg, #F5A524 0%, #FF6B4A 100%);

  --serif: Georgia, 'Times New Roman', 'Nimbus Roman', serif;
  --sans:  system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 14px;
  --max-w: 1160px;
  --measure: 68ch;
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(245, 165, 36, 0.07), transparent 60%),
    radial-gradient(900px 420px at 10% 0%, rgba(255, 107, 74, 0.05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--coral); }

::selection { background: rgba(245, 165, 36, 0.35); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: calc(var(--measure) + 2.5rem); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--amber); color: #111; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 64px;
}

.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--gradient); color: #14100a; font-size: 1rem;
}
.brand-text { font-weight: 700; letter-spacing: 0.01em; font-size: 1.05rem; }

.main-nav { display: flex; gap: 0.25rem; margin-left: 0.5rem; }
.main-nav a {
  color: var(--muted); font-size: 0.95rem; font-weight: 500;
  padding: 0.45rem 0.8rem; border-radius: 8px;
}
.main-nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.main-nav a.active { color: var(--amber); }

.header-search { margin-left: auto; display: flex; }
.header-search input {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px 0 0 9px;
  padding: 0.45rem 0.7rem; font-size: 0.9rem; width: 170px;
}
.header-search input::placeholder { color: var(--muted); }
.header-search button {
  border: 1px solid var(--border); border-left: 0;
  background: var(--surface-2); color: var(--amber);
  border-radius: 0 9px 9px 0; padding: 0 0.8rem; cursor: pointer;
  font-size: 1rem;
}
.header-search button:hover { background: var(--amber); color: #14100a; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 0.4rem 0.7rem; font-size: 1.1rem; cursor: pointer;
}
.mobile-nav { display: none; }

/* ------------------------------------------------------------------ hero */
.hero { padding: 4.5rem 0 2.5rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--amber); margin: 0 0 1rem;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(245,165,36,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(245,165,36,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,165,36,0); }
}

.hero-card a { display: block; color: var(--text); }
.hero-card a:hover { color: var(--text); }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.08; letter-spacing: -0.015em;
  margin: 1rem 0 1.1rem; font-weight: 700;
}
.hero-card a:hover .hero-title {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-excerpt { color: var(--text-soft); font-size: 1.15rem; max-width: 62ch; margin: 0 0 1.25rem; }
.hero-meta { display: flex; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.92rem; flex-wrap: wrap; }
.hero-cta { margin-left: auto; color: var(--amber); font-weight: 600; }
.dot { opacity: 0.5; }

/* ------------------------------------------------------------------ sections */
.section { padding: 3rem 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.75rem;
}
.section-head h2 {
  font-family: var(--serif); font-size: 1.9rem; margin: 0; letter-spacing: -0.01em;
}
.text-link { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

.page-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0.5rem 0 0.75rem;
}
.page-sub { color: var(--muted); font-size: 1.08rem; margin: 0 0 2rem; max-width: 60ch; }

/* ------------------------------------------------------------------ cards */
.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 165, 36, 0.45);
  box-shadow: 0 18px 40px -18px rgba(245, 165, 36, 0.25);
}
.card-link { display: block; color: var(--text); height: 100%; }
.card-link:hover { color: var(--text); }

.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .card-media img { transform: scale(1.04); }

.card-body { padding: 1.25rem 1.35rem 1.4rem; }
.card-title {
  font-family: var(--serif); font-size: 1.32rem; line-height: 1.3;
  margin: 0.7rem 0 0.55rem; letter-spacing: -0.01em;
}
.card-excerpt { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: 0.85rem; display: flex; gap: 0.6rem; align-items: center; }

.chip {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber); background: var(--amber-dim);
  border: 1px solid rgba(245, 165, 36, 0.3);
  padding: 0.28rem 0.7rem; border-radius: 999px;
}
.chip-lg { font-size: 0.78rem; }

/* topic chips (homepage) */
.topic-chips { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.topic-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 0.7rem 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: border-color 0.2s, transform 0.2s;
}
.topic-chip:hover { border-color: var(--amber); color: var(--text); transform: translateY(-2px); }
.topic-chip .count {
  font-size: 0.78rem; color: var(--amber); background: var(--amber-dim);
  border-radius: 999px; padding: 0.1rem 0.55rem;
}

/* ------------------------------------------------------------------ article */
.article { padding: 3.5rem 0 2rem; }
.article-head { margin-bottom: 2.25rem; }
.article-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1.14; letter-spacing: -0.015em;
  margin: 1rem 0 1rem;
}
.article-meta { color: var(--muted); font-size: 0.95rem; display: flex; gap: 0.7rem; align-items: center; }
.article-hero-img { margin: 2rem 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

.article-body { font-size: 1.08rem; line-height: 1.85; color: var(--text-soft); }
.article-body > *:first-child { margin-top: 0; }
.article-body h2, .article-body h3, .article-body h4 {
  font-family: var(--serif); color: var(--text); line-height: 1.3;
  margin: 2.4em 0 0.8em; letter-spacing: -0.01em;
}
.article-body h2 { font-size: 1.75rem; }
.article-body h3 { font-size: 1.4rem; }
.article-body p { margin: 1.3em 0; }
.article-body ul, .article-body ol { margin: 1.3em 0; padding-left: 1.5rem; }
.article-body li { margin: 0.45em 0; }
.article-body li::marker { color: var(--amber); }
.article-body blockquote {
  border-left: 3px solid var(--amber); margin: 1.8em 0;
  padding: 0.4em 0 0.4em 1.2em; color: var(--text); font-style: italic;
  background: var(--amber-dim); border-radius: 0 10px 10px 0;
}
.article-body code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 0.15em 0.45em; border-radius: 6px; color: var(--amber);
}
.article-body pre {
  background: #0e0e11; border: 1px solid var(--border);
  border-radius: 12px; padding: 1.2rem; overflow-x: auto;
}
.article-body pre code { background: none; border: 0; padding: 0; color: var(--text-soft); }
.article-body img { border-radius: 12px; border: 1px solid var(--border); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.95rem; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 0.65rem 0.9rem; text-align: left; }
.article-body th { background: var(--surface-2); color: var(--text); }
.article-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

.article-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 2.5rem 0 1.5rem; }
.tag-chip {
  font-size: 0.88rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.9rem;
}
.tag-chip:hover { color: var(--amber); border-color: var(--amber); }

.share-row {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.25rem 0; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.95rem;
}
.share-row a { font-weight: 600; }
.copy-link {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 0.4rem 0.9rem; cursor: pointer; font-size: 0.88rem;
}
.copy-link:hover { border-color: var(--amber); color: var(--amber); }

/* ad slots */
.ad-slot { margin: 2rem 0; text-align: center; }
.ad-slot iframe, .ad-slot ins { max-width: 100%; }

/* ------------------------------------------------------------------ pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin: 3rem 0 1rem; flex-wrap: wrap; }
.page-link {
  min-width: 42px; text-align: center;
  padding: 0.55rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--border); color: var(--text-soft); font-weight: 600; font-size: 0.95rem;
}
.page-link:hover { border-color: var(--amber); color: var(--amber); }
.page-link.active { background: var(--gradient); color: #14100a; border-color: transparent; }

/* ------------------------------------------------------------------ search */
.search-form { display: flex; gap: 0.6rem; margin: 0 0 2rem; max-width: 560px; }
.search-form input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 0.7rem 1rem; font-size: 1rem;
}
.search-form input:focus { outline: none; border-color: var(--amber); }
.search-form button, .btn {
  border: 0; border-radius: 10px; padding: 0.7rem 1.4rem;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.btn-primary, .search-form button {
  background: var(--gradient); color: #14100a;
}
.btn-primary:hover, .search-form button:hover { filter: brightness(1.08); color: #14100a; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

.empty-note { color: var(--muted); font-size: 1.05rem; padding: 2rem 0; }

.not-found { text-align: center; padding: 2rem 0 4rem; }
.not-found-actions { display: flex; gap: 0.8rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------ footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  margin-top: 2rem; padding: 3.5rem 0 0;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr;
  padding-bottom: 2.5rem;
}
.footer-tagline { color: var(--muted); font-size: 0.95rem; max-width: 34ch; }
.footer-col h4 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin: 0 0 1rem;
}
.footer-col a { display: block; color: var(--text-soft); padding: 0.3rem 0; font-size: 0.95rem; }
.footer-col a:hover { color: var(--amber); }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.social-links a { font-size: 0.9rem; font-weight: 600; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--muted); font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .main-nav, .header-search { display: none; }
  .nav-toggle { display: block; }
  .mobile-nav {
    display: flex; flex-direction: column;
    border-top: 1px solid var(--border); padding: 0.5rem 1.25rem 1rem;
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a { color: var(--text-soft); padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
  .mobile-nav a:last-child { border-bottom: 0; }
  .hero { padding: 3rem 0 1.75rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
