/* ── RESET & VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:     #f5f3ef;
  --bg2:    #edeae4;
  --ink:    #1a1816;
  --ink2:   #6b6560;
  --accent: #c8a96e;
  --line:   #d8d3cb;
  --white:  #faf9f7;
}

@font-face {
  font-family: 'DM Sans';
  src: url('./fonts/dm-sans-v17-latin-200.woff2') format('woff2');
  font-style: normal;
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('./fonts/dm-sans-v17-latin-300.woff2') format('woff2');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('./fonts/dm-sans-v17-latin-regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('./fonts/cormorant-garamond-v21-latin_latin-ext-300.woff2') format('woff2');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('./fonts/cormorant-garamond-v21-latin_latin-ext-regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('./fonts/cormorant-garamond-v21-latin_latin-ext-500.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('./fonts/cormorant-garamond-v21-latin_latin-ext-300italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('./fonts/cormorant-garamond-v21-latin_latin-ext-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('./fonts/noto-sans-arabic-v33-arabic-regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

html[lang="ar"] body {
  font-family: 'DM Sans', 'Noto Sans Arabic', sans-serif;
}

html[lang="ar"] .nav-logo,
html[lang="ar"] .home-title,
html[lang="ar"] .section-title,
html[lang="ar"] .resume-section-title,
html[lang="ar"] .resume-entry-title,
html[lang="ar"] .contact-tagline,
html[lang="ar"] .footer-name {
  font-family: 'Cormorant Garamond', 'Noto Sans Arabic', serif;
}


/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 60px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.scrolled { border-color: var(--line); }

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 0.78rem;          /* slightly larger than before */
  font-weight: 400;            /* slightly bolder */
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink2);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ══════════════════════════════════════
   PAGES
══════════════════════════════════════ */
.page {
  min-height: 100vh;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.page.active {
  display: block;
  opacity: 1;
}


/* ══════════════════════════════════════
   HOME
══════════════════════════════════════ */
#home {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 120px 60px 80px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
#home.active { display: flex; }

.home-bg-text {
  position: absolute;
  bottom: -20px; right: -20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(80px, 18vw, 240px);
  font-weight: 300;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  overflow: hidden;
}
.home-content { max-width: 900px; width: 100%; position: relative; }

.home-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.home-eyebrow::before { content: ''; width: 40px; height: 1px; background: var(--accent); }

.home-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}
.home-title em { font-style: italic; color: var(--ink2); }

.home-desc {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--ink2);
  max-width: 440px;
  margin-bottom: 60px;
}
.home-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  border-top: none; border-left: none; border-right: none;
  padding-bottom: 6px;
  background: none;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.home-cta:hover { color: var(--accent); border-color: var(--accent); }
.home-cta svg { transition: transform 0.2s; }
.home-cta:hover svg { transform: translateX(5px); }

.home-scroll-line {
  position: absolute;
  bottom: 40px; left: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink2);
}
.home-scroll-line::before {
  content: '';
  width: 1px; height: 50px;
  background: var(--line);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}


/* ══════════════════════════════════════
   SHARED SECTION HEADER
══════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 72px;
}
.section-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1;
}
.section-line { flex: 1; height: 1px; background: var(--line); margin-left: 16px; }

@media (max-width: 768px) {
  
  .section-header {
  margin-bottom: 22px;
}
}
/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
#about { padding: 140px 60px 100px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 80px;
  max-width: 1100px;
  align-items: start;
}
.about-text p {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink2);
  margin-bottom: 24px;
  text-align: justify;
}
.about-text p strong { color: var(--ink); font-weight: 400; }

.about-facts {
  grid-column: 2;
  grid-row: 2;
}
.about-fact { border-top: 1px solid var(--line); padding-top: 20px; }

.about-portrait {
  grid-column: 2;
  grid-row: 1;
  width: 40%;
  margin-top: 14px;
  height: 220px;
  object-fit: cover;
  object-position: center top;
  outline: 1px solid var(--line);
  outline-offset: 5px;
}

.about-text {
  grid-column: 1;
  grid-row: 1 / 3;
}

.about-fact-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.about-fact-value { font-size: 1rem; color: var(--ink); font-weight: 300; }

@media (max-width: 768px) {
  
  .about-grid {
  display: flex;
  flex-direction: column;
}

.about-portrait {
  order: 1;
  width: 42%;
  height: 180px;
  object-fit: cover;
  object-position: center 20%;
  margin-bottom: 24px;
}
.about-text     { order: 2; }
.about-facts    { order: 3; }
}


/* ══════════════════════════════════════
   RESUME
══════════════════════════════════════ */
#resume { padding: 140px 60px 100px; }

.resume-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr auto;
  gap: 52px;
  max-width: 1300px;
  align-items: start;
}

.resume-section-title {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}
.resume-entries { display: flex; flex-direction: column; gap: 36px; }

.resume-entry {
  border-left: 1px solid var(--line);
  padding-left: 24px;
  position: relative;
}
.resume-entry::before {
  content: '';
  position: absolute;
  left: -4px; top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.resume-entry-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 4px;
}
.resume-entry-project {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 4px;
}
.resume-entry-org { font-size: 0.78rem; color: var(--ink2); margin-bottom: 6px; text-align: justify;}
.resume-entry-date {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.resume-entry-desc { font-size: 0.82rem; line-height: 1.7; color: var(--ink2); }


/* ══════════════════════════════════════
   ARCHITECTURE
══════════════════════════════════════ */
#architecture { padding: 140px 60px 100px; }

.arch-list { display: flex; flex-direction: column; max-width: 960px; }

.arch-item {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.arch-item:first-child { border-top: 1px solid var(--line); }

.arch-item-top { margin-bottom: 32px; }

.arch-item-info {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}
.arch-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--accent);
  padding-top: 4px;
  min-width: 28px;
}
.arch-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 4px;
}
.arch-location {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}
.arch-detail { font-size: 0.85rem; line-height: 1.75; color: var(--ink2); text-align: justify; margin-bottom: 10px; }

.arch-detail p {
  margin-bottom: 12px;
}

/* Gallery */
.arch-gallery, .eng-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 24px;
  padding-left: 56px;
}
.eng-photo {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.3s;
  border-radius: 2px;
  display: block;
  box-shadow: 0 0 0 1px var(--line);
}
.arch-photo {
  aspect-ratio: 21/9;
  object-fit: cover;
  width: 140%;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.3s;
  border-radius: 2px;
  display: block;
  box-shadow: 0 0 0 1px var(--line);
}
.arch-photo:hover, .eng-photo:hover { opacity: 0.85; transform: scale(1.01); }

.arch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-left: 56px;
}

.arch-tag {
  display: inline-flex;
  width: auto;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink2);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 2px;
  transition: border-color 0.2s;
}
.arch-tag:hover { border-color: var(--accent); }

/* Placeholder tiles (remove once you add real images) */
.arch-photo.placeholder, .eng-photo.placeholder {
  background: var(--bg2);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.arch-photo.placeholder span, .eng-photo.placeholder span {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink2);
}

@media (max-width: 768px) {
  .arch-item-info {
    flex-direction: column;
    gap: 12px;
  }
  .arch-num {
    display: none;
  }
  #engineering, #software, #architecture, #about, #resume, #contact {
  padding-top: 90px;
}
}


/* ══════════════════════════════════════
   ENGINEERING
══════════════════════════════════════ */
#engineering { padding: 140px 60px 100px; }

.eng-list { display: flex; flex-direction: column; max-width: 960px; }

.eng-item {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.eng-item:first-child { border-top: 1px solid var(--line); }

.eng-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.eng-left { display: flex; align-items: flex-start; gap: 28px; }
.eng-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--accent);
  padding-top: 4px;
  min-width: 28px;
}
.eng-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 6px;
}
.eng-meta { font-size: 0.78rem; color: var(--accent); }
.eng-link { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
.eng-link:hover { opacity: 0.7; }

.eng-date {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink2);
  white-space: nowrap;
  padding-top: 4px;
}
.eng-body { margin-bottom: 20px; padding-left: 56px; }
.eng-body p { font-size: 0.88rem; line-height: 1.85; color: var(--ink2); margin-bottom: 12px; hyphens: auto; text-align: justify;}
.eng-body p:last-child { margin-bottom: 0; }
.eng-body strong { color: var(--ink); font-weight: 400; }

.eng-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 56px; margin-top: 20px; }
.eng-tag {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink2);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.eng-tag:hover { border-color: var(--accent); color: var(--accent); }


/* ══════════════════════════════════════
   SOFTWARE
══════════════════════════════════════ */
#software { padding: 140px 60px 100px; }

.sw-modules { margin: 28px 0 20px; padding-left: 56px; }
.sw-modules-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.sw-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.sw-module {
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 2px;
  transition: border-color 0.2s;
}
.sw-module:hover { border-color: var(--accent); }

.sw-photo {
 aspect-ratio: 25/12;
  object-fit: cover;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.3s;
  border-radius: 2px;
  display: block;
   box-shadow: 0 0 0 1px var(--line);
}
/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
#contact { padding: 140px 60px 100px; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  max-width: 1000px;
}
.contact-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 40px;
}
.contact-tagline em { font-style: italic; color: var(--ink2); }

.contact-links { display: flex; flex-direction: column; gap: 24px; }
.contact-link-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.contact-link-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact-link-value { font-size: 0.95rem; color: var(--ink); text-decoration: none; transition: color 0.2s; }
.contact-link-value:hover { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 28px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink2);
}
.form-input, .form-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  resize: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--line); }

.form-submit {
  align-self: flex-start;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 16px 40px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.char-count {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--ink2);
  text-align: right;
  margin-top: 6px;
  transition: color 0.2s;
}
.char-count.near-limit { color: var(--accent); }
.form-submit:hover { background: var(--accent); color: var(--white); }


/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
  padding: 32px 60px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}
.footer-name { font-family: 'Cormorant Garamond', serif; font-size: 0.9rem; color: var(--ink2); }
.footer-copy { font-size: 0.68rem; letter-spacing: 0.1em; color: var(--ink2); }


/* ══════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 22, 0.92);
  z-index: 500;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: none;
  color: var(--bg);
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }


/* ══════════════════════════════════════
   FADE-IN
══════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: none; }


/* ══════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav */
  nav { padding: 20px 24px; }
  .nav-hamburger { display: flex; }

 

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 150;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.05rem; letter-spacing: 0.2em; }

 .home-bg-text {
    font-size: clamp(60px, 28vw, 120px);
    right: 0;
    bottom: 0px;
  }


  /* Pages */
  #home, #about, #resume, #architecture,
  #engineering, #software, #contact {
    padding-left: 24px;
    padding-right: 24px;
    padding-top: 90px;
  }

  /* Grids → single column */
  .about-grid,
  .resume-cols,
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }

  .home-scroll-line { left: 24px; }

  /* Gallery: 2 cols on mobile */
  .arch-gallery, .eng-gallery { grid-template-columns: repeat(2, 1fr); }

  /* Engineering */
  .eng-header { flex-direction: column; gap: 8px; }
  .eng-body, .eng-tags, .sw-modules, .arch-gallery, .eng-gallery { padding-left: 0; }

  /* Software modules */
  .sw-modules-grid { grid-template-columns: 1fr 1fr; }
}


/* ══════════════════════════════════════
   LANGUAGE SWITCHER
══════════════════════════════════════ */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--line);
  padding-left: 28px;
  margin-left: 8px;
}
.lang-sep {
  font-size: 0.6rem;
  color: var(--line);
}
.lang-btn {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink2);
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.2s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* Mobile lang switcher — shown next to hamburger */
.lang-switcher-mobile {
  display: none;
  align-items: center;
  gap: 6px;
}
.lang-switcher-mobile .lang-btn { font-size: 0.68rem; }

/* Arabic RTL support */
html[lang="ar"] body {
  direction: rtl;
  font-family: 'DM Sans', sans-serif;
}
html[lang="ar"] .home-eyebrow::before,
html[lang="ar"] .home-scroll-line::before { display: none; }
html[lang="ar"] .home-eyebrow { flex-direction: row-reverse; }
html[lang="ar"] .section-header { flex-direction: row-reverse; }
html[lang="ar"] .section-line { margin-left: 0; margin-right: 16px; }
html[lang="ar"] .resume-entry { border-left: none; border-right: 1px solid var(--line); padding-left: 0; padding-right: 24px; }
html[lang="ar"] .resume-entry::before { left: auto; right: -4px; }
html[lang="ar"] .arch-item-info { flex-direction: row-reverse; }
html[lang="ar"] .eng-left { flex-direction: row-reverse; }
html[lang="ar"] .eng-body { padding-left: 0; padding-right: 56px; }
html[lang="ar"] .eng-tags { padding-left: 0; padding-right: 56px; }
html[lang="ar"] .sw-modules { padding-left: 0; padding-right: 56px; }
html[lang="ar"] .arch-gallery,
html[lang="ar"] .eng-gallery { padding-left: 0; padding-right: 56px; }
html[lang="ar"] .nav-links { flex-direction: row-reverse; }
html[lang="ar"] .lang-switcher { border-left: none; border-right: 1px solid var(--line); padding-left: 0; padding-right: 28px; margin-left: 0; margin-right: 8px; }

@media (max-width: 768px) {
  .lang-switcher { display: none; }
  .lang-switcher-mobile { display: flex; }
  html[lang="ar"] .eng-body { padding-right: 0; }
  html[lang="ar"] .eng-tags,
  html[lang="ar"] .sw-modules,
  html[lang="ar"] .arch-gallery,
  html[lang="ar"] .eng-gallery { padding-right: 0; }
}


/* ══════════════════════════════════════
   HOME PORTRAIT
══════════════════════════════════════ */
.home-hero-row {
  display: flex;
  align-items: flex-start;
  gap: 52px;
  margin-bottom: 0;
}

.home-text-block {
  flex: 1;
}

.home-portrait {
  position: absolute;
  top: 88px;        /* just below the nav */
  right: 60px;
  width: 90px;
  height: 120px;
  object-fit: cover;
  object-position: center top;
  outline: 1px solid var(--line);
  outline-offset: 4px;
  z-index: 10;
}

@media (max-width: 768px) {
  .home-portrait {
    top: 72px;
    right: 24px;
    width: 64px;
    height: 86px;
  }
}

/* ══════════════════════════════════════
   HOME SOCIAL BUTTONS
══════════════════════════════════════ */
.home-actions {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.home-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.home-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink2);
  text-decoration: none;
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.home-social-btn:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.home-social-btn svg { flex-shrink: 0; }

/* ══════════════════════════════════════
   RESUME DOWNLOAD COLUMN
══════════════════════════════════════ */
.resume-download-col {
  display: flex;
  flex-direction: column;
  padding-top: 0;
  gap: 0px;
}

.resume-download-card {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  padding: 16px 32px;
  border: 1px solid var(--line);
  color: var(--ink2);
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
}
.resume-download-card:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: none;
}
.resume-download-card svg { opacity: 0.6; transition: opacity 0.2s, transform 0.2s; }
.resume-download-card:hover svg { opacity: 1; transform: translateY(2px); }
.resume-download-card svg { opacity: 0.6; transition: opacity 0.2s, transform 0.2s; }
.resume-download-card:hover svg { opacity: 1; transform: translateY(3px); }

/* ══════════════════════════════════════
   PLACEHOLDER PHOTOS
══════════════════════════════════════ */
.eng-photo.placeholder {
  background: var(--bg2);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  aspect-ratio: 4/3;
}
.eng-photo.placeholder span {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--ink2);
  text-transform: uppercase;
}

/* ══════════════════════════════════════
   ABOUT GRID TOP ALIGNMENT
══════════════════════════════════════ */
.about-grid { align-items: start; }

@media (max-width: 768px) {
  .home-actions { gap: 24px; }
  .resume-download-col { flex-direction: column; align-items: left; }
  .resume-download-card { flex-direction: column; width: 100%; }
  .eng-num {
  display: none;
}
.arch-tags {
  padding-left: 0;
}

.arch-tag {
  width: auto;
  flex-shrink: 0;
}

.arch-gallery {
  width:100%;
  grid-template-columns: 1fr;
}
.arch-photo {
  width: 100%;
}

.arch-detail {
  margin-bottom: 12px;
}
}
