/*
Theme Name: Hossein Samei
Description: قالب اختصاصی فارسی حسین صامعی؛ نسخه اولیه برای آزمایش روی سایت آزمایشی.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hossein-samei
*/
@font-face {
  font-family: Vazirmatn;
  src: url('assets/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #101e30;
  --deep: #0b1726;
  --ink: #14283d;
  --muted: #485b70;
  --line: #d5dfe7;
  --paper: #fff;
  --tint: #f0f5f8;
  --accent: #1b5b69;
  --ice: #c7e6eb;
  --edge: clamp(1.25rem, 5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font: 400 1rem/1.9 Vazirmatn, Tahoma, sans-serif;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .3em; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid #2f7f9d; outline-offset: 5px; }
[id] { scroll-margin-top: 6.5rem; }
.container { width: min(76rem, 100% - var(--edge) * 2); margin-inline: auto; }
.skip-link { position: fixed; top: 1rem; right: 1rem; z-index: 5; background: #fff; padding: .5rem 1rem; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  color: #fff;
  background: var(--navy);
  border-bottom: 1px solid #ffffff1b;
}
.header-inner { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: block;
  flex: none;
  width: 7.6rem;
  border-radius: .25rem;
}
.brand img { width: 100%; height: auto; }
.navigation { display: flex; align-items: center; gap: clamp(.9rem, 2.65vw, 2.05rem); }
.navigation a { color: #d8e2ec; font-size: .9375rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.navigation a:hover, .navigation a:focus-visible, .navigation a[aria-current="page"] { color: #fff; text-decoration: underline; }
.navigation .nav-contact { border: 1px solid #ffffff63; border-radius: .4rem; padding: .45rem 1rem; color: #fff; }
.navigation .nav-contact[aria-current="page"] { background: var(--ice); color: var(--deep); text-decoration: none; }
.menu-toggle { display: none; }

.hero {
  color: #fff;
  background: radial-gradient(ellipse at 14% 55%, #244358 0%, transparent 45%), linear-gradient(120deg, #132a3d, var(--deep) 73%);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, .76fr);
  align-items: center;
  gap: clamp(2rem, 5.5vw, 5.5rem);
  min-height: min(31rem, 62vw);
  padding-block: clamp(3.25rem, 5.5vw, 5.5rem);
}
.hero h1 { font-size: clamp(2.5rem, 5.1vw, 4.5rem); line-height: 1.24; font-weight: 800; margin: 0 0 .95rem; }
.hero-intro { color: #d1dce7; font-size: clamp(1rem, 1.45vw, 1.18rem); max-width: 31rem; line-height: 2.1; }
.hero-degree { color: #e3edf6; font-weight: 600; }
.university-name { white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .65rem 1.15rem;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: .4rem;
  text-decoration: none;
  font-weight: 720;
  cursor: pointer;
  transition: background-color .18s, border-color .18s;
}
.button span, .text-link span, .outline-link span { font-size: .75rem; font-weight: 750; }
.button-light { background: var(--ice); color: var(--deep); }
.button-light:hover { background: #e7f7fa; }
.button-outline { color: #edf4fa; border-color: #ffffff75; }
.button-outline:hover { background: #ffffff12; border-color: #fff; }
.portrait-frame {
  width: min(100%, 16rem);
  margin-inline: auto;
  padding: .55rem;
  border: 1px solid #7197a8;
  border-radius: .5rem;
}
.portrait-frame img {
  width: 100%;
  height: auto;
  border-radius: .25rem;
  transform: scaleX(-1);
}
.expertise { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #ffffff38; align-items: center; padding-block: 1.15rem; }
.expertise a { font-size: clamp(.88rem, 1.35vw, 1.08rem); font-weight: 650; text-decoration: none; color: #e1eaf0; text-align: center; }
.expertise a + a { border-inline-start: 1px solid #ffffff38; }
.expertise a:hover { text-decoration: underline; color: #fff; }

.section { padding-block: clamp(3.3rem, 7.5vw, 6.5rem); }
.section-tint { background: var(--tint); }

.page-intro {
  color: #fff;
  background: radial-gradient(ellipse at 13% 0%, #254658 0%, transparent 58%), var(--deep);
  border-bottom: 1px solid #ffffff26;
  padding-block: clamp(2rem, 5.6vw, 4.8rem);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  color: #c8d8e5;
  font-size: .94rem;
}
.breadcrumb-divider { color: #93b1bf; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: #fff; }
.page-intro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .9rem 1.25rem;
  margin-top: .7rem;
}
.page-intro h1 {
  font-weight: 830;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.35;
}
.page-section { padding-block: clamp(2.35rem, 5.6vw, 4.75rem); }

.home-directory-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 1.25rem clamp(1.6rem, 6vw, 5rem);
  align-items: stretch;
}
.home-directory h2 { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 800; line-height: 1.5; }
.home-directory p { margin-top: .45rem; color: var(--muted); }
.home-profile { background: var(--tint); border-radius: .45rem; padding: clamp(1.1rem, 3.8vw, 2rem); border-inline-start: 3px solid #34798b; }
.home-profile .text-link { display: inline-block; margin-top: .85rem; }
.home-resources { display: grid; align-content: center; }
.home-resources article { padding: .8rem 0; border-top: 1px solid var(--line); }
.home-resources article:last-child { border-bottom: 1px solid var(--line); }
.home-resources h2 a { text-decoration: none; }
.home-resources h2 a:hover { text-decoration: underline; }
.text-link, .outline-link { color: var(--accent); text-decoration: none; font-weight: 700; white-space: nowrap; }
.text-link:hover, .outline-link:hover { text-decoration: underline; }
.text-link span { margin-inline-start: .3em; }
.experience h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.6; }
.experience { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.7rem, 6vw, 5rem); }
.experience-column { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.experience-column > p { margin-top: .55rem; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.timeline li { display: grid; grid-template-columns: 3.9rem 1fr; gap: .9rem; align-items: baseline; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.timeline li span { color: var(--accent); font-weight: 800; }
.timeline strong, .timeline small { display: block; }
.timeline small { color: var(--muted); font-size: .875rem; }
.experience-column > .publication-count { margin-top: 1rem; }
.publication-count strong { color: var(--ink); }
.experience-column > .experience-date { color: var(--accent); font-weight: 700; }
.ruled-list { list-style: none; padding: 0; margin: .85rem 0 0; }
.ruled-list li { padding-block: .75rem; border-bottom: 1px solid var(--line); color: var(--muted); }

.services { display: grid; gap: 1rem; }
.service {
  display: grid;
  grid-template-columns: minmax(14rem, .85fr) 1.65fr;
  gap: 1rem 1.8rem;
  padding: clamp(1.15rem, 2.8vw, 2rem);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--paper);
}
.service-heading { display: flex; align-items: flex-start; gap: .85rem; }
.service h2 { margin-top: .17rem; font-size: 1.3rem; line-height: 1.6; font-weight: 800; }
.service ul { padding-inline-start: 1.1rem; margin: 0; color: var(--muted); }
.service li + li { margin-top: .55rem; }
.service li::marker { color: #34798b; }
.service-icon { flex: none; display: block; width: 2.25rem; height: 2.25rem; position: relative; color: var(--accent); }
.service-icon::before, .service-icon::after { content: ''; position: absolute; }
.service-family::before { width: .72rem; height: .72rem; border: 1.5px solid; border-radius: 100%; inset: .1rem .76rem auto auto; box-shadow: -.72rem .5rem 0 -.11rem currentColor, .72rem .5rem 0 -.11rem currentColor; }
.service-family::after { inset: 1.06rem .16rem .06rem; border: 1.5px solid; border-radius: 50% 50% .2rem .2rem; }
.service-strategy::before { inset: .08rem; border: 1.5px solid; border-radius: 50%; }
.service-strategy::after { inset: .57rem; border: 1.5px solid; border-radius: 50%; background: radial-gradient(circle, currentColor 0 18%, transparent 23%); }
.service-organization::before { inset: .12rem .75rem 1.42rem; border: 1.5px solid; border-radius: 2px; }
.service-organization::after { inset: 1.07rem .13rem .18rem; border: 1.5px solid; border-bottom: 0; border-radius: 3px; background: linear-gradient(currentColor,currentColor) center / 1.5px 100% no-repeat; }

.workshops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
}
.workshop {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: .75rem;
  padding: clamp(1.15rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  border-block-start: 2px solid #4c7c8b;
  border-radius: .5rem;
  background: var(--paper);
}
.workshop h2 { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.55; }
.workshop p { color: var(--muted); }
.outline-link { display: inline-flex; justify-self: start; align-items: center; justify-content: center; gap: .4rem; min-height: 2.5rem; border: 1px solid var(--line); border-radius: .35rem; padding-inline: .75rem; font-size: .9rem; }
.outline-link:hover { border-color: #34798b; }

.books { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.35rem; }
.book-cover { height: 15.5rem; padding: 1.3rem; background: #e2ebf1; border-radius: .4rem; }
.book-cover img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 .45rem .65rem #10273b29); }
.book h2 { margin-top: .9rem; font-size: 1.1rem; }
.book p { color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.book .book-credit { color: var(--accent); font-weight: 700; }

.contact { color: #fff; background: var(--navy); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 8vw, 7rem); }
.contact-info address { display: grid; gap: .65rem; font-style: normal; }
.contact-info address div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .15rem .8rem; padding-block: .45rem; border-bottom: 1px solid #ffffff27; }
.contact-info address span { color: #b6c9da; font-size: .9rem; }
.contact-info address a { color: #eaf8fd; font-size: .96rem; overflow-wrap: anywhere; }
.contact-form { display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 1.75rem); background: #192d41; border: 1px solid #ffffff22; border-radius: .5rem; align-self: start; }
.contact-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.contact-form label { font-size: .9rem; font-weight: 600; min-width: 0; }
.contact-form input, .contact-form textarea { display: block; width: 100%; margin-top: .25rem; background: #122539; border: 1px solid #76899c; color: #fff; border-radius: .3rem; padding: .45rem .65rem; font-size: 1rem; }
.contact-form textarea { resize: vertical; }
.contact-form button { justify-self: start; }
.site-footer { margin-top: auto; background: var(--deep); color: #bacada; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.15rem; }
.footer-inner span { font-weight: 700; color: #fff; }
.footer-inner a { font-size: .9rem; }

@media (max-width: 58rem) {
  .books { grid-template-columns: repeat(2, 1fr); gap: 1.7rem 1.25rem; }
}

@media (max-width: 45rem) {
  .header-inner { min-height: 4rem; }
  .brand { width: 6.4rem; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .65rem; background: transparent; color: #fff; border: 1px solid #ffffff65; border-radius: .35rem; padding: .35rem .65rem; cursor: pointer; }
  .menu-toggle span { display: block; height: .72rem; width: 1rem; background: linear-gradient(#fff,#fff) center / 100% 1px no-repeat; border-block: 1px solid #fff; }
  .navigation { display: none; position: absolute; inset: 100% 0 auto; background: var(--navy); padding: .6rem var(--edge) 1.1rem; border-bottom: 1px solid #ffffff45; }
  .navigation.is-open { display: grid; gap: 0; }
  .navigation a { padding: .55rem .35rem; }
  .navigation a + a { border-top: 1px solid #ffffff22; }
  .navigation .nav-contact { border: 0; color: var(--ice); padding: .55rem .35rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.15rem 2.35rem; }
  .portrait-frame { grid-row: 1; width: min(54%, 9.75rem); }
  .hero h1 { font-size: clamp(2.2rem, 8vw, 3.15rem); }
  .hero-copy { text-align: center; }
  .hero-intro { margin-inline: auto; }
  .hero-founder { font-size: clamp(.875rem, 3.7vw, 1rem); }
  .hero-actions { justify-content: center; margin-top: 1.2rem; }
  .expertise { width: 100%; padding-inline: .55rem; }
  .expertise a { font-size: .82rem; padding-inline: .18rem; }
  .service, .experience, .contact-grid, .home-directory-grid, .workshops { grid-template-columns: 1fr; }
  .navigation .nav-contact[aria-current="page"] { padding-inline: .55rem; }
  .contact-grid { gap: 1.7rem; }
}

@media (max-width: 28rem) {
  .hero-founder { margin-inline: -.875rem; }
  .book-cover { height: 11rem; padding: .55rem; }
  .contact-fields { grid-template-columns: 1fr; }
}

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

body.admin-bar .site-header{top:32px}@media(max-width:782px){body.admin-bar .site-header{top:46px}}
