/* =====================================================
   Mohammed Al-Sulimi — Portfolio
   Type: Thmanyah (Serif Display · Serif Text · Sans)
   ===================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: 'Thmanyah Serif Display'; src: url('assets/fonts/thmanyahserifdisplay-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('assets/fonts/thmanyahserifdisplay-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('assets/fonts/thmanyahserifdisplay-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('assets/fonts/thmanyahserifdisplay-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('assets/fonts/thmanyahserifdisplay-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Text'; src: url('assets/fonts/thmanyahseriftext-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Text'; src: url('assets/fonts/thmanyahseriftext-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Text'; src: url('assets/fonts/thmanyahseriftext-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Text'; src: url('assets/fonts/thmanyahseriftext-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Text'; src: url('assets/fonts/thmanyahseriftext-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('assets/fonts/thmanyahsans-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('assets/fonts/thmanyahsans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('assets/fonts/thmanyahsans-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('assets/fonts/thmanyahsans-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('assets/fonts/thmanyahsans-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0e0d0b;
  --bg-2: #15130f;
  --line: rgba(233, 225, 210, 0.13);
  --line-soft: rgba(233, 225, 210, 0.07);
  --ink: #ece7db;
  --ink-2: rgba(236, 231, 219, 0.66);
  --ink-3: rgba(236, 231, 219, 0.4);
  --gold: #c9a35c;
  --gold-2: #e6cb8b;
  --on-fill: #171410;
  --glass: rgba(14, 13, 11, 0.72);
  --font-display: 'Thmanyah Serif Display', 'Thmanyah Serif Text', Georgia, serif;
  --font-text: 'Thmanyah Serif Text', 'Thmanyah Serif Display', Georgia, serif;
  --font-sans: 'Thmanyah Sans', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1.25rem, 4vw, 4rem);
}

/* ---------- Light theme ---------- */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1e9;
  --bg-2: #eae5d8;
  --line: rgba(45, 38, 27, 0.16);
  --line-soft: rgba(45, 38, 27, 0.08);
  --ink: #241e14;
  --ink-2: rgba(36, 30, 20, 0.7);
  --ink-3: rgba(36, 30, 20, 0.48);
  --gold: #a3792e;
  --gold-2: #7c5a1d;
  --on-fill: #f4f1e9;
  --glass: rgba(244, 241, 233, 0.82);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--gold); color: var(--on-fill); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
main { max-width: 76rem; margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Nav ---------- */
.nav { display: flex; justify-content: space-between; align-items: center; padding-block: 1.5rem; gap: 1rem; }
.nav-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.nav-name) {
  font-family: var(--font-sans); font-weight: 300; font-size: 0.92rem; color: var(--ink-2);
  transition: color 0.3s var(--ease);
}
.nav-links a:not(.nav-name):hover { color: var(--gold-2); }
.nav-sep { width: 1px; height: 1.1rem; background: var(--line); }
.lang-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: none; border: 1px solid var(--line); border-radius: 99px;
  color: var(--ink-2); font-family: var(--font-sans); font-size: 0.82rem;
  padding: 0.34rem 0.85rem; cursor: pointer; transition: all 0.3s var(--ease);
}
.lang-btn:hover { border-color: var(--gold); color: var(--gold-2); }
.lang-line { width: 1px; height: 0.85rem; background: var(--line); }
.lang-ar { font-family: var(--font-display); }
html[lang="en"] .lang-btn .lang-en { color: var(--gold-2); }
html[lang="ar"] .lang-btn .lang-ar { color: var(--gold-2); }
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: none; border: 1px solid var(--line); color: var(--ink-2);
  cursor: pointer; transition: all 0.3s var(--ease);
}
.theme-btn:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-1px); }
.theme-btn svg { width: 0.9rem; height: 0.9rem; }
.theme-btn .icon-moon { display: none; }
html[data-theme="light"] .theme-btn .icon-moon { display: block; }
html[data-theme="light"] .theme-btn .icon-sun { display: none; }
html.theme-switching, html.theme-switching body, html.theme-switching * {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, fill 0.4s ease !important;
}

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; }
.hero-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 4rem 3rem; }
.hero-kicker {
  font-family: var(--font-sans); font-weight: 300; font-size: 0.9rem;
  color: var(--gold); letter-spacing: 0.05em; margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: 1.32; margin-bottom: 1.8rem; text-wrap: balance;
}
.hero-title .line { display: block; }
html[lang="en"] .hero-title { line-height: 1.14; }
.hero-title em { font-style: normal; color: var(--gold-2); }
.hero-sub { max-width: 38rem; color: var(--ink-2); font-size: 1.05rem; margin-bottom: 2.4rem; text-wrap: pretty; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.btn {
  font-family: var(--font-sans); font-size: 0.95rem;
  padding: 0.78rem 1.9rem; border-radius: 99px;
  border: 1px solid transparent; transition: all 0.35s var(--ease);
}
.btn-solid { background: var(--ink); color: var(--on-fill); }
.btn-solid:hover { background: var(--gold-2); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-2px); }

.hero-meta {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); padding-block: 1.8rem 2.6rem; gap: 1rem;
}
.meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-num {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-variant-numeric: tabular-nums; line-height: 1.25;
}
.meta-label { font-family: var(--font-sans); font-weight: 300; font-size: 0.85rem; color: var(--ink-3); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.section-head { margin-bottom: clamp(2.6rem, 6vw, 4.5rem); }
.index {
  font-family: var(--font-sans); font-weight: 300; font-size: 0.85rem;
  color: var(--gold); display: block; margin-bottom: 0.7rem; letter-spacing: 0.12em;
}
.section-head h2 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.32;
}
html[lang="en"] .section-head h2 { line-height: 1.15; }
.section-sub { color: var(--ink-2); max-width: 34rem; margin-top: 0.8rem; }

/* ---------- Projects (alternating editorial rows) ---------- */
.projects { display: grid; gap: clamp(4rem, 9vw, 7.5rem); }
.project {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.8rem, 4vw, 3.6rem); align-items: center;
}
.project.alt .project-media { order: 2; }
.project.alt .project-info { order: 1; }
.project-media {
  position: relative; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--line-soft); background: var(--bg-2);
  transition: border-color 0.4s var(--ease), transform 0.5s var(--ease);
  will-change: transform;
}
.project-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(201, 163, 92, 0.09), transparent 42%);
  opacity: 0; transition: opacity 0.5s var(--ease); pointer-events: none;
}
.project:hover .project-media { border-color: rgba(201, 163, 92, 0.38); }
.project:hover .project-media::after { opacity: 1; }
.project-media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
  transition: transform 0.9s var(--ease);
}
.project:hover .project-media img { transform: scale(1.025); }
.view-tag {
  position: absolute; bottom: 1.1rem; inset-inline-end: 1.1rem;
  font-family: var(--font-sans); font-size: 0.8rem;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid var(--line); color: var(--ink);
  padding: 0.45rem 1.05rem; border-radius: 99px;
  opacity: 0; transform: translateY(8px); transition: all 0.4s var(--ease);
}
.project:hover .view-tag { opacity: 1; transform: translateY(0); }
.project-info { padding-top: 0; position: relative; }
.p-index {
  display: block; font-family: var(--font-sans); font-weight: 300;
  font-size: 0.82rem; color: var(--gold); letter-spacing: 0.14em;
  margin-bottom: 0.7rem;
}
.project.alt .project-info { padding-inline-start: 0.5rem; }
.project-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.project-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem); transition: color 0.3s var(--ease);
}
.project:hover .project-title { color: var(--gold-2); }
.project-year { font-family: var(--font-sans); font-weight: 300; color: var(--ink-3); font-size: 0.9rem; }
.project-desc { color: var(--ink-2); max-width: 42rem; margin-top: 0.55rem; font-size: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.tags span {
  font-family: var(--font-sans); font-weight: 300; font-size: 0.78rem;
  color: var(--ink-3); border: 1px solid var(--line-soft);
  padding: 0.28rem 0.85rem; border-radius: 99px;
}

/* ---------- About ---------- */
.about-top { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.about-text { position: sticky; top: 4rem; }
.about-text .lead {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.6;
  margin-bottom: 1.6rem; text-wrap: balance;
}
.about-text p:not(.lead) { color: var(--ink-2); }
.about-stack { display: grid; gap: 2.4rem; }
.mini-title {
  font-family: var(--font-sans); font-weight: 400; font-size: 0.85rem;
  color: var(--gold); letter-spacing: 0.08em; margin-bottom: 1rem;
}
.facts { border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding-block: 0.95rem; border-bottom: 1px solid var(--line-soft); }
.fact-k { font-family: var(--font-sans); font-weight: 300; font-size: 0.85rem; color: var(--ink-3); }
.fact-v { font-size: 0.98rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip {
  font-family: var(--font-sans); font-weight: 300; font-size: 0.83rem;
  border: 1px solid var(--line); padding: 0.4rem 1rem; border-radius: 99px;
  color: var(--ink-2); transition: all 0.3s var(--ease);
}
.chip:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-1px); }

.timeline { list-style: none; display: grid; gap: 1.8rem; }
.t-item { border-inline-start: 1px solid var(--line); padding-inline-start: 1.4rem; position: relative; }
.t-item::before {
  content: ''; position: absolute; inset-inline-start: -3.5px; top: 0.85rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}
.t-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.t-role { font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; }
.t-date { font-family: var(--font-sans); font-weight: 300; font-size: 0.85rem; color: var(--ink-3); }
.t-org { font-family: var(--font-sans); font-weight: 300; font-size: 0.9rem; color: var(--ink-3); margin-block: 0.15rem 0.6rem; }
.t-points { list-style: none; display: grid; gap: 0.3rem; }
.t-points li { font-size: 0.97rem; color: var(--ink-2); padding-inline-start: 1.1rem; position: relative; }
.t-points li::before { content: '—'; position: absolute; inset-inline-start: 0; color: var(--gold); opacity: 0.7; }

.courses .course-list {
  list-style: none; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.course-list li {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.4rem;
  border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 1rem 1.2rem; font-size: 0.97rem; color: var(--ink-2);
  background: var(--bg-2); transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.course-list li:hover { border-color: rgba(201, 163, 92, 0.4); transform: translateY(-2px); }
.c-date { font-family: var(--font-sans); font-weight: 300; font-size: 0.82rem; color: var(--ink-3); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: clamp(4rem, 9vw, 7rem) 2rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.8rem; }
.cv-btn { display: inline-flex; align-items: center; gap: 0.55rem; }
.cv-btn svg, .tel-btn svg { width: 1.05rem; height: 1.05rem; }
.tel-btn .num { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.cv-ext {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em;
  border: 1px solid currentColor; border-radius: 5px;
  padding: 0.06rem 0.34rem; opacity: 0.75;
}
.big-mail {
  display: inline-block; font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.6rem, 5.2vw, 3.6rem); line-height: 1.35;
  margin-bottom: 3rem; transition: color 0.4s var(--ease); word-break: break-all;
}
.big-mail .at { color: var(--gold); }
.big-mail { position: relative; }
.big-mail::after {
  content: ''; position: absolute; inset-inline-start: 0; bottom: 0.05em;
  width: 100%; height: 1px; background: currentColor; opacity: 0.55;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.55s var(--ease);
}
html[dir="ltr"] .big-mail::after { transform-origin: left; }
.big-mail:hover { color: var(--gold-2); }
.big-mail:hover::after { transform: scaleX(1); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem; padding-bottom: 3rem; align-items: center; }
.f-link { font-family: var(--font-sans); font-size: 0.95rem; color: var(--ink-2); transition: color 0.3s var(--ease); }
.f-link:hover { color: var(--gold-2); }
.f-note { font-family: var(--font-sans); font-weight: 300; font-size: 0.9rem; color: var(--ink-3); }
.footer-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  border-top: 1px solid var(--line-soft); padding-top: 1.4rem;
  font-family: var(--font-sans); font-weight: 300; font-size: 0.82rem; color: var(--ink-3);
}
.to-top:hover { color: var(--gold-2); }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; inset-inline-start: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  z-index: 60; pointer-events: none;
}

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Case study pages ---------- */
.back-link { display: inline-flex; align-items: center; gap: 0.6rem; }
.back-arrow { color: var(--gold); font-family: var(--font-sans); transition: transform 0.35s var(--ease); display: inline-block; }
html[dir="rtl"] .back-arrow { transform: rotate(180deg); }
.back-link:hover .back-arrow { transform: translateX(-4px); }
html[dir="rtl"] .back-link:hover .back-arrow { transform: rotate(180deg) translateX(-4px); }

.case-head { padding-block: 3.5rem 3rem; max-width: 52rem; }
.case-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.22;
  margin-bottom: 1.4rem; text-wrap: balance;
}
html[lang="en"] .case-title { line-height: 1.08; }
.case-sub { color: var(--ink-2); font-size: 1.08rem; max-width: 44rem; }
.case-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem;
  border-top: 1px solid var(--line); margin-top: 2.6rem; padding-top: 1.6rem;
}
.cf { display: flex; flex-direction: column; gap: 0.3rem; }
.cf-k { font-family: var(--font-sans); font-weight: 300; font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.05em; }
.cf-v { font-family: var(--font-sans); font-weight: 400; font-size: 0.92rem; line-height: 1.7; }

.case-hero {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line-soft);
  background: var(--bg-2); margin-bottom: clamp(3rem, 7vw, 5.5rem);
}
.case-hero img { width: 100%; }

.case-notes {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.8rem, 4vw, 3rem); padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.note { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.note-num { font-family: var(--font-sans); font-weight: 300; font-size: 0.82rem; color: var(--gold); display: block; margin-bottom: 0.8rem; letter-spacing: 0.1em; }
.note h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; margin-bottom: 0.7rem; line-height: 1.5; }
.note p { color: var(--ink-2); font-size: 0.98rem; }

.gallery { padding-bottom: clamp(3.5rem, 8vw, 6.5rem); }
.gallery .mini-title { margin-bottom: 1.8rem; }
.g-item {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line-soft);
  background: var(--bg-2); margin-bottom: 1.6rem;
}
.g-item img { width: 100%; transition: transform 0.9s var(--ease); }
.g-item:hover img { transform: scale(1.015); }
.g-narrow { max-width: 26rem; }

/* ---------- Illustrative-data note ---------- */
.demo-note {
  display: flex; align-items: flex-start; gap: 0.55rem;
  font-family: var(--font-sans); font-weight: 300; font-size: 0.83rem;
  line-height: 1.75; color: var(--ink-3);
}
.demo-note::before { content: 'ⓘ'; color: var(--gold); flex-shrink: 0; opacity: 0.9; }
.case-head .demo-note { margin-top: 1.6rem; }

@media (max-width: 900px) {
  .case-facts { grid-template-columns: repeat(2, 1fr); }
  .case-notes { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .courses .course-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .project, .project.alt { grid-template-columns: 1fr; gap: 1.2rem; }
  .project.alt .project-media { order: 1; }
  .project.alt .project-info { order: 2; padding-inline-start: 0; }
  .about-top { grid-template-columns: 1fr; gap: 2.4rem; }
  .about-text { position: static; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); row-gap: 1.6rem; }
}
@media (max-width: 560px) {
  .courses .course-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links a:not(.nav-name) { display: none; }
  .fact { grid-template-columns: 1fr; gap: 0.15rem; }
  .project-media img { aspect-ratio: 4 / 3; }
}

/* Refinements: keep the Thmanyah / warm gold editorial identity. */
:root { --ink-3: #aaa294; }
html[data-theme="light"] { --ink-3: #716750; --gold: #866221; }
html { scrollbar-color: var(--ink-3) var(--bg); scroll-padding-top: 2rem; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
a { text-underline-offset: .25em; }
.skip-link { position: fixed; inset-inline-start: 1rem; top: -6rem; z-index: 100; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.reveal { opacity: 1; transform: none; transition: none; }
.hero { min-height: auto; }
.hero-body { padding-block: clamp(3rem, 7vw, 6rem) 3rem; }
.hero-kicker { margin-block: 0 1.2rem; letter-spacing: 0; }
.hero-title { margin-bottom: 1rem; }
.hero-cv { font-family: var(--font-sans); font-size: .9rem; align-self: center; padding: .75rem .4rem; color: var(--ink-2); text-decoration: underline; }
.hero-cv:hover { color: var(--gold-2); }
.hero-meta { padding-bottom: 1.6rem; }
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
#work { border-top: 1px solid var(--line); }
.section-head .index { display: none; }
.timeline-block { margin-bottom: 3rem; }
.nav-links a:not(.nav-name), .theme-btn, .lang-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.theme-btn { width: 44px; height: 44px; }
.theme-btn svg { width: 1.1rem; height: 1.1rem; }
.project-media img { aspect-ratio: auto; object-fit: contain; }
.view-tag { opacity: 1; transform: none; background: var(--bg); backdrop-filter: none; }
.project:focus-visible .project-title { color: var(--gold-2); }
.project-title, .case-title, .t-role, .big-mail, .f-link[href^="mailto:"] { unicode-bidi: plaintext; }
.big-mail { direction: ltr; }
.image-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.image-viewer { margin: auto; width: min(96vw, 90rem); max-height: 94svh; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 3.5rem 1rem 1rem; overflow: auto; }
.image-viewer::backdrop { background: rgba(0,0,0,.85); }
.image-viewer img { width: 100%; }
.image-viewer figcaption { font: .85rem var(--font-sans); padding-top: 1rem; direction: ltr; }
.viewer-close { position: absolute; top: .5rem; inset-inline-end: .5rem; width: 44px; height: 44px; font-size: 1.7rem; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.g-item:hover img { transform: none; }
.case-head .hero-kicker { margin-bottom: 1.4rem; }
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: .5rem; padding-block: 1rem; }
  .nav-name { flex: 1 0 100%; }
  .nav-links { width: 100%; gap: .8rem; justify-content: space-between; }
  .nav-links a:not(.nav-name) { display: inline-flex; font-size: .85rem; }
  .nav-sep { display: none; }
  .hero-title { font-size: clamp(2.2rem, 9.5vw, 3.5rem); }
  .hero-body { padding-block: 2.5rem 2rem; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { gap: .65rem; }
  .btn { padding: .75rem 1.25rem; }
  .hero-cv { flex-basis: 100%; }
  .project-media img { aspect-ratio: auto; }
  .project-row { flex-wrap: wrap; gap: .3rem 1rem; }
  .tags span { padding-inline: .65rem; }
  .contact-actions { gap: .7rem; }
  .case-title { font-size: 2.25rem; }
}
@media (hover: none) {
  .btn:hover, .theme-btn:hover, .chip:hover, .course-list li:hover { transform: none; }
  .project:hover .project-media img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.note-title { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; margin-bottom: .7rem; line-height: 1.5; }
img[width][height] { height: auto; }
