/*
Theme Name: iMilad
Theme URI: https://imilad.com
Author: Milad Ehrampoosh
Author URI: https://imilad.com
Description: قالب شخصی میلاد — صفحه اول رزومه‌محور با بخش یوتیوب، و وبلاگ با آرشیو ماهانه برای حفظ کامل آرشیو ۱۵ ساله. راست‌چین و فارسی، با پالت سرمه‌ای مدرن.
Version: 1.4.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: imilad
Tags: rtl-language-support, blog, portfolio, custom-menu, one-column
*/

/* ---------------------------------------------------------------
   Tokens — سرمه‌ای مدرن + آبی الکتریک
--------------------------------------------------------------- */
:root {
  --bg:        #F5F7FB;
  --bg-soft:   #EDF1F7;
  --navy:      #0A1B33;
  --navy-2:    #10264A;
  --navy-3:    #1A3560;
  --ink:       #16233A;
  --ink-soft:  #4A5A74;
  --muted:     #7C8AA0;
  --accent:    #3E7BFA;
  --accent-2:  #6FA0FF;
  --accent-deep: #2A5FD6;
  --line:      #E1E7F0;
  --line-dark: rgba(255, 255, 255, .12);
  --card:      #FFFFFF;
  --on-navy:   #E8EEF9;
  --on-navy-muted: #9FB0CC;

  --font-display: "Estedad", "Vazirmatn", system-ui, sans-serif;
  --font-body:    "Vazirmatn", system-ui, sans-serif;

  --maxw: 1080px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 34px rgba(10, 27, 51, .10);
  --shadow-accent: 0 8px 24px rgba(62, 123, 250, .35);
}

/* ---------------------------------------------------------------
   Base
--------------------------------------------------------------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-deep); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 .5em;
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------------------------------------------------------------
   Header — شیشه‌ای روی سرمه‌ای
--------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 27, 51, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.site-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-brand:hover { color: var(--accent-2); }
.site-brand .brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  display: inline-block;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--on-navy-muted);
  font-weight: 500;
  font-size: .95rem;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--line-dark);
    border-radius: 10px;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: .9rem;
    color: #fff;
    cursor: pointer;
  }
  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--navy);
    border-bottom: 1px solid var(--line-dark);
    display: none;
    padding: 12px 24px 18px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { display: block; }
}

/* ---------------------------------------------------------------
   Hero — سرمه‌ای عمیق با درخشش آبی
--------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(900px 420px at 82% -10%, rgba(62, 123, 250, .28), transparent 60%),
    radial-gradient(700px 380px at 8% 110%, rgba(111, 160, 255, .12), transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 84px 0 72px;
  color: var(--on-navy);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: -1; justify-self: center; }
}

.hero-eyebrow {
  display: inline-block;
  color: var(--accent-2);
  background: rgba(62, 123, 250, .14);
  border: 1px solid rgba(111, 160, 255, .3);
  border-radius: 999px;
  padding: 5px 16px;
  font-weight: 600;
  font-size: .88rem;
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
}

.hero-bio {
  color: var(--on-navy-muted);
  font-size: 1.05rem;
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 30px rgba(62, 123, 250, .45); }
.btn-ghost {
  border-color: rgba(255, 255, 255, .25);
  color: #fff;
  background: rgba(255, 255, 255, .06);
}
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* نسخه دکمه‌ها روی زمینه روشن */
.section .btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--card);
}
.section .btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }

/* پرتره با هاله آبی */
.hero-media { position: relative; width: min(320px, 80vw); }
.hero-media::before {
  content: "";
  position: absolute;
  inset: -22px;
  background: radial-gradient(closest-side, rgba(62, 123, 250, .35), transparent 72%);
  filter: blur(6px);
}
.hero-media img,
.hero-media .portrait-fallback {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--navy-3);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 24px 60px rgba(4, 12, 26, .55);
}
.portrait-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: var(--accent-2);
}

/* ---------------------------------------------------------------
   نوار سال‌ها — امضای قالب، ادامه بلوک سرمه‌ای
--------------------------------------------------------------- */
.year-ribbon {
  background: var(--navy-2);
  border-top: 1px solid var(--line-dark);
  padding: 22px 0;
}
.year-ribbon .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.year-ribbon-label {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.year-ribbon-label small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--on-navy-muted);
  font-size: .8rem;
}
.year-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-3) transparent;
}
.year-pills a {
  flex: none;
  padding: 6px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-dark);
  color: var(--on-navy-muted);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  transition: all .15s ease;
}
.year-pills a:hover {
  border-color: var(--accent);
  background: rgba(62, 123, 250, .16);
  color: #fff;
}

/* ---------------------------------------------------------------
   Sections
--------------------------------------------------------------- */
.section { padding: 72px 0; }
.section-alt { background: var(--card); border-block: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  position: relative;
  padding-inline-start: 18px;
}
.section-title::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .35em;
  bottom: .35em;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}
.section-more {
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
}

/* رزومه / کارها */
.resume-content {
  max-width: 46em;
  color: var(--ink-soft);
}
.resume-content h2, .resume-content h3 { margin-top: 1.6em; }
.resume-content ul { padding-inline-start: 1.4em; }

/* ---------------------------------------------------------------
   YouTube
--------------------------------------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.video-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(62, 123, 250, .4);
  box-shadow: var(--shadow);
}
.video-thumb { position: relative; display: block; }
.video-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.video-thumb::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #fff;
  background: rgba(10, 27, 51, .35);
  opacity: 0;
  transition: opacity .18s ease;
}
.video-card:hover .video-thumb::after { opacity: 1; }
.video-title {
  display: block;
  padding: 14px 16px 16px;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink);
}
.video-title:hover { color: var(--accent-deep); }

.notice {
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: var(--muted);
  font-size: .95rem;
}

/* ---------------------------------------------------------------
   Blog listing — جداشده بر اساس ماه
--------------------------------------------------------------- */
.month-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 48px 0 22px;
}
.month-divider:first-of-type { margin-top: 0; }
.month-divider .month-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}
.month-divider .month-name a {
  color: var(--accent-deep);
  background: rgba(62, 123, 250, .1);
  border-radius: 999px;
  padding: 5px 16px;
}
.month-divider .month-name a:hover {
  background: rgba(62, 123, 250, .18);
}
.month-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.post-list { display: grid; gap: 16px; }

.post-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.post-item:hover {
  border-color: rgba(62, 123, 250, .45);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.post-date-badge {
  text-align: center;
  align-self: start;
  border-inline-end: 1px solid var(--line);
  padding-inline-end: 18px;
}
.post-date-badge .day {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-deep);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.post-date-badge .my {
  display: block;
  font-size: .75rem;
  color: var(--muted);
}
.post-item h2, .post-item h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.post-item h2 a, .post-item h3 a { color: var(--ink); }
.post-item h2 a:hover, .post-item h3 a:hover { color: var(--accent-deep); }
.post-excerpt { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.post-meta { color: var(--muted); font-size: .82rem; margin-top: 10px; }
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--accent-deep); }

@media (max-width: 560px) {
  .post-item { grid-template-columns: 1fr; }
  .post-date-badge {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 10px;
    text-align: start;
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
}

/* Pagination */
.pagination { margin-top: 40px; }
.pagination .nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.pagination a.page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* ---------------------------------------------------------------
   Single / Page
--------------------------------------------------------------- */
.entry-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--on-navy);
  padding: 56px 0 48px;
  margin-bottom: 40px;
}
.entry-header .entry-meta { color: var(--on-navy-muted); font-size: .9rem; }
.entry-header .entry-meta a { color: var(--accent-2); }
.entry-header h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  color: #fff;
}

.entry-content {
  max-width: 46em;
  margin-inline: auto;
  padding: 0 0 56px;
  color: var(--ink);
}
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 4px 22px;
  border-inline-start: 4px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
}
.entry-content pre {
  direction: ltr;
  text-align: left;
  background: var(--navy);
  color: #DCE6F5;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.7;
}
.entry-content code { font-size: .9em; }
.entry-content a { border-bottom: 1px solid currentColor; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 46em;
  margin: 0 auto 56px;
}
.post-nav a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: .92rem;
  color: var(--ink-soft);
}
.post-nav a:hover { border-color: var(--accent); color: var(--accent-deep); }
.post-nav .nav-label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   Comments
--------------------------------------------------------------- */
.comments-area {
  max-width: 46em;
  margin: 0 auto;
  padding-bottom: 64px;
}
.comments-area .comment-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
}
.comments-area .comment-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.comments-area .children {
  list-style: none;
  padding-inline-start: 28px;
  margin-top: 14px;
  display: grid;
  gap: 14px;
}
.comment-author { font-weight: 700; }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-inline-end: 8px; }
.comment-metadata { font-size: .8rem; }
.comment-metadata a { color: var(--muted); }
.comment-content { font-size: .95rem; color: var(--ink-soft); }
.comment-reply-link { font-size: .85rem; font-weight: 600; }

.comment-form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(62, 123, 250, .18);
}
.comment-form .submit {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
}
.comment-form .submit:hover { filter: brightness(1.08); }

/* ---------------------------------------------------------------
   Full archive page (grouped by year → months)
--------------------------------------------------------------- */
.archive-years { display: grid; gap: 36px; }
.archive-year h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
}
.archive-year h2 .count { font-size: .8rem; font-weight: 400; color: var(--muted); }
.archive-months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive-months a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: .92rem;
  transition: all .15s ease;
}
.archive-months a:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  box-shadow: 0 4px 14px rgba(62, 123, 250, .14);
}
.archive-months .count {
  font-size: .78rem;
  color: var(--accent-deep);
  background: rgba(62, 123, 250, .1);
  border-radius: 999px;
  padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
  color: var(--on-navy-muted);
  margin-top: 72px;
  padding: 44px 0 32px;
  border-top: 1px solid var(--line-dark);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}
.footer-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-social a {
  color: var(--on-navy-muted);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .88rem;
  transition: all .15s ease;
}
.footer-social a:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(62, 123, 250, .14);
}
.footer-copy { width: 100%; font-size: .82rem; color: #6B7C97; margin-top: 8px; }

/* Utility */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* ---------------------------------------------------------------
   Scroll motion — نمایش پلکانی، پارالاکس و نوار پیشرفت
--------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform: scaleX(0);
  transform-origin: right center;
  z-index: 200;
  pointer-events: none;
}

.site-header {
  transition: background .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  background: rgba(5, 14, 29, .92);
  box-shadow: 0 10px 30px rgba(4, 12, 26, .4);
}

.will-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .65s cubic-bezier(.2, .7, .2, 1),
    transform .65s cubic-bezier(.2, .7, .2, 1);
}
.will-reveal.is-revealed {
  opacity: 1;
  transform: none;
}

@keyframes imilad-hero-enter {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.hero-enter {
  opacity: 0;
  animation: imilad-hero-enter .75s cubic-bezier(.2, .7, .2, 1) forwards;
}

.hero-media { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1; transform: none; transition: none; }
  .hero-enter  { animation: none; opacity: 1; }
  .scroll-progress { display: none; }
}

/* ---------------------------------------------------------------
   v1.3 — رزومه چشم‌گیرتر + جزئیات شیک
--------------------------------------------------------------- */

/* کارت‌های آمار */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 44px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(62, 123, 250, .45);
  box-shadow: var(--shadow);
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1.3;
  background: linear-gradient(120deg, var(--accent-deep), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  color: var(--ink-soft);
  font-size: .92rem;
  margin-top: 2px;
}

/* لیست‌های رزومه به شکل چیپ‌های مهارت */
.resume-content ul {
  list-style: none;
  padding: 0;
  margin: 1em 0 1.6em;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.resume-content ul li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-size: .95rem;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.resume-content ul li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
  flex: none;
}
.resume-content ul li:hover {
  border-color: rgba(62, 123, 250, .5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(62, 123, 250, .12);
}
/* لیست‌های تو در تو معمولی بمانند */
.resume-content ul ul {
  display: block;
  margin: 8px 0 0;
}
.resume-content ul ul li {
  background: none;
  border: 0;
  padding: 2px 0;
  box-shadow: none;
  transform: none;
}

/* تیتر هیرو با گرادیان ظریف */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero-title {
    background: linear-gradient(120deg, #FFFFFF 30%, #A9C7FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* بافت نقطه‌ای خیلی ظریف روی هیرو */
.hero {
  background:
    radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1.5px),
    radial-gradient(900px 420px at 82% -10%, rgba(62, 123, 250, .28), transparent 60%),
    radial-gradient(700px 380px at 8% 110%, rgba(111, 160, 255, .12), transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  background-size: 26px 26px, auto, auto, auto;
}

/* لینک‌های «بیشتر» با حرکت جهت‌دار */
.section-more {
  display: inline-block;
  transition: transform .18s ease;
}
.section-more:hover { transform: translateX(-4px); }

/* نمایش سریع‌تر و نرم‌تر هنگام اسکرول */
.will-reveal {
  transform: translateY(18px);
  transition:
    opacity .45s cubic-bezier(.2, .7, .2, 1),
    transform .45s cubic-bezier(.2, .7, .2, 1);
}

/* ---------------------------------------------------------------
   v1.4 — تایم‌لاین جمع‌شونده رزومه
--------------------------------------------------------------- */
.resume-timeline {
  position: relative;
  padding-inline-start: 30px;
  max-width: 46em;
}
.resume-timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-2), rgba(62, 123, 250, .1));
}

.rt-group {
  margin: 1.9em 0 .9em;
  font-size: 1.2rem;
  position: relative;
}
.rt-group::before {
  content: "";
  position: absolute;
  inset-inline-start: -28px;
  top: .5em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--accent);
}

.rt-item {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rt-item:hover {
  border-color: rgba(62, 123, 250, .45);
  box-shadow: 0 8px 22px rgba(62, 123, 250, .12);
  transform: translateY(-2px);
}
.rt-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -27px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(62, 123, 250, .16);
}

.rt-item .rt-title,
.rt-item h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}
.rt-item p {
  margin: .35em 0 0;
  font-size: .92rem;
  color: var(--ink-soft);
}

.rt-date,
.rt-item h4, .rt-item h5, .rt-item h6 {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-deep);
  background: rgba(62, 123, 250, .1);
  border-radius: 999px;
  padding: 2px 12px;
  margin: 0 0 8px;
  line-height: 2;
}

.rt-hidden { display: none; }

.rt-toggle {
  display: block;
  margin: 18px auto 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .92rem;
  color: var(--accent-deep);
  background: var(--card);
  border: 1px solid rgba(62, 123, 250, .4);
  border-radius: 999px;
  padding: 11px 28px;
  cursor: pointer;
  transition: all .15s ease;
}
.rt-toggle:hover {
  background: rgba(62, 123, 250, .08);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(62, 123, 250, .16);
}

/* نشانه محو در حالت جمع‌شده */
.resume-timeline.rt-collapsed::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 64px;
  height: 90px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

/* اصلاح کارت تاریخ نوشته‌ها برای تاریخ‌های طولانی (شمسی + میلادی) */
.post-item { grid-template-columns: minmax(64px, 96px) 1fr; }
.post-date-badge .day { font-size: 1.35rem; overflow-wrap: anywhere; }
.post-date-badge .my  { line-height: 1.7; overflow-wrap: anywhere; }
