/* ============================================================
   tighov.link — custom Pelican theme
   Palette: off-white bg, teal accent #1D9E75, dark text
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&family=Outfit:wght@300;400;500;600&display=swap');

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:       #1D9E75;
  --accent-light: #E1F5EE;
  --accent-mid:   #5DCAA5;
  --accent-dark:  #0F6E56;
  --text:         #1a1a18;
  --text-muted:   #6b6b66;
  --text-faint:   #9e9e99;
  --border:       rgba(0,0,0,0.10);
  --border-med:   rgba(0,0,0,0.18);
  --bg:           #fafaf8;
  --bg-surface:   #f3f3f0;
  --radius:       8px;
  --radius-lg:    12px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Layout wrapper ───────────────────────────────────────── */
.site-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navbar ───────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  padding: 0.875rem 0;
}

.site-nav .site-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.4px;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-links a.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 0.375rem 1rem;
  border-radius: var(--radius);
}
.nav-links a.nav-cta:hover { background: var(--accent-dark); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 3rem 0 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  border-bottom: 0.5px solid var(--border);
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.875rem;
}

.hero-name {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}
.hero-name em { font-style: italic; color: var(--accent); }

.hero-tagline {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  border: 0.5px solid var(--border-med);
  color: var(--text-muted);
  background: var(--bg-surface);
}
.tag.accent {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--accent-mid);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 0.5px solid var(--border-med);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Hero avatar column */
.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.avatar-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2.5px solid var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.availability-pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 0.5px solid var(--accent-mid);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  white-space: nowrap;
}
.availability-pill::before { content: '● '; font-size: 0.5rem; }

/* ── Stats row ────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 0.5px solid var(--border);
}

.stat-item {
  padding: 1.25rem 1rem;
  border-right: 0.5px solid var(--border);
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.875rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-num sup { font-size: 1.1rem; color: var(--accent); vertical-align: super; }

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Main two-column grid ─────────────────────────────────── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  padding-top: 1.75rem;
}

/* ── Post list (index) ────────────────────────────────────── */
.posts-col {
  padding-right: 2rem;
  border-right: 0.5px solid var(--border);
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.post-item {
  padding: 1.25rem 0;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: none;
}
.post-item:last-child { border-bottom: none; }
.post-item:hover .post-title { color: var(--accent); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.post-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  color: var(--text-faint);
}

.post-dot {
  width: 3px;
  height: 3px;
  background: var(--border-med);
  border-radius: 50%;
}

.post-tag-pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 0.5px solid var(--border);
}

.post-title {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.375rem;
  color: var(--text);
  transition: color 0.15s;
}

.post-excerpt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  padding-left: 1.75rem;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.cv-links {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.cv-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--text);
  text-decoration: none !important;
  transition: border-color 0.15s, color 0.15s;
}
.cv-link svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.cv-link:hover { border-color: var(--accent); color: var(--accent); }
.cv-link:hover svg { color: var(--accent); }

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.skill-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  border: 0.5px solid var(--border-med);
  color: var(--text-muted);
}
.skill-tag.k8s   { background: #E6F1FB; color: #185FA5; border-color: #85B7EB; }
.skill-tag.gcp   { background: #FCEBEB; color: #A32D2D; border-color: #F09595; }
.skill-tag.aws   { background: #FAEEDA; color: #854F0B; border-color: #EF9F27; }
.skill-tag.iac   { background: #EAF3DE; color: #3B6D11; border-color: #97C459; }
.skill-tag.ci    { background: #EEEDFE; color: #534AB7; border-color: #AFA9EC; }

.contact-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.125rem;
}
.contact-box p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.875rem;
}
.contact-box .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.8125rem;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.page-btn {
  padding: 0.375rem 0.875rem;
  border: 0.5px solid var(--border-med);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  text-decoration: none !important;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.page-btn:hover,
.page-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ── Article (single post) ────────────────────────────────── */
.article-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 2rem;
}

.article-header .hero-eyebrow { margin-bottom: 0.75rem; }

.article-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.article-byline {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-faint);
  display: flex;
  gap: 1rem;
}

.article-body {
  max-width: 660px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body h2, .article-body h3 {
  font-family: 'DM Serif Display', serif;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.article-body h2 { font-size: 1.4rem; }
.article-body h3 { font-size: 1.15rem; }

.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: 0.4rem; }

.article-body code {
  font-family: 'DM Mono', monospace;
  font-size: 0.875em;
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 0.5px solid var(--border);
}

.article-body pre {
  background: #1a1a18;
  color: #e8e8e4;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: inherit;
}

/* ── Projects page ────────────────────────────────────────── */
.page-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 2rem;
}
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}
.page-title em { font-style: italic; color: var(--accent); }
.page-subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.65;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
}

.project-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.project-card:hover {
  border-color: var(--accent-mid);
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.875rem;
  gap: 0.5rem;
}

.project-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.project-icon svg { width: 20px; height: 20px; }
.icon-teal  { background: var(--accent-light); color: var(--accent-dark); }
.icon-blue  { background: #E6F1FB; color: #185FA5; }
.icon-amber { background: #FAEEDA; color: #854F0B; }
.icon-purple{ background: #EEEDFE; color: #534AB7; }
.icon-green { background: #EAF3DE; color: #3B6D11; }
.icon-coral { background: #FAECE7; color: #993C1D; }

.project-status {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}
.status-live   { background: var(--accent-light); color: var(--accent-dark); border: 0.5px solid var(--accent-mid); }
.status-wip    { background: #FAEEDA; color: #854F0B; border: 0.5px solid #EF9F27; }
.status-archived { background: var(--bg-surface); color: var(--text-faint); border: 0.5px solid var(--border); }

.project-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.project-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border: 0.5px solid var(--border-med);
  border-radius: 5px;
  text-decoration: none !important;
  transition: border-color 0.15s, color 0.15s;
}
.project-link:hover { border-color: var(--accent); color: var(--accent); }
.project-link svg { width: 13px; height: 13px; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 0.5px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-faint);
}
.footer-copy a { color: var(--text-faint); text-decoration: underline; }

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}
.footer-links a {
  font-size: 0.75rem;
  color: var(--text-faint);
}
.footer-links a:hover { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-aside { flex-direction: row; align-items: center; justify-content: flex-start; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .main-grid { grid-template-columns: 1fr; }
  .posts-col { border-right: none; padding-right: 0; }
  .sidebar { padding-left: 0; border-top: 0.5px solid var(--border); padding-top: 2rem; margin-top: 1rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 1rem; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .hero-name { font-size: 2.25rem; }
  .nav-links .nav-hide { display: none; }
}
