/* ===================================================================
   PORTFOLIO — style.css
   Edit tokens in :root to restyle the entire site from one place.
   =================================================================== */

/* @import url('https://fonts.googleapis.com/css2?family=Raleway'); */
@import url('https://fonts.googleapis.com/css?family=Montserrat');
/* ── DESIGN TOKENS ────────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg:         #0a0a0a;
  --bg2:        #111111;
  --bg3:        #1a1a1a;
  --border:     #2a2a2a;
  --text:       #e8e8e8;
  --muted:      #888;
  --blue:       #3b82f6;
  --blue-hover: #2563eb;

  /* Shape */
  --radius: 12px;

  /* Typography — change fonts here, they update everywhere */
  /* former font 'Syne' */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'Fira Code', 'Courier New', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ──────────────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo  { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 0.95rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover  { color: var(--text); }
.nav-links a.active { color: var(--blue); }

/* ── LAYOUT ───────────────────────────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

.section        { padding: 60px 0; border-top: 1px solid var(--border); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.section-title  { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; }
.view-all       { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-size: 0.9rem; text-decoration: none; }
.view-all:hover { text-decoration: underline; }

/* ── BUTTONS ──────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  padding: 12px 24px; border-radius: 8px; border: none;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: background 0.2s;
}
.btn-primary:hover { background: var(--blue-hover); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  padding: 12px 24px; border-radius: 8px; border: 1px solid var(--border);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: #555; }

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── PROJECT & BLOG CARDS ─────────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card             { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s; }
.card:hover       { border-color: #444; }
.card-img         { width: 100%; height: 180px; object-fit: cover; display: block; background: var(--bg3); }
.card-body        { padding: 20px; }
.card-title-row   { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.card-title       { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.card-title.blue  { color: var(--blue); }
.card-icons       { display: flex; gap: 8px; flex-shrink: 0; }
.card-icons a     { color: var(--muted); text-decoration: none; transition: color 0.2s; display: flex; align-items: center; }
.card-icons a:hover { color: var(--text); }
.card-desc        { color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin-bottom: 14px; }
.card-date        { color: var(--muted); font-size: 0.82rem; margin-top: 8px; }
.extra-tag        { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

/* ── TAGS ─────────────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag  { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; font-size: 0.8rem; color: var(--muted); }

/* ── BLOG LISTING CARDS ───────────────────────────────────────────── */
.blog-card-img { width: 100%; height: 200px; object-fit: cover; display: block; background: var(--bg3); }
.blog-meta     { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 0.82rem; margin-bottom: 12px; }
.blog-meta span { display: inline-flex; align-items: center; gap: 5px; }
.read-more       { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-size: 0.88rem; text-decoration: none; margin-top: 12px; }
.read-more:hover { text-decoration: underline; }

/* ── PAGE HEADER (used on /blog and /projects) ────────────────────── */
.page-header   { padding: 60px 0; }
.page-title    { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.page-subtitle { color: var(--muted); max-width: 580px; line-height: 1.7; margin-bottom: 36px; }

/* ── SEARCH BAR ───────────────────────────────────────────────────── */
.search-wrap { position: relative; max-width: 400px; margin-bottom: 40px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input {
  width: 100%; padding: 12px 16px 12px 40px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem; outline: none;
}
.search-input:focus { border-color: var(--blue); }

/* ── FILTER BAR (Projects page) ───────────────────────────────────── */
.filter-bar    { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 36px; }
.filter-label  { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; margin-right: 4px; }
.filter-tag    { padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; text-decoration: none; transition: all 0.15s; background: var(--bg2); border: 1px solid var(--border); color: var(--muted); }
.filter-tag:hover  { color: var(--text); border-color: #555; }
.filter-tag.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── HERO ─────────────────────────────────────────────────────────── */
.hero       { padding: 80px 0 60px; }
.hero-name  { font-family: var(--font-heading); font-size: clamp(2.4rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero-title { font-family: var(--font-heading); font-size: clamp(2.4rem, 5vw, 3rem); font-weight: 400; line-height: 1.1; margin-bottom: 20px; }
.hero-bio   { font-size: 1.05rem; color: var(--muted); max-width: 580px; line-height: 1.7; margin-bottom: 32px; }

/* ── STATS CAROUSEL ───────────────────────────────────────────────── */
@keyframes stats-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.stats-carousel  { overflow: hidden; margin-top: 48px; }
.stats-track     { display: flex; gap: 16px; width: max-content; animation: stats-scroll 50s linear infinite; }
.stats-track:hover { animation-play-state: paused; }

.stat-card  { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; min-width: 240px; flex-shrink: 0; }
.stat-icon  { margin-bottom: 12px; }
.stat-value { font-family: var(--font-heading); font-size: 1.9rem; font-weight: 700; }
.stat-label { font-size: 0.92rem; font-weight: 600; margin-top: 4px; margin-bottom: 8px; }
.stat-desc  { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

/* ── ABOUT SECTION ────────────────────────────────────────────────── */
.about-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-bio     { color: var(--muted); line-height: 1.8; margin-bottom: 20px; font-size: 0.97rem; }
.skills-heading { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; }
.skills-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skill-pill    { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; font-size: 0.9rem; text-align: center; }

/* ── BLOG POST ────────────────────────────────────────────────────── */
.post-wrap    { max-width: 800px; margin: 0 auto; padding: 40px 40px 80px; }
.back-link    { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); text-decoration: none; font-size: 0.9rem; margin-bottom: 32px; }
.back-link:hover { text-decoration: underline; }
.post-hero    { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius); display: block; margin-bottom: 36px; }
.post-title   { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.post-meta    { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.post-tags    { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.post-tag     { display: inline-flex; align-items: center; gap: 5px; background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 0.82rem; color: var(--muted); }
.post-footer  { border-top: 1px solid var(--border); margin-top: 48px; padding-top: 32px; }

.post-content h2         { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 700; margin: 36px 0 14px; }
.post-content h3         { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; color: var(--blue); margin: 28px 0 10px; }
.post-content p          { color: var(--muted); line-height: 1.8; margin-bottom: 18px; font-size: 0.97rem; }
.post-content ul,
.post-content ol         { color: var(--muted); line-height: 1.8; margin: 0 0 18px 24px; font-size: 0.97rem; }
.post-content li         { margin-bottom: 6px; }
.post-content li strong  { color: var(--text); font-weight: 600; }
.post-content pre        { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 20px; overflow-x: auto; margin-bottom: 18px; }
.post-content code       { font-family: var(--font-mono); font-size: 0.88rem; color: #7dd3fc; }
.post-content blockquote { border-left: 3px solid var(--blue); padding: 12px 20px; margin: 24px 0; color: var(--muted); font-style: italic; background: var(--bg2); border-radius: 0 8px 8px 0; }
.post-content hr         { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.post-content a          { color: var(--blue); }
.post-content img        { max-width: 100%; border-radius: var(--radius); margin: 16px 0; }

/* ── CONTACT SECTION ──────────────────────────────────────────────── */
.contact-section  { padding: 80px 0 60px; border-top: 1px solid var(--border); text-align: center; }
.contact-title    { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.contact-subtitle { color: var(--muted); max-width: 480px; margin: 0 auto 36px; line-height: 1.7; }
.contact-links    { display: flex; justify-content: center; gap: 12px; margin-bottom: 36px; }
.contact-socials  { display: flex; justify-content: center; gap: 24px; }
.social-icon      { color: var(--muted); transition: color 0.2s; }
.social-icon:hover { color: var(--text); }

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav           { padding: 16px 20px; }
  .page         { padding: 0 20px; }
  .cards-grid   { grid-template-columns: 1fr; }
  .about-grid   { grid-template-columns: 1fr; gap: 32px; }
  .post-wrap    { padding: 24px 20px 60px; }
  .hero-name,
  .hero-title   { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}
