From 7141a003f7f12db8bae72ebc9917623b67a7cc27 Mon Sep 17 00:00:00 2001 From: Alireza Moslemihaghighi <105180378+AAstroA@users.noreply.github.com> Date: Mon, 17 Aug 2026 18:17:26 +0330 Subject: [PATCH 1/2] Keep Persian portrait on the right at the correct scale --- _sass/_persian-polish.scss | 371 +------------------------------------ assets/css/main.scss | 3 +- 2 files changed, 8 insertions(+), 366 deletions(-) diff --git a/_sass/_persian-polish.scss b/_sass/_persian-polish.scss index aa16716..d1756e2 100644 --- a/_sass/_persian-polish.scss +++ b/_sass/_persian-polish.scss @@ -1,370 +1,11 @@ -/* Persian refinements: typography, header controls, homepage art, publication spacing */ +/* Final Persian layout polish. Loaded after the main Persian visual system. */ -.persian-theme { - padding-top: 92px; - font-family: "B Nazanin", "B Nazanin Regular", "Nazanin", "Geeza Pro", Tahoma, Arial, sans-serif; - font-weight: 400; - line-height: 2; +.page-fa .fa-hero__identity { + grid-template-columns: clamp(128px, 12vw, 190px) minmax(0, 1fr); } -.persian-theme h1, -.persian-theme h2, -.persian-theme h3, -.persian-theme h4, -.persian-theme h5, -.persian-theme h6, -.persian-theme button, -.persian-theme input, -.persian-theme textarea, -.persian-theme select, -.persian-theme .site-brand__copy, -.persian-theme .cosmos-button, -.persian-theme .greedy-nav a { - font-family: "B Nazanin", "B Nazanin Regular", "Nazanin", "Geeza Pro", Tahoma, Arial, sans-serif; -} - -.persian-theme h1, -.persian-theme h2, -.persian-theme h3, -.persian-theme h4, -.persian-theme h5, -.persian-theme h6 { - font-weight: 700; - letter-spacing: 0; -} - -.persian-theme .cosmos-hero h1, -.persian-theme .cosmos-page__header h1, -.persian-theme .research-detail h2, -.persian-theme .publication-card h2 { - line-height: 1.34; - letter-spacing: 0; -} - -/* Give the Persian header more breathing room and keep all controls at top-left. */ -.persian-theme .masthead { - height: 92px; -} - -.persian-theme::after { - top: 92px; -} - -.persian-theme .masthead__inner-wrap, -.persian-theme .masthead__menu, -.persian-theme .greedy-nav, -.persian-theme .greedy-nav .visible-links { - height: 100%; -} - -.persian-theme .masthead__inner-wrap { - padding-top: 0; - padding-bottom: 0; -} - -.persian-theme .site-brand { - min-height: 92px; - align-items: center; -} - -.persian-theme .site-brand__copy { - align-items: flex-start; - line-height: 1.35; -} - -.persian-theme .site-brand__copy strong { - font-size: 1rem; - font-weight: 700; -} - -.persian-theme .site-brand__copy small { - margin-top: 0.08rem; - font-size: 0.68rem; - line-height: 1.5; -} - -.persian-theme .greedy-nav button { - top: 25px; - right: auto; - left: 0.35rem; - width: 44px; - height: 42px; -} - -.persian-theme .language-switcher { - top: 46px; - right: auto; - left: 4.15rem; - min-width: 96px; - height: 42px; - padding: 0 0.9rem; - border-radius: 10px; - transform: translateY(-50%); -} - -.persian-theme .language-switcher:hover, -.persian-theme .language-switcher:focus { - transform: translateY(calc(-50% - 1px)); -} - -.persian-theme .language-switcher strong { - font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; - font-size: 0.74rem; -} - -.persian-theme .language-switcher span { - font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; - font-size: 0.62rem; -} - -.persian-theme .greedy-nav .hidden-links { - right: auto; - left: 0; - min-width: 180px; - margin-top: 10px; - text-align: right; - border-radius: 10px; -} - -.persian-theme .greedy-nav .hidden-links::before, -.persian-theme .greedy-nav .hidden-links::after { - right: auto; - left: 12px; -} - -.persian-theme .greedy-nav .hidden-links a { - padding: 0.8rem 1rem; - font-size: 0.9rem; -} - -/* Prevent the fixed masthead from eating the top of Persian pages. */ -.persian-theme .cosmos-home { - padding-top: 4.3rem; -} - -.persian-theme .cosmos-page-shell { - padding-top: 4.6rem; -} - -.persian-theme .cosmos-page__header { - margin-top: 0; -} - -/* Homepage: replace the diagram with an image-generated Achaemenid visual. */ -.persian-theme .achaemenid-visual { - display: flex; - align-items: center; - justify-content: center; - min-width: 0; -} - -.persian-theme .achaemenid-hero-card { - position: relative; - width: min(100%, 540px); - margin: 0; - overflow: hidden; - background: linear-gradient(145deg, rgba(18, 35, 39, 0.95), rgba(22, 23, 19, 0.98)); - border: 1px solid rgba(211, 170, 88, 0.45); - border-radius: 20px; - box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(97, 170, 166, 0.08) inset; -} - -.persian-theme .achaemenid-hero-card::before { - content: ""; - position: absolute; - inset: 10px; - z-index: 2; - pointer-events: none; - border: 1px solid rgba(211, 170, 88, 0.25); - border-radius: 14px; -} - -.persian-theme .achaemenid-hero-card__image { - position: relative; - overflow: hidden; - background: #112126; -} - -.persian-theme .achaemenid-hero-card__image img { - display: block; - width: 100%; - aspect-ratio: 1 / 1; - object-fit: cover; - object-position: center; - filter: saturate(0.9) contrast(1.03) brightness(0.92); -} - -.persian-theme .achaemenid-hero-card__topics { - position: relative; - z-index: 3; - display: flex; - flex-wrap: wrap; - gap: 0.55rem; - margin: 0; - padding: 1rem 1.1rem 1.15rem; - background: linear-gradient(180deg, rgba(15, 28, 31, 0.92), rgba(15, 20, 18, 0.98)); - border-top: 1px solid rgba(211, 170, 88, 0.28); -} - -.persian-theme .achaemenid-hero-card__topics span { - display: inline-flex; - align-items: center; - min-height: 34px; - padding: 0.28rem 0.72rem; - color: #ead9b7; - font-size: 0.78rem; - line-height: 1.4; - background: rgba(97, 170, 166, 0.08); - border: 1px solid rgba(211, 170, 88, 0.28); - border-radius: 999px; -} - -.persian-theme .persian-hero { - gap: clamp(2.2rem, 5vw, 5rem); -} - -.persian-theme .persian-identity__name h1 { - font-weight: 700; -} - -.persian-theme .cosmos-hero__lede, -.persian-theme .cosmos-page__description, -.persian-theme .research-detail p, -.persian-theme .publication-card p, -.persian-theme .cv-timeline p, -.persian-theme .skills-grid p, -.persian-theme .playground-panel p { - font-size: 1rem; - line-height: 2; -} - -/* Publications: isolate year/meta from the title and keep the language control out of content. */ -.persian-theme .publication-card { - grid-template-columns: minmax(0, 1fr) 112px; - gap: clamp(1.5rem, 4vw, 3rem); - direction: ltr; - align-items: start; -} - -.persian-theme .publication-card__year { - grid-column: 2; - grid-row: 1; - direction: rtl; - align-self: start; - padding-top: 0.35rem; - font-size: clamp(2.4rem, 4.2vw, 4rem); - line-height: 1; - white-space: nowrap; -} - -.persian-theme .publication-card__body { - grid-column: 1; - grid-row: 1; - min-width: 0; - direction: rtl; - text-align: right; -} - -.persian-theme .publication-card .section-kicker { - display: flex; - flex-wrap: wrap; - align-items: baseline; - margin-bottom: 0.9rem; - line-height: 1.6; -} - -.persian-theme .publication-card h2 { - max-width: 760px; - margin: 0 0 1rem; - font-size: clamp(2rem, 3.7vw, 3.25rem); -} - -.persian-theme .publication-card__authors { - margin-top: 0.4rem; - line-height: 1.65; -} - -@media (max-width: 860px) { - .persian-theme { - padding-top: 84px; - } - - .persian-theme .masthead { - height: 84px; - } - - .persian-theme::after { - top: 84px; - } - - .persian-theme .site-brand { - min-height: 84px; - } - - .persian-theme .greedy-nav button { - top: 21px; - } - - .persian-theme .language-switcher { - top: 42px; - left: 3.8rem; - min-width: 82px; - } - - .persian-theme .persian-hero { - grid-template-columns: 1fr; - } - - .persian-theme .achaemenid-visual { - order: 2; - } - - .persian-theme .persian-hero__copy { - order: 1; - } -} - -@media (max-width: 620px) { - .persian-theme .masthead__inner-wrap { - padding-left: 0.7rem; - padding-right: 0.7rem; - } - - .persian-theme .site-brand__copy strong { - max-width: 150px; - font-size: 0.88rem; - } - - .persian-theme .site-brand__copy small { - display: none; - } - - .persian-theme .language-switcher { - left: 3.55rem; - min-width: 72px; - padding: 0 0.65rem; - } - - .persian-theme .language-switcher span { - display: none; - } - - .persian-theme .publication-card { - grid-template-columns: 1fr; - direction: rtl; - } - - .persian-theme .publication-card__year, - .persian-theme .publication-card__body { - grid-column: 1; - grid-row: auto; - } - - .persian-theme .publication-card__year { - margin-bottom: 0.5rem; - } - - .persian-theme .achaemenid-hero-card { - border-radius: 16px; +@media (max-width: 720px) { + .page-fa .fa-hero__identity { + grid-template-columns: 112px minmax(0, 1fr); } } diff --git a/assets/css/main.scss b/assets/css/main.scss index 655d6d1..f6c91c6 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -47,4 +47,5 @@ @import "cosmos-theme"; @import "cosmos-refinements"; @import "persian-theme"; -@import "persian-overhaul"; \ No newline at end of file +@import "persian-overhaul"; +@import "persian-polish"; \ No newline at end of file From ba8a3f9690d271f20f23951b03ba588d0641551c Mon Sep 17 00:00:00 2001 From: Alireza Moslemihaghighi <105180378+AAstroA@users.noreply.github.com> Date: Mon, 17 Aug 2026 18:19:10 +0330 Subject: [PATCH 2/2] Scope portrait grid fix to the Persian homepage --- _pages/fa-home.md | 12 ++ _sass/_persian-polish.scss | 371 ++++++++++++++++++++++++++++++++++++- assets/css/main.scss | 3 +- 3 files changed, 378 insertions(+), 8 deletions(-) diff --git a/_pages/fa-home.md b/_pages/fa-home.md index fadebad..7358186 100644 --- a/_pages/fa-home.md +++ b/_pages/fa-home.md @@ -8,6 +8,18 @@ author_profile: false excerpt: "دانشجوی دکتری مالی در دانشگاه بوکونی با تمرکز بر قیمت‌گذاری دارایی، مالی کلان، شبکه‌های مالی و هوش مصنوعی." --- + +
diff --git a/_sass/_persian-polish.scss b/_sass/_persian-polish.scss index d1756e2..aa16716 100644 --- a/_sass/_persian-polish.scss +++ b/_sass/_persian-polish.scss @@ -1,11 +1,370 @@ -/* Final Persian layout polish. Loaded after the main Persian visual system. */ +/* Persian refinements: typography, header controls, homepage art, publication spacing */ -.page-fa .fa-hero__identity { - grid-template-columns: clamp(128px, 12vw, 190px) minmax(0, 1fr); +.persian-theme { + padding-top: 92px; + font-family: "B Nazanin", "B Nazanin Regular", "Nazanin", "Geeza Pro", Tahoma, Arial, sans-serif; + font-weight: 400; + line-height: 2; } -@media (max-width: 720px) { - .page-fa .fa-hero__identity { - grid-template-columns: 112px minmax(0, 1fr); +.persian-theme h1, +.persian-theme h2, +.persian-theme h3, +.persian-theme h4, +.persian-theme h5, +.persian-theme h6, +.persian-theme button, +.persian-theme input, +.persian-theme textarea, +.persian-theme select, +.persian-theme .site-brand__copy, +.persian-theme .cosmos-button, +.persian-theme .greedy-nav a { + font-family: "B Nazanin", "B Nazanin Regular", "Nazanin", "Geeza Pro", Tahoma, Arial, sans-serif; +} + +.persian-theme h1, +.persian-theme h2, +.persian-theme h3, +.persian-theme h4, +.persian-theme h5, +.persian-theme h6 { + font-weight: 700; + letter-spacing: 0; +} + +.persian-theme .cosmos-hero h1, +.persian-theme .cosmos-page__header h1, +.persian-theme .research-detail h2, +.persian-theme .publication-card h2 { + line-height: 1.34; + letter-spacing: 0; +} + +/* Give the Persian header more breathing room and keep all controls at top-left. */ +.persian-theme .masthead { + height: 92px; +} + +.persian-theme::after { + top: 92px; +} + +.persian-theme .masthead__inner-wrap, +.persian-theme .masthead__menu, +.persian-theme .greedy-nav, +.persian-theme .greedy-nav .visible-links { + height: 100%; +} + +.persian-theme .masthead__inner-wrap { + padding-top: 0; + padding-bottom: 0; +} + +.persian-theme .site-brand { + min-height: 92px; + align-items: center; +} + +.persian-theme .site-brand__copy { + align-items: flex-start; + line-height: 1.35; +} + +.persian-theme .site-brand__copy strong { + font-size: 1rem; + font-weight: 700; +} + +.persian-theme .site-brand__copy small { + margin-top: 0.08rem; + font-size: 0.68rem; + line-height: 1.5; +} + +.persian-theme .greedy-nav button { + top: 25px; + right: auto; + left: 0.35rem; + width: 44px; + height: 42px; +} + +.persian-theme .language-switcher { + top: 46px; + right: auto; + left: 4.15rem; + min-width: 96px; + height: 42px; + padding: 0 0.9rem; + border-radius: 10px; + transform: translateY(-50%); +} + +.persian-theme .language-switcher:hover, +.persian-theme .language-switcher:focus { + transform: translateY(calc(-50% - 1px)); +} + +.persian-theme .language-switcher strong { + font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + font-size: 0.74rem; +} + +.persian-theme .language-switcher span { + font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + font-size: 0.62rem; +} + +.persian-theme .greedy-nav .hidden-links { + right: auto; + left: 0; + min-width: 180px; + margin-top: 10px; + text-align: right; + border-radius: 10px; +} + +.persian-theme .greedy-nav .hidden-links::before, +.persian-theme .greedy-nav .hidden-links::after { + right: auto; + left: 12px; +} + +.persian-theme .greedy-nav .hidden-links a { + padding: 0.8rem 1rem; + font-size: 0.9rem; +} + +/* Prevent the fixed masthead from eating the top of Persian pages. */ +.persian-theme .cosmos-home { + padding-top: 4.3rem; +} + +.persian-theme .cosmos-page-shell { + padding-top: 4.6rem; +} + +.persian-theme .cosmos-page__header { + margin-top: 0; +} + +/* Homepage: replace the diagram with an image-generated Achaemenid visual. */ +.persian-theme .achaemenid-visual { + display: flex; + align-items: center; + justify-content: center; + min-width: 0; +} + +.persian-theme .achaemenid-hero-card { + position: relative; + width: min(100%, 540px); + margin: 0; + overflow: hidden; + background: linear-gradient(145deg, rgba(18, 35, 39, 0.95), rgba(22, 23, 19, 0.98)); + border: 1px solid rgba(211, 170, 88, 0.45); + border-radius: 20px; + box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(97, 170, 166, 0.08) inset; +} + +.persian-theme .achaemenid-hero-card::before { + content: ""; + position: absolute; + inset: 10px; + z-index: 2; + pointer-events: none; + border: 1px solid rgba(211, 170, 88, 0.25); + border-radius: 14px; +} + +.persian-theme .achaemenid-hero-card__image { + position: relative; + overflow: hidden; + background: #112126; +} + +.persian-theme .achaemenid-hero-card__image img { + display: block; + width: 100%; + aspect-ratio: 1 / 1; + object-fit: cover; + object-position: center; + filter: saturate(0.9) contrast(1.03) brightness(0.92); +} + +.persian-theme .achaemenid-hero-card__topics { + position: relative; + z-index: 3; + display: flex; + flex-wrap: wrap; + gap: 0.55rem; + margin: 0; + padding: 1rem 1.1rem 1.15rem; + background: linear-gradient(180deg, rgba(15, 28, 31, 0.92), rgba(15, 20, 18, 0.98)); + border-top: 1px solid rgba(211, 170, 88, 0.28); +} + +.persian-theme .achaemenid-hero-card__topics span { + display: inline-flex; + align-items: center; + min-height: 34px; + padding: 0.28rem 0.72rem; + color: #ead9b7; + font-size: 0.78rem; + line-height: 1.4; + background: rgba(97, 170, 166, 0.08); + border: 1px solid rgba(211, 170, 88, 0.28); + border-radius: 999px; +} + +.persian-theme .persian-hero { + gap: clamp(2.2rem, 5vw, 5rem); +} + +.persian-theme .persian-identity__name h1 { + font-weight: 700; +} + +.persian-theme .cosmos-hero__lede, +.persian-theme .cosmos-page__description, +.persian-theme .research-detail p, +.persian-theme .publication-card p, +.persian-theme .cv-timeline p, +.persian-theme .skills-grid p, +.persian-theme .playground-panel p { + font-size: 1rem; + line-height: 2; +} + +/* Publications: isolate year/meta from the title and keep the language control out of content. */ +.persian-theme .publication-card { + grid-template-columns: minmax(0, 1fr) 112px; + gap: clamp(1.5rem, 4vw, 3rem); + direction: ltr; + align-items: start; +} + +.persian-theme .publication-card__year { + grid-column: 2; + grid-row: 1; + direction: rtl; + align-self: start; + padding-top: 0.35rem; + font-size: clamp(2.4rem, 4.2vw, 4rem); + line-height: 1; + white-space: nowrap; +} + +.persian-theme .publication-card__body { + grid-column: 1; + grid-row: 1; + min-width: 0; + direction: rtl; + text-align: right; +} + +.persian-theme .publication-card .section-kicker { + display: flex; + flex-wrap: wrap; + align-items: baseline; + margin-bottom: 0.9rem; + line-height: 1.6; +} + +.persian-theme .publication-card h2 { + max-width: 760px; + margin: 0 0 1rem; + font-size: clamp(2rem, 3.7vw, 3.25rem); +} + +.persian-theme .publication-card__authors { + margin-top: 0.4rem; + line-height: 1.65; +} + +@media (max-width: 860px) { + .persian-theme { + padding-top: 84px; + } + + .persian-theme .masthead { + height: 84px; + } + + .persian-theme::after { + top: 84px; + } + + .persian-theme .site-brand { + min-height: 84px; + } + + .persian-theme .greedy-nav button { + top: 21px; + } + + .persian-theme .language-switcher { + top: 42px; + left: 3.8rem; + min-width: 82px; + } + + .persian-theme .persian-hero { + grid-template-columns: 1fr; + } + + .persian-theme .achaemenid-visual { + order: 2; + } + + .persian-theme .persian-hero__copy { + order: 1; + } +} + +@media (max-width: 620px) { + .persian-theme .masthead__inner-wrap { + padding-left: 0.7rem; + padding-right: 0.7rem; + } + + .persian-theme .site-brand__copy strong { + max-width: 150px; + font-size: 0.88rem; + } + + .persian-theme .site-brand__copy small { + display: none; + } + + .persian-theme .language-switcher { + left: 3.55rem; + min-width: 72px; + padding: 0 0.65rem; + } + + .persian-theme .language-switcher span { + display: none; + } + + .persian-theme .publication-card { + grid-template-columns: 1fr; + direction: rtl; + } + + .persian-theme .publication-card__year, + .persian-theme .publication-card__body { + grid-column: 1; + grid-row: auto; + } + + .persian-theme .publication-card__year { + margin-bottom: 0.5rem; + } + + .persian-theme .achaemenid-hero-card { + border-radius: 16px; } } diff --git a/assets/css/main.scss b/assets/css/main.scss index f6c91c6..655d6d1 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -47,5 +47,4 @@ @import "cosmos-theme"; @import "cosmos-refinements"; @import "persian-theme"; -@import "persian-overhaul"; -@import "persian-polish"; \ No newline at end of file +@import "persian-overhaul"; \ No newline at end of file