/*
Theme Name: Ehsan Portfolio
Theme URI: https://www.ehsanmaghsoudi.com/
Description: Responsive RTL portfolio child theme for Ehsan Maghsoudi.
Author: Ehsan Maghsoudi
Template: twentytwentyfive
Version: 1.0.0
Text Domain: ehsan-portfolio
*/

:root {
  --em-ink: #11110f;
  --em-paper: #f3efe5;
  --em-paper-2: #e9e3d6;
  --em-lime: #c7ff4a;
  --em-orange: #ff6b3d;
  --em-blue: #87a9ff;
  --em-muted: #69685f;
  --em-line: rgba(17, 17, 15, .18);
  --em-shadow: 0 24px 70px rgba(17, 17, 15, .12);
  --em-radius: 24px;
  --em-max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  direction: rtl;
  color: var(--em-ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(135,169,255,.25), transparent 28%),
    radial-gradient(circle at 90% 5%, rgba(199,255,74,.22), transparent 24%),
    var(--em-paper);
  font-family: "Vazirmatn", "IRANSansX", Tahoma, "Segoe UI", sans-serif;
  line-height: 1.9;
  overflow-x: hidden;
}
.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * { margin-block-start: 0; }
::selection { background: var(--em-lime); color: var(--em-ink); }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--em-orange); outline-offset: 4px; }
.em-wrap { width: min(calc(100% - 40px), var(--em-max)); margin-inline: auto; }

.nav-shell {
  position: sticky;
  top: 14px;
  z-index: 100;
  width: min(calc(100% - 28px), var(--em-max));
  margin: 14px auto 0;
  border: 1px solid var(--em-line);
  border-radius: 18px;
  background: rgba(243,239,229,.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(17,17,15,.07);
}
.admin-bar .nav-shell { top: 46px; }
.em-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 8px 12px 8px 8px;
  gap: 20px;
}
.em-brand { display: flex; align-items: center; gap: 10px; font-weight: 950; letter-spacing: -.03em; }
.em-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--em-ink);
  color: var(--em-lime);
  font-size: 14px;
  direction: ltr;
}
.em-nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.em-nav-links a { padding: 8px 11px; border-radius: 10px; font-size: 13px; color: var(--em-muted); transition: .2s ease; }
.em-nav-links a:hover { background: #fff; color: var(--em-ink); }
.em-nav-links .em-nav-cta { background: var(--em-ink); color: #fff; }

.em-main section { padding: 88px 0; }
.em-hero { min-height: 86vh; display: grid; align-items: center; padding-top: 76px !important; }
.em-hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 54px; align-items: center; }
.em-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 850;
  padding: 7px 11px;
  border: 1px solid var(--em-line);
  border-radius: 999px;
  background: rgba(255,255,255,.42);
}
.em-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--em-orange); box-shadow: 0 0 0 5px rgba(255,107,61,.13); }
.em-hero h1 {
  font-size: clamp(50px, 7.4vw, 106px);
  line-height: 1.02;
  letter-spacing: -.07em;
  margin: 24px 0;
  max-width: 900px;
}
.em-stroke { color: transparent; -webkit-text-stroke: 2px var(--em-ink); }
.em-hero-copy { font-size: clamp(18px, 2.1vw, 24px); max-width: 760px; color: #35342f; margin: 0 0 30px; }
.em-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.em-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border: 1px solid var(--em-ink);
  border-radius: 14px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease;
}
.em-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(17,17,15,.12); }
.em-btn-dark { background: var(--em-ink); color: #fff; }
.em-btn-accent { background: var(--em-lime); }

.em-visual { position: relative; min-height: 560px; display: grid; place-items: center; }
.em-orbit {
  width: min(480px, 84vw);
  aspect-ratio: 1;
  position: relative;
  border-radius: 50%;
  border: 1px solid var(--em-line);
  animation: em-spin 34s linear infinite;
}
.em-orbit::before, .em-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed rgba(17,17,15,.22); inset: 14%; }
.em-orbit::after { inset: 31%; border-style: solid; }
.em-core {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: 176px;
  aspect-ratio: 1;
  border-radius: 40px;
  background: var(--em-ink);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  box-shadow: var(--em-shadow);
  transform: rotate(-4deg);
}
.em-core strong { color: var(--em-lime); font-size: 22px; line-height: 1.45; }
.em-node {
  position: absolute;
  width: 118px;
  min-height: 62px;
  padding: 10px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--em-line);
  border-radius: 16px;
  background: rgba(255,255,255,.8);
  box-shadow: 0 16px 40px rgba(17,17,15,.09);
  font-weight: 900;
  font-size: 12px;
  animation: em-counterspin 34s linear infinite;
}
.em-n1 { top: -26px; left: 50%; translate: -50% 0; background: var(--em-lime); }
.em-n2 { right: -40px; top: 30%; }
.em-n3 { right: 8%; bottom: -8px; background: var(--em-blue); }
.em-n4 { left: 8%; bottom: -8px; }
.em-n5 { left: -40px; top: 30%; background: #ffd5c7; }
@keyframes em-spin { to { transform: rotate(360deg); } }
@keyframes em-counterspin { to { transform: rotate(-360deg); } }

.em-section-head { display: grid; grid-template-columns: .75fr 1.25fr; gap: 40px; align-items: start; margin-bottom: 42px; }
.em-kicker { font-size: 13px; font-weight: 950; letter-spacing: .06em; color: var(--em-muted); }
.em-section-head h2, .em-footer h2 { margin: 8px 0 0; font-size: clamp(36px, 5vw, 68px); line-height: 1.12; letter-spacing: -.05em; }
.em-lead { margin: 0; font-size: 19px; color: #44433c; max-width: 760px; }

.em-manifesto { padding: 76px 0; }
.em-manifesto-card {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: clamp(32px, 7vw, 82px);
  background: var(--em-ink);
  color: #fff;
  box-shadow: var(--em-shadow);
}
.em-manifesto-card::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: var(--em-lime); filter: blur(90px); opacity: .18; left: -130px; top: -130px; }
.em-manifesto blockquote { position: relative; margin: 0; font-weight: 900; font-size: clamp(29px, 4.8vw, 62px); line-height: 1.35; letter-spacing: -.04em; }
.em-manifesto em { color: var(--em-lime); font-style: normal; }
.em-manifesto-meta { position: relative; margin-top: 34px; color: rgba(255,255,255,.62); font-size: 13px; }

.em-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.em-card {
  border: 1px solid var(--em-line);
  border-radius: var(--em-radius);
  background: rgba(255,255,255,.5);
  padding: 26px;
  min-height: 270px;
  transition: .25s ease;
}
.em-card:hover { transform: translateY(-5px); background: #fff; box-shadow: var(--em-shadow); }
.em-index { width: 42px; height: 42px; border-radius: 12px; background: var(--em-ink); color: var(--em-lime); display: grid; place-items: center; font-weight: 900; }
.em-card h3 { font-size: 23px; margin: 46px 0 10px; letter-spacing: -.03em; }
.em-card p { color: var(--em-muted); margin: 0; font-size: 15px; }

.em-projects { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.em-project {
  position: relative;
  min-height: 330px;
  border: 1px solid var(--em-line);
  border-radius: 26px;
  padding: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.em-project:nth-child(1) { grid-column: span 7; background: #191917; color: #fff; }
.em-project:nth-child(2) { grid-column: span 5; background: var(--em-lime); }
.em-project:nth-child(3) { grid-column: span 5; background: #dce4ff; }
.em-project:nth-child(4) { grid-column: span 7; background: #ffd7c9; }
.em-tag { display: inline-block; font-size: 12px; font-weight: 900; border: 1px solid currentColor; border-radius: 999px; padding: 5px 9px; opacity: .75; }
.em-project h3 { margin: 18px 0 10px; font-size: clamp(26px, 3vw, 40px); line-height: 1.2; letter-spacing: -.04em; }
.em-project p { margin: 0; max-width: 660px; opacity: .74; }
.em-code { direction: ltr; text-align: left; font-family: Consolas, monospace; font-size: 12px; opacity: .54; margin-top: 24px; }

.em-system { border: 1px solid var(--em-line); border-radius: 30px; padding: 28px; background: rgba(255,255,255,.48); }
.em-map { display: grid; grid-template-columns: 1fr 64px 1.15fr 64px 1fr; align-items: center; gap: 12px; }
.em-map-box { border: 1px solid var(--em-line); border-radius: 20px; min-height: 164px; padding: 22px; background: var(--em-paper); }
.em-map-box.is-main { background: var(--em-ink); color: #fff; transform: scale(1.03); box-shadow: var(--em-shadow); }
.em-map-box.is-main h3 { color: var(--em-lime); }
.em-map-box h3 { margin: 0 0 8px; font-size: 22px; }
.em-map-box p { margin: 0; font-size: 14px; opacity: .7; }
.em-arrow { height: 1px; background: var(--em-ink); }
.em-chips { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.em-chip { border: 1px solid var(--em-line); border-radius: 13px; padding: 12px; text-align: center; font-size: 13px; font-weight: 850; background: #fff; }

.em-profile { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.em-profile-card { border-radius: 28px; padding: 30px; border: 1px solid var(--em-line); background: rgba(255,255,255,.52); }
.em-profile-card.is-dark { background: var(--em-ink); color: #fff; }
.em-profile-card h3 { font-size: 30px; margin: 0 0 12px; }
.em-profile-card p { margin: 0; color: var(--em-muted); }
.em-profile-card.is-dark p { color: rgba(255,255,255,.7); font-size: 20px; font-weight: 800; }
.em-skills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.em-skills span { border: 1px solid var(--em-line); border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.55); }

.em-footer { padding: 76px 0 70px; }
.em-footer-card { border-top: 1px solid var(--em-line); padding-top: 30px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; }
.em-footer-meta { color: var(--em-muted); font-size: 12px; text-align: left; direction: ltr; white-space: nowrap; }

@media (max-width: 980px) {
  .em-hero-grid, .em-section-head, .em-profile { grid-template-columns: 1fr; }
  .em-hero { min-height: auto; }
  .em-visual { min-height: 500px; }
  .em-grid-3 { grid-template-columns: 1fr; }
  .em-project { grid-column: span 12 !important; }
  .em-map { grid-template-columns: 1fr; }
  .em-arrow { width: 1px; height: 46px; margin: auto; }
  .em-chips { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .em-wrap { width: min(calc(100% - 24px), var(--em-max)); }
  .nav-shell { top: 8px; margin-top: 8px; width: calc(100% - 16px); }
  .admin-bar .nav-shell { top: 54px; }
  .em-nav-links a:not(.em-nav-cta) { display: none; }
  .em-brand { font-size: 13px; }
  .em-main section { padding: 62px 0; }
  .em-hero { padding-top: 56px !important; }
  .em-hero h1 { font-size: clamp(46px, 15vw, 62px); }
  .em-visual { min-height: 410px; }
  .em-orbit { width: 330px; }
  .em-node { width: 92px; min-height: 54px; font-size: 10px; }
  .em-n2 { right: -8px; }
  .em-n5 { left: -8px; }
  .em-core { width: 136px; border-radius: 32px; padding: 14px; }
  .em-manifesto-card { border-radius: 24px; }
  .em-chips { grid-template-columns: 1fr; }
  .em-footer-card { grid-template-columns: 1fr; align-items: start; }
  .em-footer-meta { text-align: right; direction: rtl; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}