@font-face { font-family: "Lalezar"; src: url("fonts/Lalezar-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-ExtraBold.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Black.ttf") format("truetype"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --red: #02c3df;
  --white: #f6f6f6;
  --muted: #b9bbc0;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; scroll-behavior: smooth; }
html { scroll-snap-type: y mandatory; overscroll-behavior-y: none; }
body { overscroll-behavior-y: none; }

body {
  background: #171a1e;
  color: var(--white);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.hero {
  position: relative;
  isolation: isolate;
  z-index: 10;
  width: 100%;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  background: #24272c;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero,
.profile-section,
.about-section,
.portfolio-section,
.resume-section,
.blog-section,
.contact-section {
  width: 100%;
  height: 100svh;
  min-height: 680px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.portrait {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("image/1.jpg") center center / cover no-repeat;
  filter: grayscale(1) contrast(1.05) brightness(.63);
  transform: scale(1.01);
}

.shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(9, 12, 16, .08), rgba(9, 12, 16, .34)),
    linear-gradient(90deg, rgba(12, 15, 19, .1), transparent 45%, rgba(10, 13, 17, .08));
}

#ambient-particles { position: fixed; z-index: 900; inset: 0; width: 100%; height: 100%; opacity: .68; pointer-events: none; }

.site-header {
  position: fixed;
  top: 29px;
  left: 19.5%;
  right: 19.5%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  direction: rtl;
  z-index: 1000;
  transition: top .3s, left .3s, right .3s;
}

.site-header::before { content: ""; position: fixed; z-index: -1; top: 0; left: 0; right: 0; height: 66px; background: rgba(17,21,24,0); border-bottom: 1px solid transparent; backdrop-filter: blur(0); transition: .35s; pointer-events: none; }
.site-header.scrolled::before { background: rgba(17,21,24,.94); border-color: rgba(255,255,255,.035); backdrop-filter: blur(10px); }

.brand { direction: ltr; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.brand-name { font: 800 27px/1 Arial, sans-serif; letter-spacing: 2px; }
.brand-name i { display: inline-block; width: 18px; height: 2px; margin: 0 3px 7px 0; background: var(--red); }
.brand-subtitle { margin-top: 7px; font: 400 9px/1 Arial, sans-serif; letter-spacing: 3px; color: #ddd; }

.main-nav { display: flex; gap: clamp(12px, 1.4vw, 24px); align-items: center; padding-top: 5px; }
.main-nav a { position: relative; font-size: 13.5px; font-weight: 800; letter-spacing: -.25px; transition: color .25s, transform .25s; white-space: nowrap; opacity: 0; animation: nav-in .55s cubic-bezier(.2,.8,.2,1) forwards; }
.main-nav a:nth-child(2) { animation-delay: .07s; }
.main-nav a:nth-child(3) { animation-delay: .14s; }
.main-nav a:nth-child(4) { animation-delay: .21s; }
.main-nav a:nth-child(5) { animation-delay: .28s; }
.main-nav a:nth-child(6) { animation-delay: .35s; }
.main-nav a:nth-child(7) { animation-delay: .42s; }
.main-nav a:hover, .main-nav .active { color: var(--red); }
.main-nav a:hover { transform: translateY(-2px); }
.main-nav .active::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--red); right: 50%; bottom: -13px; transform: translateX(50%); }

.intro {
  position: absolute;
  top: 39%;
  right: auto;
  left: 50%;
  width: min(700px, calc(100vw - 60px));
  text-align: right;
  transform: translateX(-50%);
}

.eyebrow { margin: 0 0 6px; color: #02c3df; font-size: 24px; font-weight: 800; opacity: 0; animation: reveal-up .7s .25s ease forwards; }
.title-row { display: flex; justify-content: flex-start; direction: rtl; }
h1 { direction: rtl; min-height: 1.17em; margin: 0; font-family: "Lalezar", "Vazirmatn", Tahoma, sans-serif; font-size: clamp(55px, 5vw, 82px); font-weight: 400; line-height: 1.17; letter-spacing: -2px; text-shadow: 0 8px 28px rgba(0,0,0,.18); opacity: 0; animation: title-in .85s .4s cubic-bezier(.2,.9,.2,1) forwards; }
#intro-title { font-size: clamp(30px, 2.7vw, 46px); }
.typed-word { display: inline-block; }
.caret { display: inline-block; width: 4px; height: .86em; margin-right: 9px; background: #eee; vertical-align: -.06em; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }


@keyframes nav-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes title-in { from { opacity: 0; transform: translateX(25px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }

.menu-button { display: none; border: 0; background: transparent; padding: 8px; }
.menu-button span { display: block; width: 25px; height: 2px; margin: 5px; background: white; transform-origin: center; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .22s, width .3s, background .25s; }

.about-section,
.profile-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #f4f4f4;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.about-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26vh 15% 11vh;
  background:
    linear-gradient(rgba(23, 26, 30, .86), rgba(23, 26, 30, .89)),
    url("image/2.jpg") center center / cover no-repeat,
    #171a1e;
}

.profile-section { display: flex; flex-direction: column; justify-content: center; padding: 100px 30px 65px; overflow-y: auto; background: radial-gradient(circle at 78% 22%, rgba(2,195,223,.09), transparent 32%), linear-gradient(90deg, rgba(12,16,19,.94), rgba(17,21,24,.84), rgba(12,16,19,.94)), url("image/7.png") center / cover no-repeat; }
.profile-heading { text-align: center; }
.profile-heading h2 { margin: 0; font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: clamp(38px, 3vw, 52px); font-weight: 400; }
.profile-heading .heading-lines { margin-top: 9px; }
.profile-copy { max-width: 1080px; margin: 26px auto 0; color: #aaa; font-size: 18px; font-weight: 600; line-height: 2; text-align: center; }
.profile-copy p { margin: 0; }
.profile-copy p:not(.profile-profession) { text-align: justify; text-align-last: right; }
.profile-copy .profile-profession { color: #f2f2f2; font-size: 16px; font-weight: 800; direction: rtl; text-align: right; }
.profile-profession span { position: relative; display: block; margin-bottom: 6px; padding-right: 18px; }
.profile-profession span::before { content: ""; position: absolute; top: .68em; right: 0; width: 7px; height: 7px; border: 2px solid #02c3df; border-radius: 50%; transform: translateY(-50%); }
.profile-documents-link { display: inline-flex; align-items: center; justify-content: center; margin: 12px 0; padding: 7px 18px; border: 1px solid rgba(2,195,223,.55); border-radius: 3px; color: #02c3df; font-size: 18px; font-weight: 800; transition: color .25s, background .25s, box-shadow .25s; }
.profile-documents-link:hover { background: #02c3df; color: #101417; box-shadow: 0 0 20px rgba(2,195,223,.2); }
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(35px, 7vw, 110px); width: 100%; max-width: 1200px; margin: 48px auto 0; direction: ltr; }
.skill { direction: rtl; text-align: center; }
.skill:nth-child(2) { transition-delay: .1s; }
.skill:nth-child(3) { transition-delay: .2s; }
.skill:nth-child(4) { transition-delay: .3s; }
.skill-ring { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 112px; aspect-ratio: 1; margin: 0 auto; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.skill:hover .skill-ring { transform: none; border-color: transparent; background: transparent; }
.skill-ring svg { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.skill-ring circle { fill: none; stroke-width: 4; }
.ring-track { stroke: #34383b; }
.ring-value { stroke: #02c3df; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset 1.35s .25s cubic-bezier(.2,.8,.2,1); }
.skill.visible .ring-value { stroke-dashoffset: var(--ring-offset); }
.skill-icon { width: 48px !important; height: 48px !important; overflow: visible; fill: none; stroke: #02c3df; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: none !important; }
.skill-ring strong { display: grid; place-items: center; color: #f4f4f4; font: 800 30px/1 "Vazirmatn", sans-serif; direction: ltr; }
.skill h3 { margin: 14px 0 0; font-size: 22px; font-weight: 900; }

.about-glow { position: absolute; top: 0; left: 0; right: 0; height: 190px; background: linear-gradient(180deg, rgba(0,0,0,.16), transparent); pointer-events: none; }
.section-heading { position: relative; z-index: 1; text-align: center; }
.section-heading > p { display: none; color: #02c3df; margin: 0 0 5px; font-size: 14px; font-weight: 700; }
.section-heading h2 { margin: 0; font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: clamp(34px, 3vw, 48px); font-weight: 400; }
.heading-lines { direction: ltr; display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; }
.heading-lines i { display: block; width: 30px; height: 1px; background: #575c60; }
.heading-lines i:nth-child(2) { background: var(--red); }

.service-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1200px; margin: 58px auto 0; direction: ltr; }
.service-card { direction: rtl; min-height: 0; padding: 22px 32px; border-right: 1px solid rgba(255,255,255,.19); }
.service-card:last-child { border-left: 1px solid rgba(255,255,255,.19); }
.service-title { display: flex; align-items: center; justify-content: flex-start; gap: 28px; }
.service-title svg { flex: 0 0 46px; width: 46px; height: 46px; fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.service-title .service-icon { flex: 0 0 46px; width: 46px; height: 46px; object-fit: contain; filter: invert(68%) sepia(86%) saturate(1800%) hue-rotate(145deg) brightness(93%) contrast(103%); }
.service-title h3 { margin: 0; font-size: 20px; font-weight: 900; }
.service-card p { display: none; }

.reveal-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity .75s ease, transform .75s cubic-bezier(.2,.8,.2,1); }
.reveal-on-scroll.visible { opacity: 1; transform: none; }
.service-card:nth-child(2) { transition-delay: .13s; }
.service-card:nth-child(3) { transition-delay: .26s; }

.portfolio-section { position: relative; min-height: 100vh; padding: 82px 14% 45px; overflow: hidden; background: #15191c; color: #f4f4f4; scroll-snap-align: start; scroll-snap-stop: always; }
.portfolio-heading { display: block; margin-bottom: 28px; text-align: center; }
.portfolio-heading h2 { margin: 0; font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 42px; font-weight: 400; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; max-width: 1215px; height: calc(100vh - 230px); max-height: 590px; margin: 0 auto; direction: ltr; }
.portfolio-item { position: relative; display: block; min-height: 0; overflow: hidden; border-radius: 18px; background: #0d1012; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.item-one { grid-column: 1; grid-row: 1; }
.item-three { grid-column: 1; grid-row: 2; }
.item-two { grid-column: 2; grid-row: 1; }
.item-four { grid-column: 2; grid-row: 2; }
.item-five { grid-column: 3; grid-row: 1 / span 2; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.42); transform: scale(1.015); transition: filter .5s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
.item-one img { object-position: 15% center; }
.item-two img { object-position: 67% center; }
.item-three img { object-position: center 42%; filter: grayscale(1) brightness(.5) contrast(1.1); }
.item-four img { object-position: 35% center; filter: grayscale(1) brightness(.38) contrast(1.15); }
.item-five img { object-position: 68% center; filter: grayscale(1) brightness(.46) contrast(1.08); }
.portfolio-item::after { content: ""; position: absolute; z-index: 1; inset: 0; border: 1px solid transparent; background: rgba(0,0,0,.1); background-size: 220% 220%; opacity: 1; transition: background .4s, border-color .4s, opacity .4s; }
.portfolio-item::before { content: ""; position: absolute; z-index: 3; inset: 0; padding: 3px; border-radius: inherit; background: conic-gradient(from var(--rgb-angle), #02c3df 0 18%, #fff 25% 34%, #02c3df 42% 68%, #fff 75% 84%, #02c3df 92% 100%); opacity: .85; pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: rgb-border-spin 7s linear infinite; transition: opacity .25s; }
.portfolio-item > span { position: absolute; z-index: 2; right: 24px; bottom: 20px; direction: rtl; opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .35s; }
.portfolio-item strong, .portfolio-item small { display: block; }
.portfolio-item strong { font-size: 19px; }
.portfolio-item small { margin-top: 3px; color: #02c3df; font-size: 11px; }
.portfolio-item:hover img, .portfolio-item:focus-visible img { filter: grayscale(0) brightness(1.08) saturate(1.3); transform: scale(1.055); }
.portfolio-item:hover::before, .portfolio-item:focus-visible::before { opacity: 1; animation-duration: 5s; }
.portfolio-item:hover::after, .portfolio-item:focus-visible::after { border-color: transparent; background: linear-gradient(120deg, rgba(2,195,223,.34), rgba(96,62,255,.24), rgba(255,65,160,.28), rgba(2,195,223,.34)); background-size: 220% 220%; mix-blend-mode: color; animation: portfolio-color-wave 5s ease-in-out infinite alternate; }
.portfolio-item:hover > span, .portfolio-item:focus-visible > span { opacity: 1; transform: none; }
.portfolio-item:nth-child(2) { transition-delay: .08s; }
.portfolio-item:nth-child(3) { transition-delay: .16s; }
.portfolio-item:nth-child(4) { transition-delay: .24s; }
.portfolio-item:nth-child(5) { transition-delay: .32s; }

@property --rgb-angle { syntax: "<angle>"; initial-value: 315deg; inherits: false; }
@keyframes rgb-border-spin { to { --rgb-angle: 675deg; } }
@keyframes portfolio-color-wave { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.resume-section { position: relative; min-height: 100vh; padding: 78px 14% 38px; overflow: hidden; background: #15191c; color: #f4f4f4; scroll-snap-align: start; scroll-snap-stop: always; }
.resume-heading { text-align: center; }
.resume-heading h2 { margin: 0; font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 44px; font-weight: 400; }
.resume-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7%; max-width: 990px; margin: 34px auto 0; direction: rtl; }
.timeline-column { min-width: 0; }
.timeline-column:nth-child(2) { transition-delay: .15s; }
.timeline-column > h3 { margin: 0 0 22px; text-align: center; font-size: 27px; font-weight: 900; }
.timeline-item { position: relative; padding-right: 0; border-right: 1px solid rgba(255,255,255,.2); }
.timeline-date { position: relative; height: 34px; padding: 7px 22px; background: #24282b; font-size: 13px; font-weight: 800; }
.timeline-date b { position: absolute; top: 50%; right: -17px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #02c3df; color: #171a1e; font-size: 12px; transform: translateY(-50%); }
.timeline-body { min-height: 138px; padding: 15px 24px 14px 18px; }
.timeline-body h4 { margin: 0; font-size: 18px; font-weight: 900; }
.timeline-body em { display: block; margin-top: 2px; color: #02c3df; font-size: 13px; font-style: normal; font-weight: 600; }
.timeline-body p { margin: 12px 0 0; color: #aaa; font-size: 13.5px; font-weight: 600; line-height: 1.85; }

.blog-section { position: relative; min-height: 100vh; padding: 82px 17% 50px; overflow: hidden; background: linear-gradient(rgba(21,25,28,.84), rgba(21,25,28,.9)), url("image/3.jpg") center / cover no-repeat; color: #f4f4f4; scroll-snap-align: start; scroll-snap-stop: always; }
.blog-heading { text-align: center; }
.blog-heading h2 { margin: 0; font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 44px; font-weight: 400; }
.blog-slider { max-width: 980px; margin: 30px auto 0; overflow: hidden; }
.blog-track { display: flex; width: 200%; direction: ltr; transition: transform .75s cubic-bezier(.2,.8,.2,1); }
.blog-page { flex: 0 0 50%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; direction: rtl; }
.blog-card { min-width: 0; text-align: right; }
.blog-card img { display: block; width: 100%; height: 208px; object-fit: cover; filter: grayscale(1) brightness(.72); transition: filter .4s, transform .5s; }
.blog-card a { display: block; overflow: hidden; }
.blog-card a:hover img { filter: grayscale(0) brightness(1); transform: scale(1.035); }
.blog-card h3 { margin: 18px 0 0; color: #f5f5f5; font-size: 17px; font-weight: 900; }
.blog-card p { margin: 8px 0 0; color: #aaa; font-size: 12px; font-weight: 600; line-height: 1.95; }
.blog-dots { display: flex; direction: ltr; justify-content: center; gap: 9px; margin-top: 48px; }
.blog-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #5c6063; cursor: pointer; transition: background .25s, transform .25s; }
.blog-dots button.active { background: #02c3df; transform: scale(1.15); }

.contact-section { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 85px 16% 45px; overflow: hidden; background: linear-gradient(rgba(15,18,21,.67), rgba(15,18,21,.76)), url("assets/contact-background.png") center / cover no-repeat; color: #f4f4f4; scroll-snap-align: start; scroll-snap-stop: always; }
.contact-content { width: 100%; max-width: 650px; text-align: center; }
.contact-heading h2 { margin: 0; font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 44px; font-weight: 400; }
.contact-form { margin-top: 30px; }
.contact-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-form label { position: relative; display: block; }
.contact-form label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid rgba(255,255,255,.25); border-radius: 0; outline: none; background: rgba(255,255,255,.025); color: white; font: 600 12px/1.5 "Vazirmatn", sans-serif; text-align: right; transition: border-color .25s, background .25s; }
.contact-form input { height: 38px; padding: 0 13px; }
.contact-form textarea { display: block; height: 135px; margin-top: 17px; padding: 13px; resize: none; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #02c3df; background: rgba(255,255,255,.06); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #bcbcbc; opacity: .85; }
.contact-form button { min-width: 150px; height: 38px; margin-top: 18px; border: 0; background: #02c3df; color: #171a1e; font: 800 12px "Vazirmatn", sans-serif; cursor: pointer; transition: background .25s, transform .25s; }
.contact-form button:hover { background: #02c3df; color: #171a1e; transform: translateY(-2px); }
.form-status { min-height: 18px; margin: 7px 0 0; color: #02c3df; font-size: 11px; }
.contact-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 23px; }
.contact-details strong, .contact-details a, .contact-details span { display: block; }
.contact-details strong { margin-bottom: 9px; font-size: 18px; font-weight: 900; }
.contact-details a, .contact-details span { color: #bbb; font-size: 15px; }
.contact-details a:hover { color: #02c3df; }
.contact-icon-bar { display: flex; direction: ltr; justify-content: center; align-items: center; gap: 10px; margin-top: 42px; }
.contact-icon-bar a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(255,255,255,.025); color: #02c3df; transition: color .25s, border-color .25s, background .25s, transform .25s; }
.contact-icon-bar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-icon-bar .fill-icon { fill: currentColor; stroke: none; }
.contact-icon-bar a:hover { border-color: #02c3df; background: rgba(2,195,223,.1); color: #fff; transform: translateY(-3px); }
.hero-contact-icons { justify-content: flex-end; margin-top: 12px; opacity: 0; animation: reveal-up .65s .85s ease forwards; }
.hero-datetime { box-sizing: border-box; width: 314px; max-width: 100%; margin: 10px 0 0 auto; padding-right: 22px; color: #d7dadd; font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 15px; font-weight: 600; direction: rtl; text-align: right; opacity: 0; animation: reveal-up .65s 1s ease forwards; }
.contact-details--standalone { margin-top: 55px; padding: 28px 20px; }
.copyright { position: absolute; right: 0; bottom: 0; left: 0; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.17); background: rgba(12,15,18,.45); color: #b9bbc0; font-size: 8px; font-weight: 500; text-align: center; backdrop-filter: blur(5px); }

.back-to-top { position: absolute; z-index: 1; top: 50%; left: 20px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; background: transparent; color: #02c3df; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 8px)); transition: opacity .3s, visibility .3s, transform .3s, color .25s; }
.back-to-top svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(-50%); }
.back-to-top:hover { color: #fff; }
.back-to-top:hover svg { transform: translateY(-3px); }

.portfolio-modal[hidden] { display: none; }
.portfolio-modal { position: fixed; z-index: 2000; inset: 0; display: grid; place-items: center; padding: 42px 7%; overflow-y: auto; background: rgba(18,22,25,.98); }
.portfolio-modal-inner { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 38px; width: 100%; max-width: 1160px; direction: ltr; }
.portfolio-modal-media { min-height: 570px; background: #0e1113; overflow: hidden; }
.portfolio-modal-media img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-modal-copy { direction: rtl; color: #f5f5f5; text-align: right; }
.portfolio-modal-copy h2 { margin: 0 0 14px; font-family: "Lalezar", "Vazirmatn", sans-serif; font-size: 32px; font-weight: 400; }
.portfolio-modal-copy > p { margin: 0; color: #bbb; font-size: 13px; line-height: 2; }
.portfolio-modal-copy dl { margin: 22px 0; }
.portfolio-modal-copy dl div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 12px; }
.portfolio-modal-copy dt { color: #ddd; }
.portfolio-modal-copy dd { margin: 0; color: #02c3df; }
.portfolio-modal-copy blockquote { margin: 26px 0 0; font-size: 17px; font-weight: 800; line-height: 1.65; }
.portfolio-modal-copy cite { display: block; margin-top: 9px; color: #bbb; font-size: 11px; font-style: normal; font-weight: 400; }
.portfolio-modal-close { position: fixed; z-index: 1; top: 18px; left: 22px; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: transparent; color: white; font-size: 25px; cursor: pointer; transition: color .25s, border-color .25s, transform .25s; }
.portfolio-modal-close:hover { color: #02c3df; border-color: #02c3df; transform: rotate(90deg); }
body.modal-open { overflow: hidden; }

@media (max-width: 1100px) {
  .site-header { left: 7%; right: 7%; }
  .main-nav { gap: 20px; }
  .intro { right: 11%; width: 53%; }
}

@media (max-width: 760px) {
  .hero,
  .profile-section,
  .about-section,
  .certificates-section,
  .portfolio-section,
  .resume-section,
  .blog-section,
  .contact-section {
    width: 100%;
    height: 100svh;
    min-height: 100svh;
  }
  .portrait {
    inset: 0;
    height: auto;
    background-position: 79% center;
    background-size: cover;
    transform: translate(3.5%, -3.5%) scale(1.05);
  }
  .site-header { top: 22px; left: 24px; right: 24px; }
  .menu-button { position: relative; z-index: 3; display: block; cursor: pointer; }
  .menu-button[aria-expanded="true"] span { background: #02c3df; }
  .menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-button[aria-expanded="true"] span:nth-child(2) { width: 0; opacity: 0; }
  .menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  body.menu-open { overflow: hidden; }
  body.menu-open::before { content: ""; position: fixed; z-index: 9; inset: 0; display: block; background: rgba(7,10,12,.74); backdrop-filter: grayscale(1) blur(10px); -webkit-backdrop-filter: grayscale(1) blur(10px); animation: menu-backdrop-in .35s ease both; }
  body.menu-open .hero::after { content: ""; position: fixed; z-index: 999; inset: 0; background: rgba(7,10,12,.74); backdrop-filter: grayscale(1) blur(10px); -webkit-backdrop-filter: grayscale(1) blur(10px); animation: menu-backdrop-in .35s ease both; pointer-events: none; }
  .site-header { z-index: 1001; }
  .main-nav { position: fixed; z-index: 2; top: 58px; right: 0; left: auto; display: block; width: min(92vw, 355px); height: min(82vh, 620px); padding: 0; overflow: hidden; border: 0; border-radius: 310px 0 0 310px; background: transparent; box-shadow: none; opacity: 0; visibility: hidden; clip-path: circle(0 at 100% 48%); transform: translateX(55px); transform-origin: right center; backdrop-filter: none; transition: opacity .3s, visibility .3s, clip-path .7s cubic-bezier(.2,.8,.2,1), transform .55s cubic-bezier(.2,.8,.2,1); }
  .main-nav::after { content: ""; position: absolute; z-index: -1; top: -90px; right: -338px; width: 510px; height: 780px; border: 2px solid rgba(2,195,223,.72); border-radius: 50%; box-shadow: 0 0 12px rgba(2,195,223,.15); pointer-events: none; }
  .main-nav.open { opacity: 1; visibility: visible; clip-path: circle(145% at 100% 48%); transform: translateX(42px); }
  .main-nav a { position: absolute; display: flex; align-items: center; justify-content: flex-start; width: 205px; min-height: 38px; padding-right: 43px; color: #eee; font-size: 14px; font-weight: 600; opacity: 0; transform: translateX(28px) scale(.96); animation: none; transition: color .25s, font-weight .2s, opacity .38s, transform .38s; }
  .main-nav a::before { content: "+"; position: absolute; top: 50%; right: 0; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #02c3df; border-radius: 50%; background: rgba(10,14,17,.92); color: #02c3df; font: 400 14px/1 "Segoe UI Symbol", Arial, sans-serif; box-shadow: 0 0 0 3px rgba(2,195,223,.1), 0 0 13px rgba(2,195,223,.15); transform: translateY(-50%); transition: color .25s, background .25s, box-shadow .25s, transform .25s; }
  .main-nav a:nth-child(1)::before { content: "⌂"; }
  .main-nav a:nth-child(2)::before { content: "♙"; }
  .main-nav a:nth-child(3)::before { content: "⚙"; }
  .main-nav a:nth-child(4)::before { content: "▦"; }
  .main-nav a:nth-child(5)::before { content: "≡"; }
  .main-nav a:nth-child(6)::before { content: "✎"; }
  .main-nav a:nth-child(7)::before { content: "✉"; }
  .main-nav a:nth-child(1) { top: 3%; right: 12px; }
  .main-nav a:nth-child(2) { top: 16%; right: 58px; }
  .main-nav a:nth-child(3) { top: 30%; right: 83px; }
  .main-nav a:nth-child(4) { top: 44%; right: 93px; }
  .main-nav a:nth-child(5) { top: 58%; right: 83px; }
  .main-nav a:nth-child(6) { top: 72%; right: 57px; }
  .main-nav a:nth-child(7) { top: 85%; right: 10px; }
  .main-nav.open a { opacity: 1; transform: translateX(-72px); }
  .main-nav.open a:nth-child(1) { transition-delay: .08s; }
  .main-nav.open a:nth-child(2) { transition-delay: .12s; }
  .main-nav.open a:nth-child(3) { transition-delay: .16s; }
  .main-nav.open a:nth-child(4) { transition-delay: .20s; }
  .main-nav.open a:nth-child(5) { transition-delay: .24s; }
  .main-nav.open a:nth-child(6) { transition-delay: .28s; }
  .main-nav.open a:nth-child(7) { transition-delay: .32s; }
  .main-nav a:hover, .main-nav a:active, .main-nav a:focus-visible, .main-nav a.active { background: transparent; color: #02c3df; font-weight: 900; text-shadow: 0 0 14px rgba(2,195,223,.42); transform: translateX(-72px) scale(1.05); }
  .main-nav.open a:nth-child(1), .main-nav.open a:nth-child(7) { transform: translateX(-90px); }
  .main-nav.open a:nth-child(6) { transform: translateX(-82px); }
  .main-nav.open a:nth-child(1):hover, .main-nav.open a:nth-child(1):active, .main-nav.open a:nth-child(1):focus-visible, .main-nav.open a:nth-child(1).active,
  .main-nav.open a:nth-child(7):hover, .main-nav.open a:nth-child(7):active, .main-nav.open a:nth-child(7):focus-visible, .main-nav.open a:nth-child(7).active { transform: translateX(-90px) scale(1.05); }
  .main-nav.open a:nth-child(6):hover, .main-nav.open a:nth-child(6):active, .main-nav.open a:nth-child(6):focus-visible, .main-nav.open a:nth-child(6).active { transform: translateX(-82px) scale(1.05); }
  .main-nav a:hover::before, .main-nav a:active::before, .main-nav a:focus-visible::before, .main-nav a.active::before { background: #02c3df; color: #101417; box-shadow: 0 0 0 4px rgba(2,195,223,.15), 0 0 20px rgba(2,195,223,.5); transform: translateY(-50%) rotate(45deg) scale(1.08); }
  .main-nav .active::after { display: none; }
  .intro { top: auto; right: auto; left: 50%; bottom: max(28px, 5svh); width: calc(100vw - 60px); max-width: 700px; text-align: right; transform: translateX(-50%); }
  .eyebrow { font-size: 18px; }
  h1 { font-size: 54px; }
  #intro-title { font-size: 22px; line-height: 1.45; letter-spacing: -.3px; }
  .hero-contact-icons { justify-content: center; margin-top: 12px; }
  .hero-datetime { margin: 18px auto 0; padding-right: 0; font-size: 14px; text-align: center; }
  .about-section { padding: 150px 25px 80px; }
  .profile-section { height: auto; min-height: 100svh; justify-content: flex-start; padding: 110px 30px 65px; overflow: visible; }
  .profile-copy { margin-top: 25px; font-size: 18px; line-height: 1.9; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; margin-top: 30px; }
  .skill-ring { width: 96px; }
  .skill h3 { font-size: 17px; }
  .portfolio-section { padding: 105px 18px 45px; overflow-y: auto; }
  .portfolio-heading { display: block; margin-bottom: 28px; }
  .portfolio-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 15px; height: auto; max-height: none; }
  .portfolio-item, .item-one, .item-two, .item-three, .item-four, .item-five { grid-column: 1; grid-row: auto; height: 240px; }
  .portfolio-item > span { opacity: 1; transform: none; }
  .resume-section { padding: 105px 20px 50px; overflow-y: auto; }
  .resume-columns { grid-template-columns: 1fr; gap: 45px; margin-top: 30px; }
  .timeline-column > h3 { margin-bottom: 18px; }
  .timeline-body { min-height: 0; padding-bottom: 28px; }
  .blog-section { padding: 105px 20px 55px; overflow-y: auto; }
  .blog-slider { margin-top: 25px; }
  .blog-page { grid-template-columns: 1fr; gap: 24px; }
  .blog-card:nth-child(n+2) { display: none; }
  .blog-card img { height: 230px; }
  .blog-dots { margin-top: 28px; }
  .contact-section { padding: 110px 22px 55px; overflow-y: auto; }
  .contact-fields { grid-template-columns: 1fr; gap: 12px; }
  .contact-form textarea { margin-top: 12px; }
  .contact-details { grid-template-columns: 1fr; gap: 18px; margin-top: 25px; }
  .portfolio-modal { display: block; padding: 75px 18px 35px; }
  .portfolio-modal-inner { grid-template-columns: 1fr; gap: 28px; }
  .portfolio-modal-media { min-height: 0; height: 360px; }
  .section-heading > p { display: block; }
  .about-section { justify-content: flex-start; }
  .service-grid { grid-template-columns: 1fr; margin-top: 38px; }
  .service-card { min-height: 0; padding: 18px 12px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .service-title { gap: 22px; }
  .service-card:last-child { border-left: 0; border-bottom: 0; }
}

@keyframes menu-backdrop-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .caret, .main-nav a, .eyebrow, h1, .hero-contact-icons, .hero-datetime { animation: none; opacity: 1; }
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}

    
/* Expertise slide */
.expertise-section { display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 50% 15%, rgba(212, 165, 75, .10), transparent 34%), #15191c; }
.expertise-kicker { margin: 0 0 4px; color: #02c3df; font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.expertise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 100%; max-width: 1120px; margin: 32px auto 0; }
.expertise-card { position: relative; min-height: 190px; padding: 25px 24px 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.035); transition: transform .3s ease, border-color .3s ease, background .3s ease; }
.expertise-card:hover { transform: translateY(-6px); border-color: rgba(203,163,85,.65); background: rgba(255,255,255,.06); }
.expertise-number { position: absolute; top: 12px; left: 17px; color: rgba(203,163,85,.22); font-family: Arial, sans-serif; font-size: 34px; font-weight: 800; }
.expertise-card h3 { margin: 0 0 12px; color: #f7f7f7; font-size: 20px; }
.expertise-card p { margin: 0; color: #aeb2b5; font-size: 13px; line-height: 2; }
.expertise-level { position: absolute; right: 24px; bottom: 18px; left: 24px; height: 2px; overflow: hidden; background: rgba(255,255,255,.1); }
.expertise-level i { display: block; width: var(--level); height: 100%; background: linear-gradient(90deg, #8f6b2c, #e4bd6d); transform-origin: right; }
@media (max-width: 900px) {
  .expertise-section { justify-content: flex-start; }
  .expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .expertise-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 26px; }
  .expertise-card { min-height: 175px; }
}
    
/* Separate expertise slide â€” structured like the supplied reference */
.expertise-section { position: relative; width: 100%; min-height: 100vh; padding: 78px 7% 45px; overflow: hidden; background: #15191c; color: #f4f4f4; scroll-snap-align: start; scroll-snap-stop: always; }
.expertise-section .resume-heading { text-align: center; }
.expertise-skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; row-gap: 31px; width: 100%; max-width: 1140px; margin: 32px auto 0; direction: rtl; }
.expertise-skill { direction: ltr; text-align: right; }
.expertise-skill strong { display: block; margin: 0 0 8px; color: #f0f0f0; font: 700 15px/1.3 Arial, sans-serif; }
.expertise-skill > span { display: block; height: 18px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.12); }
.expertise-skill > span i { position: relative; display: block; width: var(--level); height: 100%; margin-left: auto; overflow: visible; border-radius: 0 5px 5px 0; background: linear-gradient(90deg, #008da5, #02c3df, #8cf4ff, #02c3df, #008da5); background-size: 220% 100%; box-shadow: 0 0 15px rgba(2,195,223,.22); transform: scaleX(0); transform-origin: right center; transition: transform 1.55s .18s cubic-bezier(.22,.8,.25,1); }
.expertise-skill > span i::after { content: ""; position: absolute; top: 50%; left: -3px; width: 8px; height: 26px; border-radius: 50%; background: #b7f8ff; box-shadow: 0 0 8px #02c3df, 0 0 18px rgba(2,195,223,.85); opacity: 0; transform: translateY(-50%) scale(.5); transition: opacity .2s 1.3s, transform .25s 1.3s; }
.expertise-skill.visible > span i { transform: scaleX(1); animation: expertise-color-flow 2.2s 1.55s linear infinite; }
.expertise-skill.visible > span i::after { opacity: 1; transform: translateY(-50%) scale(1); animation: expertise-edge-pulse 1.1s 1.55s ease-in-out 2 alternate; }
@keyframes expertise-edge-pulse { from { opacity: .55; box-shadow: 0 0 5px #02c3df, 0 0 11px rgba(2,195,223,.55); } to { opacity: 1; box-shadow: 0 0 11px #b7f8ff, 0 0 24px rgba(2,195,223,.95); } }
@keyframes expertise-color-flow { from { background-position: 100% 0; } to { background-position: -120% 0; } }
.expertise-skill:nth-child(3n+2) { transition-delay: .08s; }
.expertise-skill:nth-child(3n) { transition-delay: .16s; }
@media (max-width: 900px) {
  .expertise-section { padding: 105px 28px 55px; overflow-y: auto; }
  .expertise-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 25px; }
}
@media (max-width: 560px) {
  .expertise-skills { grid-template-columns: 1fr; row-gap: 20px; }
}

/* Compact and evenly spaced mobile navigation */
/* Certificates and awards slide */
.certificates-section { position: relative; width: 100%; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 78px 10% 45px; overflow: hidden; background: radial-gradient(circle at 50% 20%, rgba(2,195,223,.08), transparent 34%), #15191c; color: #f4f4f4; scroll-snap-align: start; scroll-snap-stop: always; }
.certificates-heading { text-align: center; }
.certificates-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 1050px; margin: 32px auto 0; }
.certificate-card { position: relative; display: grid; grid-template-columns: 94px 1fr auto; align-items: center; gap: 16px; min-height: 126px; padding: 14px 18px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.035); transition: transform .3s ease, border-color .3s ease, background .3s ease; }
.certificate-card:hover { transform: translateY(-4px); border-color: rgba(2,195,223,.55); background: rgba(255,255,255,.055); }
.certificate-thumb { position: relative; width: 94px; aspect-ratio: 3 / 2; padding: 0; overflow: hidden; border: 1px solid rgba(2,195,223,.5); border-radius: 3px; background: #21272b; cursor: zoom-in; }
.certificate-thumb::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(2,195,223,.72); color: #101417; font: 300 31px/1 Arial, sans-serif; opacity: 0; transition: opacity .25s; }
.certificate-thumb:hover::after, .certificate-thumb:focus-visible::after { opacity: 1; }
.certificate-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.certificate-thumb:hover img { transform: scale(1.06); }
.certificate-card small { color: #02c3df; font-size: 10px; font-weight: 700; }
.certificate-card h3 { margin: 3px 0 5px; font-size: 14px; }
.certificate-card p { margin: 0; color: #aeb2b5; font-size: 11px; line-height: 1.8; }
.certificate-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 24px auto 20px; direction: rtl; }
.certificate-filters button { min-width: 90px; padding: 8px 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.035); color: #c8cccf; font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: color .25s, border-color .25s, background .25s, transform .25s; }
.certificate-filters button:hover, .certificate-filters button.active { border-color: #02c3df; background: rgba(2,195,223,.12); color: #fff; transform: translateY(-2px); }
.certificate-card[hidden] { display: none; }
.certificate-card time { align-self: start; color: rgba(255,255,255,.35); font: 600 12px/1.4 "Vazirmatn", sans-serif; }
.certificate-modal { position: fixed; z-index: 3000; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(5,8,10,.9); backdrop-filter: blur(12px); }
.certificate-modal[hidden] { display: none; }
.certificate-modal-figure { width: min(92vw, 1050px); max-height: 88vh; margin: 0; text-align: center; }
    .certificate-modal-figure img {
        display: block;
        max-height: 90vh;
        max-width: 100%;
        margin: auto;
        object-fit: contain;
        border: 1px solid rgba(255,255,255,.16);
        background: #171a1e;
        box-shadow: 0 28px 80px rgba(0,0,0,.55);
    }
.certificate-modal-figure figcaption { margin-top: 12px; color: #e9e9e9; font-size: 14px; }
.certificate-modal-close { position: fixed; top: 20px; left: 22px; z-index: 1; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(12,16,18,.75); color: white; font-size: 25px; cursor: pointer; transition: color .25s, border-color .25s, transform .25s; }
.certificate-modal-close:hover { color: #02c3df; border-color: #02c3df; transform: rotate(90deg); }

@media (max-width: 760px) {
  .certificates-section { justify-content: flex-start; padding: 105px 20px 55px; overflow-y: auto; }
  .certificates-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 26px; }
  .certificate-card { grid-template-columns: 78px 1fr auto; min-height: 112px; padding: 12px; gap: 12px; }
  .certificate-thumb { width: 78px; }
  .main-nav {
    top: 50%;
    right: 0;
    width: min(90vw, 335px);
    height: min(78svh, 560px);
    transform: translate(70px, -50%);
    transform-origin: right center;
  }
  .main-nav::after {
    top: 0;
    right: -215px;
    width: 430px;
    height: 100%;
    border-radius: 50%;
  }
  .main-nav.open { transform: translate(18px, -50%); }
  .main-nav a {
    width: 190px;
    min-height: 34px;
    padding-right: 37px;
    font-size: 13px;
  }
  .main-nav a::before {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .main-nav a:nth-child(1)::before { content: "⌂"; }
  .main-nav a:nth-child(2)::before { content: "♙"; }
  .main-nav a:nth-child(3)::before { content: "⚙"; }
  .main-nav a:nth-child(4)::before { content: "◆"; }
  .main-nav a:nth-child(5)::before { content: "◇"; }
  .main-nav a:nth-child(6)::before { content: "≡"; }
  .main-nav a:nth-child(7)::before { content: "▦"; }
  .main-nav a:nth-child(8)::before { content: "✎"; }
  .main-nav a:nth-child(9)::before { content: "✉"; }
  .main-nav a:nth-child(1) { top: 3%; right: 16px; }
  .main-nav a:nth-child(2) { top: 13%; right: 75px; }
  .main-nav a:nth-child(3) { top: 23.5%; right: 108px; }
  .main-nav a:nth-child(4) { top: 34%; right: 127px; }
  .main-nav a:nth-child(5) { top: 44.5%; right: 135px; }
  .main-nav a:nth-child(6) { top: 55%; right: 133px; }
  .main-nav a:nth-child(7) { top: 65.5%; right: 121px; }
  .main-nav a:nth-child(8) { top: 76%; right: 98px; }
  .main-nav a:nth-child(9) { top: 86.5%; right: 57px; }
  .main-nav.open a,
  .main-nav.open a:nth-child(1),
  .main-nav.open a:nth-child(6),
  .main-nav.open a:nth-child(7) { transform: translateX(-68px) !important; }
  .main-nav.open a:hover,
  .main-nav.open a:active,
  .main-nav.open a:focus-visible,
  .main-nav.open a.active { transform: translateX(-68px) scale(1.04) !important; }
}

/* Unified slide titles — same presentation as “My Expertise” */
/* Keep the hero copy centered vertically in the empty side of the portrait */
@media (min-width: 761px) {
  .intro {
    top: 50%;
    right: auto;
    left: 30%;
    width: min(700px, calc(100vw - 60px));
    transform: translate(-50%, -50%);
  }
}

/* Categorized and orderly portfolio grid */
.portfolio-section { height: auto; min-height: 100svh; padding-right: 30px; padding-left: 30px; overflow: visible; }
.portfolio-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: -10px auto 24px; direction: rtl; }
.portfolio-filters button { min-width: 86px; padding: 8px 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.035); color: #c8cccf; font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: color .25s, border-color .25s, background .25s, transform .25s; }
.portfolio-filters button:hover, .portfolio-filters button.active { border-color: #02c3df; background: rgba(2,195,223,.12); color: #fff; transform: translateY(-2px); }
.portfolio-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 210px)); justify-content: center; align-items: stretch; gap: 18px; width: 100%; max-width: 1120px; height: auto; max-height: none; margin-inline: auto; }
.portfolio-grid .portfolio-item, .portfolio-grid .portfolio-item:nth-child(n) { display: block; width: 100%; height: 250px; margin: 0; border-radius: 22px; }
.portfolio-grid .portfolio-item { grid-column: auto !important; grid-row: auto !important; }
.portfolio-grid .portfolio-item:nth-child(n) { height: 205px; }
.portfolio-grid .portfolio-item:nth-child(5n+1),
.portfolio-grid .portfolio-item:nth-child(5n+4) { height: 235px; }
.portfolio-grid .portfolio-item:nth-child(5n+2),
.portfolio-grid .portfolio-item:nth-child(5n+5) { height: 185px; }
.portfolio-grid .portfolio-item:nth-child(5n+3) { height: 215px; }
/* Keep all three portfolio rows uniform. */
.portfolio-grid .portfolio-item:nth-child(n) { height: 205px; }
.portfolio-grid .portfolio-item[hidden] { display: none; }
.portfolio-grid .portfolio-item > span { right: 16px; bottom: 13px; }
.portfolio-grid .portfolio-item strong { font-size: 15px; }
@media (max-width: 1050px) {
  .portfolio-grid { grid-template-columns: repeat(3, minmax(180px, 220px)); max-width: 720px; }
}
@media (max-width: 760px) {
  .portfolio-section { padding-right: 30px; padding-left: 30px; }
  .portfolio-filters { gap: 7px; margin-bottom: 20px; }
  .portfolio-filters button { min-width: 0; padding: 7px 12px; font-size: 12px; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
  .portfolio-grid .portfolio-item,
  .portfolio-grid .portfolio-item:nth-child(n) { height: 210px; margin-bottom: 0; }
  .portfolio-grid .portfolio-item:nth-child(3n+1) { height: 260px; }
}
@media (max-width: 480px) {
  .portfolio-grid { columns: 1; }
  .portfolio-grid .portfolio-item,
  .portfolio-grid .portfolio-item:nth-child(n) { height: 225px; }
}

:is(.profile-heading, .section-heading, .resume-heading, .certificates-heading, .portfolio-heading, .blog-heading, .contact-heading) {
  text-align: center;
}
:is(.profile-heading, .section-heading, .resume-heading, .certificates-heading, .portfolio-heading, .blog-heading, .contact-heading) > .slide-kicker {
  display: block;
  margin: 0 0 7px;
  color: #02c3df;
  font-family: "Vazirmatn", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
:is(.profile-heading, .section-heading, .resume-heading, .certificates-heading, .portfolio-heading, .blog-heading, .contact-heading) h2 {
  margin: 0;
  color: #f4f4f4;
  font-family: "Lalezar", "Vazirmatn", sans-serif;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.25;
}
:is(.profile-heading, .section-heading, .resume-heading, .certificates-heading, .portfolio-heading, .blog-heading, .contact-heading) .heading-lines {
  direction: ltr;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
:is(.profile-heading, .section-heading, .resume-heading, .certificates-heading, .portfolio-heading, .blog-heading, .contact-heading) .heading-lines i {
  width: 30px;
  height: 1px;
  background: #575c60;
}
:is(.profile-heading, .section-heading, .resume-heading, .certificates-heading, .portfolio-heading, .blog-heading, .contact-heading) .heading-lines i:nth-child(2) {
  background: #02c3df;
}

/* Shared responsive spacing for every slide except the hero */
:is(.profile-section, .about-section, .expertise-section, .certificates-section, .resume-section, .portfolio-section, .blog-section, .contact-section) {
  padding: 100px 30px 65px;
}

@media (max-width: 760px) {
  :is(.profile-section, .about-section, .expertise-section, .certificates-section, .resume-section, .portfolio-section, .blog-section, .contact-section) {
    height: auto;
    min-height: 100svh;
    padding: 110px 30px 65px;
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .expertise-skill > span i { transform: scaleX(1); animation: none; transition: none; }
  .expertise-skill > span i::after { opacity: 1; transform: translateY(-50%) scale(1); animation: none; transition: none; }
  .portfolio-item::before { animation: none; }
  .portfolio-item:hover::after, .portfolio-item:focus-visible::after { animation: none; }
}
