/* PF3D 2.0 — dark "space" theme. Tokens live in theme.json. */

:root {
  --pf-space: var(--wp--preset--color--space);
  --pf-deep: var(--wp--preset--color--deep);
  --pf-primary: var(--wp--preset--color--primary);
  --pf-cyan: var(--wp--preset--color--sky);
  --pf-violet: var(--wp--preset--color--ice);
  --pf-white: var(--wp--preset--color--white);
  --pf-muted: var(--wp--preset--color--muted);
  --pf-grad: linear-gradient(100deg, #6FA6E0 0%, #BFD9F5 100%);
  --pf-line: rgba(155, 170, 192, 0.18);
  --pf-glass: rgba(12, 26, 44, 0.6);
}

/* Smooth-scroll (Lenis) housekeeping */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Static starfield + glows: also the fallback when the particle field doesn't load. */
  background-color: var(--pf-space);
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px 1px at 72% 34%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 72%, rgba(111,166,224,.6), transparent 60%),
    radial-gradient(1px 1px at 86% 82%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1px 1px at 55% 8%, rgba(30,62,98,.6), transparent 60%),
    radial-gradient(1px 1px at 24% 54%, rgba(255,255,255,.35), transparent 60%);
  background-size: 420px 420px;
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 30rem at 85% 10%, rgba(30,62,98,.5), transparent 70%),
    radial-gradient(45rem 35rem at 5% 90%, rgba(30,62,98,.55), transparent 70%);
}

::selection { background: rgba(111,166,224,.35); color: #fff; }

:where(a, button, summary, input, textarea):focus-visible {
  outline: 2px solid var(--pf-cyan); outline-offset: 3px; border-radius: 6px;
}

.pf-skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--pf-cyan); color: var(--pf-space); padding: .6rem 1rem; font-weight: 700; text-decoration: none; border-radius: 8px;
}
.pf-skip:focus { top: 1rem; }

.pf-grad {
  background: var(--pf-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--pf-cyan);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Particle field (fixed, behind everything) ---------- */
.pf-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; margin: 0 !important; max-width: none !important; }
.pf-field canvas, .pf-field spline-viewer { width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity 1.2s ease; }
.pf-field.is-live canvas, .pf-field.is-live spline-viewer { opacity: 1; }
.wp-site-blocks { position: relative; z-index: 1; }
.wp-site-blocks > .wp-block-html:first-child + * { margin-top: 0; }

/* Ghost button */
.wp-block-button.is-style-pf-ghost .wp-block-button__link {
  background: transparent !important; color: var(--pf-white) !important; border-color: transparent !important;
  box-shadow: inset 0 0 0 1px rgba(155,170,192,.45); transition: box-shadow .2s ease, background-color .2s ease;
}
.wp-block-button.is-style-pf-ghost .wp-block-button__link:hover { box-shadow: inset 0 0 0 1px var(--pf-cyan); background: rgba(111,166,224,.08) !important; }
.wp-block-button:not(.is-style-pf-ghost) .wp-block-button__link { box-shadow: 0 0 0 0 rgba(111,166,224,0); transition: box-shadow .3s ease; }
.wp-block-button:not(.is-style-pf-ghost) .wp-block-button__link:hover { box-shadow: 0 8px 32px -6px rgba(111,166,224,.45); }

/* ---------- Hero ---------- */
.pf-hero { min-height: 100svh; display: grid; align-items: center; padding-block: 8rem 5rem !important; position: relative; }
.pf-hero__content > * { max-width: 50rem; }
.pf-hero__title { max-width: 22ch !important; margin: .2rem 0 !important; text-wrap: balance; font-size: clamp(2.1rem, 1.4rem + 3.2vw, 4rem); line-height: 1.08; letter-spacing: -0.03em; }
.pf-hero__title .pf-grad { display: block; }
.pf-hero__lede { font-size: var(--wp--preset--font-size--large); line-height: 1.5; color: var(--pf-muted); max-width: 34rem !important; }
.pf-hero .wp-block-buttons { margin-top: 2.25rem; gap: .9rem; }
@media (max-width: 899px) {
  .pf-hero { align-items: end; padding-top: 52vh !important; padding-bottom: 3.5rem !important; }
}

/* ---------- Sections ---------- */
.pf-main > * { position: relative; }
.pf-section { padding-block: var(--wp--preset--spacing--70) !important; }
.pf-section__intro { margin-bottom: var(--wp--preset--spacing--50) !important; }
.pf-section__intro > * { max-width: 40rem; }
.pf-section__intro p { color: var(--pf-muted); font-size: var(--wp--preset--font-size--large); line-height: 1.5; }

/* Statement */
.pf-statement { min-height: 90vh; display: grid; align-content: center; }
.pf-statement__title { font-size: var(--wp--preset--font-size--display); line-height: 1.02; margin-bottom: 2.5rem; }
.pf-reveal { font-size: var(--wp--preset--font-size--large); line-height: 1.6; color: var(--pf-white); }
.pf-reveal .pf-w { display: inline; }

/* Services: glowing top edge, no boxes */
.pf-services .wp-block-column { position: relative; padding-top: 1.5rem; }
.pf-services .wp-block-column::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--pf-grad); box-shadow: 0 0 12px rgba(111,166,224,.6); }
.pf-services h3 { margin-bottom: .6rem; }
.pf-services p { color: var(--pf-muted); }
.pf-services .wp-block-list { padding-left: 1.1rem; font-size: var(--wp--preset--font-size--small); color: var(--pf-white); }
.pf-services .wp-block-list li { margin-bottom: .35rem; }
.pf-services .wp-block-list li::marker { color: var(--pf-cyan); }

/* Process */
.pf-steps { position: relative; max-width: 40rem; padding-left: 4.5rem !important; }
.pf-process__line { position: absolute; left: 1.35rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--pf-grad); box-shadow: 0 0 10px rgba(111,166,224,.6); transform-origin: top; margin: 0 !important; }
.pf-step { position: relative; padding-bottom: var(--wp--preset--spacing--50); }
.pf-step__num {
  position: absolute; left: -4.5rem; top: -.15rem; width: 2.85rem; height: 2.85rem; margin: 0 !important;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--pf-grad); color: var(--pf-space); font-weight: 700; font-size: .95rem;
  box-shadow: 0 0 22px rgba(111,166,224,.45); transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
.pf-step h3 { margin-top: 0; }
.pf-step p { color: var(--pf-muted); }
.pf-step > * { max-width: 36rem; }
.pf-js .pf-step:not(.is-reached) .pf-step__num { background: var(--pf-space); color: var(--pf-muted); box-shadow: inset 0 0 0 1px rgba(155,170,192,.45); }

/* Work: pinned horizontal track (wide), stacked (narrow) */
.pf-hscroll { padding-block: var(--wp--preset--spacing--60) !important; overflow: hidden; }
.pf-hscroll__viewport { padding-inline: clamp(1.25rem, 4vw, 3rem); }
.pf-hscroll__track { display: flex; gap: 1.5rem; align-items: stretch; will-change: transform; }
.pf-hscroll__track > * { margin: 0 !important; flex: none; }
.pf-hscroll__intro { width: min(26rem, 80vw); align-self: center; padding-right: 2rem; }
.pf-hscroll__intro h2 { font-size: var(--wp--preset--font-size--display); line-height: 1; }
.pf-hscroll__intro p { color: var(--pf-muted); font-size: var(--wp--preset--font-size--large); }
.pf-card {
  width: min(30rem, 82vw); min-height: 26rem; padding: 2rem; border-radius: 22px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem;
  background: var(--pf-glass); border: 1px solid rgba(111,166,224,.22);
  box-shadow: 0 0 0 1px rgba(255,255,255,.02) inset, 0 30px 80px -40px rgba(111,166,224,.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.pf-card::before { /* abstract art per card */
  content: ""; position: absolute; inset: 0 0 45% 0; opacity: .9; pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 40%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.pf-card--a::before { background: radial-gradient(18rem 12rem at 30% 40%, rgba(111,166,224,.55), transparent 70%), repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 28px); }
.pf-card--b::before { background: radial-gradient(16rem 12rem at 70% 35%, rgba(30,62,98,.6), transparent 70%), repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 22px); }
.pf-card--c::before { background: conic-gradient(from 200deg at 50% 45%, rgba(111,166,224,.5), rgba(30,62,98,.5), rgba(111,166,224,.0) 60%); filter: blur(18px); }
.pf-card--next { justify-content: center; align-items: flex-start; border-style: dashed; border-color: rgba(155,170,192,.35); background: transparent; box-shadow: none; }
.pf-card > * { position: relative; }
.pf-card h3 { margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.pf-card p { margin: 0; color: var(--pf-muted); }
.pf-card .pf-card__kind { color: var(--pf-cyan); font-size: var(--wp--preset--font-size--small); font-weight: 600; }
@media (max-width: 899px) {
  .pf-hscroll__track { flex-direction: column; }
  .pf-card, .pf-hscroll__intro { width: 100%; }
  .pf-card { min-height: 20rem; }
}

/* About */
.pf-about .wp-block-columns { gap: 3rem 5rem; }
.pf-about p { color: var(--pf-muted); max-width: 38rem; }

/* FAQ */
.pf-faq .wp-block-details summary { font-weight: 600; font-size: var(--wp--preset--font-size--large); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.pf-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.pf-faq .wp-block-details summary::after { content: "+"; color: var(--pf-cyan); font-weight: 300; transition: transform .25s ease; }
.pf-faq .wp-block-details[open] summary::after { transform: rotate(45deg); }
.pf-faq .wp-block-details p { color: var(--pf-muted); max-width: 40rem; }
.pf-faq .wp-block-details:last-child { border-bottom: 1px solid rgba(155,170,192,.25); }

/* Contact */
.pf-contact { min-height: 90vh; display: grid; align-content: center; text-align: center; }
.pf-contact .alignwide { display: flex; flex-direction: column; align-items: center; }
.pf-contact h2 { font-size: var(--wp--preset--font-size--display); max-width: 15ch; line-height: 1.02; }
.pf-contact h2, .pf-contact p, .pf-statement h2, .pf-hero__title { text-shadow: 0 2px 24px rgba(5,13,24,.85); }
.pf-grad { text-shadow: none; }
.pf-contact p { color: var(--pf-muted); font-size: var(--wp--preset--font-size--large); max-width: 34rem; }

/* Footer */
.pf-footer { position: relative; z-index: 1; border-top: 1px solid var(--pf-line); color: var(--pf-muted); font-size: var(--wp--preset--font-size--small); padding-block: 2.5rem !important; background: rgba(5,13,24,.6); }
.pf-footer a { color: var(--pf-white); }

/* Inner pages and blog */
body:not(.home) .wp-site-blocks > main, body:not(.home) main.pf-section { padding-top: 9rem !important; }
.pf-post-list .wp-block-post { border-top: 1px solid var(--pf-line); padding-block: 1.75rem; }
.pf-post-list .wp-block-post-title a { text-decoration: none; color: inherit; }
.pf-post-list .wp-block-post-title a:hover { color: var(--pf-cyan); }
.wp-block-post-date { color: var(--pf-muted); font-size: var(--wp--preset--font-size--small); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  body { background-attachment: scroll; }
}

.pf-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Content pieces from the live site ---------- */
.pf-badge {
  display: inline-flex; align-items: center; gap: .55rem; width: fit-content; margin-bottom: 1.5rem !important;
  padding: .4rem .95rem; border-radius: 999px; font-size: var(--wp--preset--font-size--small); font-weight: 500;
  color: var(--pf-white); background: rgba(111,166,224,.08); border: 1px solid rgba(111,166,224,.35);
}
.pf-badge::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 10px #4ADE80; }
.pf-contact .pf-badge { margin-inline: auto; }

/* Skills: four columns, tags as chips */
.pf-skills.wp-block-columns { flex-wrap: wrap !important; }
.pf-skills > .wp-block-column { flex: 1 1 15rem !important; }
.pf-tags { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.pf-tags li { margin: 0 !important; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; color: var(--pf-white);
  background: rgba(12,26,44,.6); border: 1px solid rgba(155,170,192,.25); }
.pf-services .pf-tags li::marker { content: none; }

/* Experience: dots on the line instead of numbers */
.pf-step::before {
  content: ""; position: absolute; left: calc(-4.5rem + 1.35rem - 7px); top: .35rem; width: 16px; height: 16px; border-radius: 50%;
  background: var(--pf-grad); box-shadow: 0 0 16px rgba(111,166,224,.6); transition: background .3s ease, box-shadow .3s ease;
}
.pf-js .pf-step:not(.is-reached)::before { background: var(--pf-space); box-shadow: inset 0 0 0 2px rgba(155,170,192,.5); }
.pf-step__when { color: var(--pf-cyan); font-size: var(--wp--preset--font-size--small); font-weight: 600; margin: 0 0 .25rem !important; }
.pf-step h3 { margin-bottom: .2rem; }

/* Project cards with screenshots */
.pf-card--image { justify-content: flex-start; padding: 0; min-height: 0; }
.pf-card--image::before { content: none; }
.pf-card--image > :not(.pf-card__shot) { margin-inline: 1.75rem !important; }
.pf-card--image > :last-child { margin-bottom: 1.75rem !important; }
.pf-card__shot { margin: 0 0 1.25rem !important; aspect-ratio: 1000 / 590; overflow: hidden; border-bottom: 1px solid rgba(111,166,224,.2); }
.pf-card__shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.pf-card--image:hover .pf-card__shot img { transform: scale(1.04); }

/* About + certifications */
.pf-certs { padding: 1.75rem !important; border-radius: 20px; background: var(--pf-glass); border: 1px solid rgba(111,166,224,.2); }
.pf-cert-list { list-style: none; padding: 0 !important; margin: 1rem 0 0; }
.pf-cert-list li { padding: .85rem 0; border-top: 1px solid var(--pf-line); color: var(--pf-muted); font-size: var(--wp--preset--font-size--small); }
.pf-cert-list li strong { color: var(--pf-white); font-size: var(--wp--preset--font-size--medium); font-weight: 600; }
.pf-cert-list a { color: inherit; text-decoration-color: var(--pf-cyan); text-underline-offset: 3px; }

/* Contact details */
.pf-contact__details { margin-top: 2rem !important; font-size: var(--wp--preset--font-size--medium) !important; line-height: 1.9; }
.pf-contact__details a { color: var(--pf-white); text-decoration: none; border-bottom: 1px solid rgba(111,166,224,.5); }
.pf-contact__details a:hover { color: var(--pf-cyan); }
.pf-contact .wp-block-buttons { justify-content: center; }

/* ---------- v2.2: resume content, brand color ---------- */

/* Hero: badge and code tags from the original site */
.pf-badge--open { background: linear-gradient(180deg, #6DBA74, #4E9A57); color: #0B1A0E; border: 0; font-weight: 600; box-shadow: 0 0 22px rgba(109,186,116,.35); }
.pf-badge--open::before { background: #0B1A0E; box-shadow: none; }
.pf-code { margin: 0 !important; color: #4F86C6; font-weight: 700; font-size: clamp(1.1rem, .9rem + 1vw, 1.6rem); letter-spacing: .05em; line-height: 1.3; }
.pf-hero__lede { margin-top: 1.5rem !important; }

/* Shared glass panel in brand navy */
.pf-panel { padding: 1.75rem !important; border-radius: 20px; background: rgba(16,34,56,.78); border: 1px solid rgba(111,166,224,.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pf-panel h3 { margin-top: 0; }

/* About */
.pf-about__lead { margin-bottom: var(--wp--preset--spacing--50) !important; }
.pf-about__lead > * { max-width: 52rem; }
.pf-about__text { font-size: var(--wp--preset--font-size--large); line-height: 1.55; color: var(--pf-white) !important; }
.pf-about__cols { gap: 1.5rem !important; }
.pf-about .pf-cert-list li { color: var(--pf-muted); }

/* Experience details */
.pf-step__org { color: var(--pf-white) !important; font-weight: 500; margin: 0 0 .4rem !important; }

/* Why Pourya: stats + reasons */
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; margin-bottom: 1.25rem !important; padding: 1.75rem; border-radius: 20px; background: rgba(5,13,24,.72); border: 1px solid rgba(111,166,224,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pf-stats > * { margin: 0 !important; }
.pf-stat { border-left: 1px solid rgba(111,166,224,.3); padding-left: 1.25rem; }
.pf-stat__num { margin: 0 !important; font-size: clamp(2.2rem, 1.3rem + 2.5vw, 3.6rem); white-space: nowrap; font-weight: 700; line-height: 1; letter-spacing: -0.04em;
  background: var(--pf-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pf-stat__label { margin: .6rem 0 0 !important; color: #C9D4E3; font-size: var(--wp--preset--font-size--small); max-width: 16rem; }
.pf-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.pf-reasons > * { margin: 0 !important; }
.pf-reason p { color: var(--pf-muted); margin-bottom: 0; }
@media (max-width: 899px) { .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-reasons { grid-template-columns: 1fr; } }
@media (max-width: 599px) { .pf-stats { padding: 1.25rem; gap: 1.25rem 1rem; } .pf-stat { padding-left: .9rem; } .pf-stat__num { font-size: 1.85rem; } }

/* =========================================================
   v2.3 — header and sections matched to the original site
   ========================================================= */
:root { --pf-border: #2b2b2b; --pf-text: #F1F6F9; }

/* ---------- Header (original markup and behavior) ---------- */
.pfh { position: fixed; inset: 0 0 auto; z-index: 555; padding-top: 3rem; pointer-events: none; }
.pfh__container { display: flex; justify-content: space-between; align-items: center; padding: 0 4em; }
.pfh__left, .pfh__right { pointer-events: auto; }
.pfh__logo { display: inline-block; line-height: 0; }
.pfh__logo img { height: 50px; width: auto; display: block; }
.pfh__left { transition: opacity .6s ease; }
.pfh.is-scrolled .pfh__left { opacity: 0; pointer-events: none; }
.pfh__right {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4.5rem;
  border: 1px solid var(--pf-border); border-radius: 10px; padding: .59rem;
}
/* Blur lives on a pseudo-element so it doesn't trap the fixed mobile menu inside the box. */
.pfh__right::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 10px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pfh__nav ul { display: flex; list-style: none; margin: 0; padding: 0 0 0 .6rem; gap: 1.5rem; }
.pfh__link { color: #fff; text-decoration: none; font-weight: 300; font-size: 1.1rem; line-height: 1; }
.pfh__link:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.pfh__menu-open, .pfh__menu-close { background: none; border: 0; padding: .25rem; cursor: pointer; line-height: 0; }
.pfh__mobile-only, .pfh__menu-open { display: none; }

.pfh__cta {
  position: relative; display: flex; align-items: center; justify-content: space-between; overflow: hidden;
  min-width: 8rem; min-height: 2.92rem; padding: 2px; border: 1px solid #535353; border-radius: 50px;
  background-color: #2b2b2b; box-shadow: inset 1px 2px 5px #000000a8; text-decoration: none;
  transition: background-color .2s ease, transform .6s ease;
}
.pfh__cta-icon {
  display: flex; align-items: center; justify-content: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background-color: var(--pf-primary); color: #fff; box-shadow: inset 1px -1px 3px 0 #000; transition: transform .3s ease;
}
.pfh__cta-text { display: flex; justify-content: center; width: 100%; color: #fff; font-size: 18px; font-weight: 300; transition: transform .3s ease, color .3s ease; }
.pfh__cta:hover, .pfh__cta:focus-visible { background-color: var(--pf-primary); }
.pfh__cta:hover .pfh__cta-icon, .pfh__cta:focus-visible .pfh__cta-icon { transform: translateX(80px); }
.pfh__cta:hover .pfh__cta-text, .pfh__cta:focus-visible .pfh__cta-text { transform: translateX(-40px); color: #000; }

.pfh__mask { position: absolute; right: 10px; top: 50%; translate: 0 -50%; overflow: hidden; height: 25px; }
.pfh__btt { display: block; background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; transform: translateY(-200%); transition: transform .6s ease; }
.pfh.is-scrolled .pfh__btt { transform: none; }
.pfh.is-scrolled .pfh__cta { transform: translateX(-50px); }

@media (max-width: 991px) {
  .pfh { padding-top: 1.5rem; }
  .pfh__container { justify-content: center; padding: 0 1rem; }
  .pfh__left { display: none; }
  .pfh__right { gap: 1.5rem; }
  .pfh__menu-open { display: block; }
  .pfh__nav ul {
    position: fixed; inset: 0 0 auto; z-index: 999; flex-flow: column; gap: 20px; width: 100%; margin: 0; padding: 1rem !important;
    background-color: var(--pf-space); border: 1px solid var(--pf-border); border-radius: 10px;
    visibility: hidden; opacity: 0; transition: opacity .3s ease, visibility .3s;
  }
  .pfh__nav ul.is-open { visibility: visible; opacity: 1; }
  .pfh__mobile-only { display: block; }
  .pfh__mobile-logo { text-align: center; margin: 1rem auto; }
  .pfh__mobile-logo img { width: 100px; height: auto; }
}
@media (prefers-reduced-motion: reduce) { .pfh__cta:hover .pfh__cta-icon, .pfh__cta:hover .pfh__cta-text { transform: none; } }

/* ---------- Typography and shared pieces from the original ---------- */
body { font-weight: 300; }
.pf-oldsec { position: relative; padding: 5rem 7.56rem !important; max-width: 1600px; margin-inline: auto !important; }
.pf-oldsec p { color: var(--pf-text); font-size: .97rem; font-weight: 300; line-height: 2; }
.pf-oldsec h2 { color: var(--pf-text); font-size: 2.2rem; font-weight: 600; line-height: 1; margin: 0 !important; }
.pf-oldsec h3 { color: var(--pf-text); font-size: 1.28rem; font-weight: 600; line-height: 1.2; margin: 0; }
.pf-pill {
  display: inline-block; width: fit-content; margin: 0 0 2vh !important; padding: 6px 15px !important;
  background-color: var(--pf-primary); border: 1px solid var(--pf-primary); border-radius: 999px;
  color: #fff !important; font-size: 14px !important; font-weight: 300 !important; line-height: 1.4 !important;
}
@media (max-width: 991px) {
  .pf-oldsec { padding: 3rem 4vw !important; }
  .pf-oldsec h2 { font-size: 2rem; }
  .pf-oldsec p { font-size: .89rem; line-height: 1.6; }
}

/* ---------- Hero: shorter, sized like the original ---------- */
.pf-hero { min-height: 0 !important; padding-block: calc(20vh + 3rem) 6rem !important; }
.pf-hero__title { font-size: clamp(1.9rem, 1.2rem + 2.1vw, 2.7rem) !important; font-weight: 600 !important; line-height: 1.22 !important; letter-spacing: .05rem !important; max-width: 34ch !important; }
.pf-hero__content > * { max-width: 62rem; }
.pf-code { font-size: clamp(1.9rem, 1.2rem + 2.1vw, 2.7rem); color: #05668d; font-weight: 600; line-height: 1.22; }
.pf-badge--open { background-image: linear-gradient(80deg, #345234, #69a569); box-shadow: 3px 5px 5px #233723; color: #000; font-weight: 400; padding: 6px 15px; }
.pf-badge--open::before { content: none; }
.pf-hero .wp-block-buttons { margin-top: 1.75rem; gap: .5rem; }
.pf-hero .wp-block-button__link { font-size: .95rem; font-weight: 300; padding: 13px 15px; letter-spacing: .02em; }
.pf-hero .wp-block-button:not(.is-style-pf-ghost) .wp-block-button__link { background: var(--pf-primary); border-color: var(--pf-primary); }
.pf-hero .is-style-pf-ghost .wp-block-button__link { box-shadow: none; border: 1px solid var(--pf-border) !important; }
.pf-hero .is-style-pf-ghost .wp-block-button__link:hover { box-shadow: -3px 3px 5px #1e3e62a8; }
@media (max-width: 899px) { .pf-hero { padding-top: 42vh !important; padding-bottom: 3rem !important; } }

/* ---------- My Skills: original skill cards ---------- */
.pf-oldsec__head { display: flex; align-items: center; justify-content: space-between; gap: 40px 20px; }
.pf-oldsec__title { width: 60%; }
.pf-cv { position: relative; display: inline-flex; overflow: hidden; border-radius: 999px; flex: none; }
.pf-cv__link {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: .4rem 2.375rem;
  border: 2px solid var(--pf-cyan); border-radius: 999px; color: var(--pf-cyan); font-size: 1.8rem; font-weight: 400; text-decoration: none; transition: color .4s ease;
}
.pf-cv__bg { position: absolute; z-index: 1; top: 0; left: 50%; width: 10.25rem; height: 10.25rem; border-radius: 50%; background: var(--pf-primary); transform: translateX(-50%) scale(0); transition: transform .75s cubic-bezier(.165,.84,.44,1); }
.pf-cv:hover .pf-cv__bg, .pf-cv:focus-within .pf-cv__bg { transform: translateX(-50%) scale(2); }
.pf-cv:hover .pf-cv__link, .pf-cv:focus-within .pf-cv__link { color: #fff; }

.pf-skillboard {
  position: relative; display: flex; align-items: center; justify-content: center; height: 80vh; min-height: 600px; width: 100%; margin-top: 2rem !important;
}
.pf-skill { position: absolute; z-index: 1; padding: 1.05rem; margin: 0 !important; will-change: transform; }
.pf-skill:hover, .pf-skill:focus-within, .pf-skill.is-open { z-index: 3; }
.pf-skill--pos1 { bottom: 23%; left: 18%; }
.pf-skill--pos2 { top: 10%; left: 50%; translate: -50% 0; }
.pf-skill--pos3 { bottom: 33%; right: 14%; }
.pf-skill--pos4 { top: 35%; left: 3%; }
.pf-skill__card {
  position: relative; overflow: hidden; width: 20rem; height: 4.72rem; border: 1px solid var(--pf-border); border-radius: 2.78rem;
  transition: width .5s cubic-bezier(.165,.84,.44,1), height .5s cubic-bezier(.165,.84,.44,1), border-radius .5s ease;
  outline: none;
}
.pf-skill--blue .pf-skill__card { background-color: #3858e9; }
.pf-skill--orange .pf-skill__card { background-color: #fd8a04; }
.pf-skill--red .pf-skill__card { background-color: #D41C1C; }
.pf-skill--lightblue .pf-skill__card { background-color: #2E68D6; }
/* round black button with arrow (open) / cross (close) */
.pf-skill__card::before {
  content: ""; position: absolute; z-index: 3; top: .36rem; left: .4rem; width: 4rem; height: 4rem; border-radius: 50%; background: #000;
  transition: left .5s cubic-bezier(.165,.84,.44,1);
}
.pf-skill__card::after {
  content: ""; position: absolute; z-index: 4; top: .36rem; left: .4rem; width: 4rem; height: 4rem; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8'/%3E%3C/svg%3E") center / 45px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8'/%3E%3C/svg%3E") center / 45px no-repeat;
  transition: left .5s cubic-bezier(.165,.84,.44,1);
}
.pf-skill__label { position: relative; z-index: 2; margin: 0 !important; padding-left: 6rem; line-height: 4.72rem !important; height: 4.72rem;
  color: #F1F6F9 !important; font-size: 1.28rem !important; font-weight: 600 !important; white-space: nowrap; transition: opacity .3s ease; }
.pf-skill__content { position: absolute; inset: 0; z-index: 1; padding: 30px; opacity: 0; transition: opacity .3s ease; overflow: hidden; }
.pf-skill__content svg { margin-bottom: 1rem; }
.pf-skill__content h3 { margin-bottom: .5rem !important; }
.pf-skill__content p { line-height: 1.7 !important; margin: 0 0 .75rem !important; }
.pf-skill__tags { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pf-skill__tags li { padding: .2rem .65rem; border-radius: 999px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: .78rem; font-weight: 400; }

@media (min-width: 992px) {
  .pf-skill:hover .pf-skill__card, .pf-skill:focus-within .pf-skill__card, .pf-skill.is-open .pf-skill__card { width: 25rem; height: 32rem; border-radius: 2rem; }
  .pf-skill:hover .pf-skill__card::before, .pf-skill:hover .pf-skill__card::after,
  .pf-skill:focus-within .pf-skill__card::before, .pf-skill:focus-within .pf-skill__card::after,
  .pf-skill.is-open .pf-skill__card::before, .pf-skill.is-open .pf-skill__card::after { left: calc(100% - 4.4rem); }
  .pf-skill:hover .pf-skill__card::after, .pf-skill:focus-within .pf-skill__card::after, .pf-skill.is-open .pf-skill__card::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z'/%3E%3C/svg%3E");
    -webkit-mask-size: 30px; mask-size: 30px;
  }
  .pf-skill:hover .pf-skill__label, .pf-skill:focus-within .pf-skill__label, .pf-skill.is-open .pf-skill__label { opacity: 0; }
  .pf-skill:hover .pf-skill__content, .pf-skill:focus-within .pf-skill__content, .pf-skill.is-open .pf-skill__content { opacity: 1; transition-delay: .15s; }
}
@media (max-width: 991px) {
  .pf-oldsec__head { flex-flow: column; align-items: flex-start; }
  .pf-oldsec__title { width: 100%; }
  .pf-skillboard { flex-flow: column; gap: 1.25rem; height: auto; min-height: 0; background: none; }
  .pf-skill { position: static; translate: none; padding: 0; width: 100%; }
  .pf-skill__card { width: 100%; height: auto; border-radius: 2rem; }
  .pf-skill__card::before, .pf-skill__card::after { display: none; }
  .pf-skill__label { display: none; }
  .pf-skill__content { position: static; opacity: 1; padding: 24px; }
}

/* ---------- About: original layout ---------- */
.pf-experience { display: flex; justify-content: space-between; gap: 5.56rem; }
.pf-experience__text { max-width: 40%; }
.pf-exgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 80%; flex: 1; }
.pf-exgrid > * { margin: 0 !important; }
.pf-excol { display: flex; flex-flow: column; align-items: center; justify-content: center; gap: .75rem; padding: 1rem; text-align: center;
  border: 1px solid var(--pf-border); border-radius: .5rem; background: rgba(5,13,24,.55); transition: box-shadow .4s ease; }
.pf-excol:hover { box-shadow: 0 0 380px -30px var(--pf-primary); }
.pf-excol__icon { margin: 0 !important; }
.pf-excol__icon img { width: 100px; height: 100px; object-fit: contain; }
@media (max-width: 991px) {
  .pf-experience { flex-flow: column; gap: 2.5rem; }
  .pf-experience__text, .pf-exgrid { max-width: 100%; }
}

/* ---------- Why Pourya: original FAQ accordion ---------- */
.pf-faq2 { display: flex; justify-content: space-between; gap: 5.56rem; }
.pf-faq2__head { flex: 1 1 30%; }
.pf-faq2__list { display: grid; gap: 20px; width: 70%; }
.pf-faq2__list > * { margin: 0 !important; }
.pf-why-sec .wp-block-details {
  position: relative; isolation: isolate; overflow: hidden; padding: 0 !important; border: 1px solid var(--pf-border) !important; border-radius: 10px;
  background: rgb(5 13 24 / 94%); color: #d6d7e0;
}
.pf-why-sec .wp-block-details::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; right: -5rem; width: 40%;
  background-image: linear-gradient(93deg, var(--pf-space), var(--pf-primary) 61%, var(--pf-primary) 100%); filter: blur(2px);
  transform: translateX(100%); opacity: 0; transition: transform .5s ease, opacity .5s ease;
}
.pf-why-sec .wp-block-details:hover::before { transform: none; opacity: 1; }
.pf-why-sec .wp-block-details summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 20px; cursor: pointer; list-style: none;
  font-size: 1.2rem; font-weight: 300; color: #d6d7e0;
}
.pf-why-sec .wp-block-details summary::-webkit-details-marker { display: none; }
.pf-why-sec .wp-block-details summary::after {
  content: ""; flex: none; width: 25px; height: 25px; background: currentColor; transform: none; transition: transform .3s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pf-why-sec .wp-block-details[open] summary::after { transform: rotate(180deg); }
.pf-why-sec .wp-block-details > :not(summary) { padding: 0 20px; margin: 0 0 20px !important; }
.pf-roles { list-style: none; padding: 0 20px !important; display: grid; gap: .9rem; }
.pf-roles li { color: var(--pf-text); font-size: .97rem; line-height: 1.6; }
.pf-roles strong { font-weight: 600; }
.pf-roles a { color: var(--pf-cyan); }
@supports (interpolate-size: allow-keywords) {
  .pf-why-sec .wp-block-details { interpolate-size: allow-keywords; }
  .pf-why-sec .wp-block-details::details-content { height: 0; overflow: hidden; transition: height .4s ease, content-visibility .4s allow-discrete; }
  .pf-why-sec .wp-block-details[open]::details-content { height: auto; }
}
@media (max-width: 991px) {
  .pf-faq2 { flex-flow: column; gap: 1rem; }
  .pf-faq2__list { width: 100%; }
  .pf-why-sec .wp-block-details summary { font-size: 1rem; }
}
.pf-skills-sec { padding-top: 11rem !important; }
@media (max-width: 991px) { .pf-skills-sec { padding-top: 7rem !important; } }

/* Orange card: dark text for contrast (white on #fd8a04 is 2.4:1) */
.pf-skill--orange .pf-skill__label, .pf-skill--orange .pf-skill__content h3, .pf-skill--orange .pf-skill__content p { color: #111 !important; }
.pf-skill--orange .pf-skill__content svg { fill: #111; }
.pf-skill--orange .pf-skill__tags li { color: #111; border-color: rgba(0,0,0,.35); background: rgba(255,255,255,.25); }

/* Professional Experience (timeline) in the original-site style */
.pf-exp-sec { padding-bottom: 8rem !important; }
.pf-exp-sec__head { margin-bottom: 3rem !important; max-width: 40rem; }
.pf-exp-sec .pf-steps { max-width: 44rem; }
.pf-exp-sec .pf-step__when { color: var(--pf-cyan); font-size: .9rem !important; font-weight: 600; line-height: 1.4 !important; margin: 0 0 .35rem !important; }
.pf-exp-sec .pf-step h3 { margin-bottom: .2rem !important; }
.pf-exp-sec .pf-step__org { font-weight: 500 !important; line-height: 1.5 !important; margin: 0 0 .4rem !important; }
.pf-exp-sec .pf-step p:last-child { color: var(--pf-muted); line-height: 1.8; }

/* ---------- Hero intro (character reveal, see src/hero.js) ---------- */
html.pf-anim:not(.pf-anim-run) .pf-hero__title, html.pf-anim:not(.pf-anim-run) .pf-hero .pf-code { opacity: .2; }
html.pf-anim .pf-hero .pf-badge { opacity: 0; visibility: hidden; transform: translateY(20px); }
html.pf-anim .pf-hero .wp-block-button { opacity: 0; visibility: hidden; transform: translateY(50px); }
.pf-hero .pf-w { white-space: nowrap; }
.pf-grad.is-split { background: none; -webkit-text-fill-color: currentColor; }
.pf-grad.is-split .pf-ch {
  background: var(--pf-grad) no-repeat; background-size: var(--gw) var(--gh); background-position: var(--gx) var(--gy);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Portrait gap (between My Skills and About) ---------- */
.pf-portrait { position: relative; display: grid; place-items: center; height: 44svh; min-height: 340px; margin: 0 !important; }
.pf-portrait__img { margin: 0 !important; transition: opacity 1s ease; }
.pf-portrait__img img { width: 170px !important; height: auto; opacity: .6; }
.pf-3d .pf-portrait__img { opacity: 0; }
@media (max-width: 899px) { .pf-portrait { height: 40svh; min-height: 320px; } }
