/* =========
   Base + Reset
   ========= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:root{
  --bg: #0f1222;
  --panel: #161a2e;
  --text: #e6e7ee;
  --muted: #b8bbd9;
  --line: #2a2f55;
  --accent: #7aa2ff;
  --radius: 12px;
  --container: 1100px;
}

/* Typography */
body{
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(15px, 1.6vw, 17px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,h2,h3{ line-height: 1.25; margin: 0 0 .6rem; }
h1{ font-size: clamp(18px, 3vw, 20px); }
h2{ font-size: clamp(22px, 4.2vw, 28px); }
h3{ font-size: clamp(16px, 2.8vw, 19px); }
p{ margin: 0 0 1rem; color: var(--muted); }

/* Containers */
.container { 
  max-width: var(--container); 
  margin: 0 auto; 
  padding: 0;            /* was: 0 1rem */
}

/* =========
   Header + Nav
   ========= */
header{
  border-bottom: 1px solid var(--line);
  background: linear-gradient(0deg, transparent, rgba(0,0,0,.08));
}
header nav{
  max-width: var(--container); margin: 0 auto;
  padding: .9rem max(1rem, env(safe-area-inset-left)) .9rem max(1rem, env(safe-area-inset-right));
  display: grid; grid-template-columns: 1fr; row-gap: .6rem;
}
header nav h1{ margin: 0; letter-spacing: .3px; color: #fff; }
header nav ul{
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-auto-flow: column; gap: .5rem;
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
header nav ul::-webkit-scrollbar{ display: none; }
header nav a{
  display: inline-block; padding: .5rem .8rem; border-radius: 999px;
  color: var(--muted); background: rgba(255,255,255,.06);
}
header nav a:hover, header nav a:focus-visible{ color: #fff; outline: 2px solid transparent; background: rgba(255,255,255,.12); }

@media (min-width: 720px){
  header nav{ grid-template-columns: auto 1fr; align-items: center; }
  header nav ul{ justify-content: end; overflow: visible; }
}

/* =========
   Hero, no crop (full image visible)
   ========= */
.hero{
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  aspect-ratio: 16 / 9;
  min-height: auto;
  background-color: #0f1222;
  border-bottom: none;
  position: relative;
}
.hero::after{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.10), rgba(0,0,0,.35));
}
.hero__inner{
  position: relative; z-index: 1; text-align: center; color: #fff;
  max-width: var(--container); margin: 0 auto; padding: 3rem 1rem;
}
.hero__inner h2{ margin-top: 1.25rem; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
.hero__inner p{ max-width: 820px; margin: .5rem auto 0; color: #e9eaf5; }

/* Avatar, mobile first */
.hero__inner img{
  width: 40px;
  aspect-ratio: 1 / 1;
  height: auto;
  max-width: none;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  margin: 0 auto .9rem;
  transform: translateY(-77px);
}

/* Larger spacing and avatar on desktop */
@media (min-width: 500px){
  .hero__inner{ padding: 4rem 1.25rem 4rem; }
  .hero__inner img{
    width: 150px;
    transform: translateY(-130px);
  }
  .hero__inner h2{ margin-top: 2rem; }
  .hero__inner p{ margin-top: .75rem; }
}

/* =========
   About
   ========= */
#about{
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.25rem 1rem; /* was: 2.25rem 0 */
}
#about h2{ color: #fff; }
#about p{ color: var(--muted); }
/* Bilingual section heading */
.section-title {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0.25rem;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0 0 0.75rem 0;
}
.title-en { text-align: left; }
.title-fa {
  text-align: right;
  font-family: "Vazirmatn", "Noto Naskh Arabic", "Noto Nastaliq Urdu", Tahoma, Arial, sans-serif;
}
/* Side by side on desktop */
@media (min-width: 900px) {
  .section-title {
    grid-template-columns: 1fr 1fr;
    align-items: baseline;
  }
}

/* About layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}
/* two columns on desktop */
@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    column-gap: 2rem;
  }
}

/* “Box” with no visible outline */
.about-block {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 16px;
  padding: clamp(14px, 2vw, 22px) 0; /* change: top/bottom only */
}
.about-block p { margin: 0; }

/* Typography and alignment */
.about-block[dir="ltr"]{
  text-align: left;
  margin-left: 0;        /* add this */
  margin-right: auto;    /* keep this */
}
.about-block[dir="rtl"]{
  text-align: right;
  margin-right: 0;       /* add this */
  margin-left: auto;     /* keep this */
  font-family: "Vazirmatn","Noto Naskh Arabic","Noto Nastaliq Urdu",Tahoma,Arial,sans-serif;
  line-height: 1.9;
}

/* =========
   Cards for Podcasts and Articles
   ========= */
#podcast-list, #article-list{
  max-width: var(--container); margin: 1rem auto 0;
  display: grid; gap: 1rem; grid-template-columns: 1fr;
}
@media (min-width: 560px){
  #podcast-list, #article-list{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px){
  #podcast-list, #article-list{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.podcast-card, .article-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.podcast-card:hover, .article-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
  border-color: rgba(122,162,255,.35);
}
.card-img{ border-radius: 10px; margin-bottom: .6rem; }
.podcast-card h3, .article-card h3{ color: #fff; margin: .4rem 0 .25rem; }
.podcast-card p, .article-card p{ margin: .25rem 0; }
.podcast-card a, .article-card a{
  display: inline-block; margin-top: .5rem;
  color: #fff; background: var(--accent);
  padding: .55rem .85rem; border-radius: 10px;
}
.podcast-card a:focus-visible, .article-card a:focus-visible{
  outline: 2px solid #fff; outline-offset: 2px;
}

/* =========
   Footer
   ========= */
footer{
  border-top: 1px solid var(--line);
  padding: 2rem 1rem; text-align: center; color: var(--muted);
}
footer a{ color: var(--accent); }
footer a:hover{ text-decoration: underline; }

/* =========
   Motion + Focus
   ========= */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--accent); outline-offset: 2px;
}
