/*
Theme Name: FarzadBagheri
Theme URI: https://farzadbagheri.fr
Author: Farzad Bagheri & ChatGPT
Author URI: https://farzadbagheri.fr
Description: Ultra‑chic, fast, fully custom theme (no FSE). Uses Poppins, elegant grid, dark/light mode, GSAP touches.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: farzadbagheri
*/

/* Design Tokens */
:root {
  --fb-accent: #33cccc;
  --fb-bg: #0f1115;
  --fb-bg-soft: #151823;
  --fb-text: #e6e8ee;
  --fb-text-soft: #b8bdc9;
  --fb-card: #0f121a;
  --fb-border: #22283a;
}

:root.light {
  --fb-bg: #ffffff;
  --fb-bg-soft: #fafafa;
  --fb-text: #121317;
  --fb-text-soft: #5a5f6b;
  --fb-card: #ffffff;
  --fb-border: #eaeaea;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  background: var(--fb-bg);
  color: var(--fb-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

/* Layout */
.container { width: min(1200px, 92%); margin-inline: auto; }
.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }

/* Header */
.fb-header { position: sticky; top: 0; z-index: 50; background: rgba(15,17,21,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--fb-border); }
:root.light .fb-header { background: rgba(255,255,255,.85); }
.fb-nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.fb-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; }
.fb-brand a { color: var(--fb-text); text-decoration: none; font-size: 1.05rem; }
.fb-menu { display: flex; gap: 22px; align-items: center; }
.fb-menu a { color: var(--fb-text-soft); text-decoration: none; font-weight: 500; position: relative; }
.fb-menu a:hover { color: var(--fb-text); }
.fb-cta { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--fb-border); text-decoration: none; color: var(--fb-text); }
.fb-cta--accent { border-color: transparent; background: var(--fb-accent); color: #071a1a; font-weight: 600; }

.fb-menu-list {
  display: flex;
  gap: 22px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fb-menu-list a {
  color: var(--fb-text-soft);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color .2s ease;
}

.fb-menu-list a:hover {
  color: var(--fb-text);
}

.fb-menu-list a.active {
  color: var(--fb-accent);
}

.fb-menu-list a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: var(--fb-accent);
}

/* Tiny origin tag */
.fb-origin-tag {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--fb-border);
  color: var(--fb-text-soft);
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
}



/* Mobile Nav */
.fb-burger { display: none; border: 1px solid var(--fb-border); width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 900px) {
  .fb-burger { display: inline-flex; }
  .fb-menu { display: none; }
  .fb-drawer { position: fixed; inset: 70px 0 0; background: var(--fb-bg); padding: 20px; border-top: 1px solid var(--fb-border); display: none; flex-direction: column; gap: 16px; }
  .fb-drawer a { color: var(--fb-text); text-decoration: none; font-weight: 600; }
  .fb-drawer.open { display: flex; }
}

/* Mobile Drawer (hidden by default) */
.fb-drawer {
  display: none;
}

/* Theme toggle */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--fb-border); border-radius: 999px; cursor: pointer; user-select: none; }
.theme-toggle i { font-size: 18px; }

/* Hero */
.hero { padding: 120px 0 80px; background: radial-gradient(1000px 400px at 20% -200px, rgba(51,204,204,.25), transparent 60%), radial-gradient(900px 400px at 100% -250px, rgba(51,204,204,.18), transparent 60%); }
.hero-wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.05; margin: 0 0 14px; }
.hero p.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--fb-text-soft); margin: 0 0 24px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-card { border: 1px solid var(--fb-border); background: var(--fb-card); border-radius: 18px; padding: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.18); }

@media (max-width: 900px){ .hero-wrap { grid-template-columns: 1fr; } }

/* Cards */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .grid--3 { grid-template-columns: 1fr; } .grid--2 { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--fb-border); background: var(--fb-card); border-radius: 18px; padding: 22px; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--fb-text-soft); }

/* Section titles */
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 24px; }
.section-title .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fb-accent); box-shadow: 0 0 0 6px rgba(51,204,204,.15); }
.section-title h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 2rem); }

/* Footer */
.fb-footer {
  border-top: 1px solid var(--fb-border);
  padding: 24px 0 22px;
  color: var(--fb-text-soft);
  font-size: 0.9rem;
}

.fb-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.fb-footer-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fb-footer-name {
  font-weight: 600;
  color: var(--fb-text);
}

.fb-footer-role {
  font-size: 0.8rem;
}

.fb-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.fb-origin-tag {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--fb-border);
  color: var(--fb-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.fb-footer-accent span {
  color: var(--fb-accent);
}

.fb-footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fb-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--fb-text-soft);
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.fb-footer-links a i {
  font-size: 14px;
}

.fb-footer-links a:hover {
  color: var(--fb-accent);
  border-color: var(--fb-accent);
  background: rgba(51,204,204,0.06);
}

.fb-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  opacity: 0.8;
  margin-top: 2px;
}

.fb-footer-small {
  font-style: italic;
}

@media (max-width: 700px) {
  .fb-footer-top {
    align-items: flex-start;
  }
  .fb-footer-meta {
    align-items: flex-start;
  }
}


/* Contact */
.contact-form { display: grid; gap: 12px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--fb-border); background: var(--fb-bg-soft); color: var(--fb-text); }
.contact-form button { padding: 12px 16px; border: none; border-radius: 999px; background: var(--fb-accent); color: #071a1a; font-weight: 700; cursor: pointer; }

/* Utilities */
.muted { color: var(--fb-text-soft); }
.center { text-align: center; }


/* Timeline */
.timeline {
  margin-top: 12px;
  padding-left: 26px;         /* + space between dots & text */
  border-left: 1px solid var(--fb-border);
  display: grid;
  gap: 10px;
}
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--fb-accent);
}
.timeline-year {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fb-text-soft);
  margin-bottom: 2px;
}
.timeline-title {
  font-weight: 600;
  margin-top: 2px;
}
.timeline-text {
  font-size: 0.9rem;
  color: var(--fb-text-soft);
}

/* Tech badges */
.stack-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.stack-badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--fb-border);
  font-size: 0.78rem;
  color: var(--fb-text-soft);
}



/* Blog */

.post-meta {
  display: flex;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fb-text-soft);
  margin-bottom: 4px;
}

.post-title {
  font-size: 1.05rem;
  margin: 0 0 6px;
  color: var(--fb-text);
}

.post-readmore {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--fb-accent);
}

.post-meta-single {
  margin-bottom: 10px;
}

.post-content {
  line-height: 1.7;
  font-size: 0.98rem;
  color: var(--fb-text-soft);
}

.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--fb-text);
  margin-top: 22px;
}

.post-content a {
  color: var(--fb-accent);
  text-decoration: none;
}

.post-bottom-nav {
  margin-top: 14px;
  font-size: 0.85rem;
}

.post-bottom-nav a {
  color: var(--fb-accent);
  text-decoration: none;
}

.blog-pagination {
  margin-top: 26px;
  text-align: center;
}

.blog-pagination .page-numbers {
  display: inline-block;
  margin: 0 4px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  color: var(--fb-text-soft);
  text-decoration: none;
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
  border-color: var(--fb-accent);
  color: var(--fb-accent);
}


.post-thumb img {
  display: block;
  width: 100%;
  height: 190px;        /* a bit taller so all text fits */
  object-fit: cover;    /* keeps uniform look, minimal crop */
}

.post-thumb-single {
  margin-bottom: 14px;
  border-radius: 18px;
  overflow: hidden;
}

.post-thumb-single img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.post-card {
  padding: 0;
  overflow: hidden;
}

.post-card-link {
  display: block;
  padding: 18px 18px 18px;
  text-decoration: none;
  color: inherit;
}

/* .post-hero {
  margin: 32px auto 24px;
  max-width: 720px;            
  border-radius: 22px;
  overflow: hidden;
}

.post-hero img {
  display: block;
  width: 100%;
  height: auto;                
  border-radius: 22px;
}
 */



/* Single post header layout */

.post-header {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 32px 0 22px;
}

.post-header-thumb {
  flex: 0 0 260px;         /* fixed visual size */
  max-width: 260px;
}

.post-header-thumb img {
  width: 100%;
  height: auto;            /* full image, no crop */
  border-radius: 18px;
  display: block;
}

.post-header-text {
  flex: 1;
}

.post-header-text .section-title {
  margin-bottom: 10px;
}

.post-header-text .section-title h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
}

/* keep existing .post-meta-single styles */

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .post-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-header-thumb {
    max-width: 100%;
  }
}
