/* ===================================================
   PORTFOLIO SECTIONS & LIQUID GLASS COMPONENTS
   =================================================== */

section {
  padding: 110px 0;
  position: relative;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 46px;
}

.kicker {
  color: var(--accent-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(36px, 4.8vw, 62px);
  letter-spacing: -0.055em;
  line-height: 1.05;
  font-weight: 800;
}

.section-head p {
  max-width: 500px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

/* Liquid Glass Panel (Cards) */
.panel {
  border: 1px solid var(--glass-border);
  background: var(--glass-panel);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--glass-specular), transparent);
  pointer-events: none;
}

.panel::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glass-specular) 0%, transparent 65%);
  opacity: 0.25;
  pointer-events: none;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--glass-shadow-hover);
  border-color: var(--glass-border-hover);
}

/* Interactive Cursor Spotlight Layer */
.spotlight-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(420px circle at var(--x, 0px) var(--y, 0px), var(--spotlight-glow), transparent 75%);
}

/* Hero Bio Paragraphs & Location */
.hero-bio {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 22px 0 32px;
}
.hero-bio p {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.7;
}
.location-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--subtle);
  font-weight: 500;
}
.location-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}
.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-text p {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.75;
}
.about-side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-quote {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  border-left: 3px solid var(--accent-2);
  padding-left: 18px;
}
html[dir="rtl"] .about-quote {
  border-left: none;
  border-right: 3px solid var(--accent-2);
  padding-left: 0;
  padding-right: 18px;
}

/* Education Section */
.edu-card {
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-panel);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.edu-badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--pill-text);
  font-size: 12.5px;
  font-weight: 700;
}
.edu-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edu-degree {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}
.edu-uni {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-2);
}
.edu-loc {
  font-size: 14px;
  color: var(--subtle);
}
.edu-notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
}
.edu-notes p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

/* Interests Grid */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.interest-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.interest-icon-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-2);
  letter-spacing: 0.12em;
}
.interest-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.interest-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* Experience Section */
.exp-card {
  padding: 42px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.exp-card p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
}

/* AI & Learning Section (Visually Distinct) */
.ai-chamber {
  padding: 46px;
  border-radius: 32px;
  background: var(--glass-elevated);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(32px) saturate(220%);
  -webkit-backdrop-filter: blur(32px) saturate(220%);
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}
.ai-chamber::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.55;
}
.ai-lead {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 14px;
}
.ai-body {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.7;
}
.ai-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.ai-chip:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.ai-chip-spark {
  color: var(--accent-2);
}
.ai-takeaway-box {
  padding: 20px 24px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}
html.dark .ai-takeaway-box {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.22);
}

/* International Opportunities Section (The Crown Jewel) */
.opp-subtitle {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 30px;
}
.opp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin: 32px 0 40px;
}
.opp-card {
  padding: 20px 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--glass-panel);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.opp-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
}
.opp-badge-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-primary-bg);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.opp-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.opp-quote-box {
  padding: 34px 38px;
  border-radius: 24px;
  background: var(--glass-elevated);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.opp-quote-box p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
}
.opp-quote-box strong {
  font-size: 18px;
  color: var(--accent-2);
  font-weight: 800;
}

/* Languages Section */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.lang-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lang-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lang-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}
.lang-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--pill-text);
}
.lang-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* Personal Note Section */
.note-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 44px;
  border-radius: 32px;
  text-align: center;
  background: var(--glass-elevated);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.note-box p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--muted);
}
.note-closing {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-2);
  margin-top: 8px;
}

/* Contact Box */
.contact-box {
  padding: 58px;
  border-radius: 36px;
  border: 1px solid var(--glass-border);
  background: var(--glass-panel);
  backdrop-filter: blur(30px) saturate(220%);
  -webkit-backdrop-filter: blur(30px) saturate(220%);
  box-shadow: var(--glass-shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
}
.contact-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--glass-specular), transparent);
}
.contact-box:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
}
.contact-box h2 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 800;
}
.contact-box p {
  color: var(--muted);
  margin-top: 14px;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.65;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Contact Email Glass Pill */
.contact-email-container {
  margin-top: 20px;
  display: flex;
  align-items: center;
}
.contact-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 16px;
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  box-shadow: 0 4px 16px rgba(14, 30, 60, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.contact-email-pill:hover {
  border-color: var(--primary-glow);
  box-shadow: 0 8px 24px var(--primary-glow), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}
.contact-email-pill .email-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.contact-email-addr {
  font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.2s ease;
}
.contact-email-addr:hover {
  color: var(--primary);
}
.contact-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: var(--primary);
  background: var(--surface-tint);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.22s ease, color 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.contact-copy-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.04);
}
.contact-copy-btn.copied {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}
.contact-copy-btn:active {
  transform: scale(0.96);
}

/* Global RTL Support */
html[dir="rtl"] {
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: right;
}
html[dir="rtl"] .actions,
html[dir="rtl"] .hero-bio,
html[dir="rtl"] .section-head,
html[dir="rtl"] .about-text,
html[dir="rtl"] .edu-card,
html[dir="rtl"] .exp-card,
html[dir="rtl"] .ai-chamber,
html[dir="rtl"] .opp-chamber,
html[dir="rtl"] .languages-grid,
html[dir="rtl"] .contact-box {
  text-align: right;
}
html[dir="rtl"] .edu-badge {
  align-self: flex-start;
}
html[dir="rtl"] .note-box {
  text-align: center;
}
html[dir="rtl"] .contact-email-addr {
  direction: ltr;
  unicode-bidi: embed;
}

/* Footer */
footer {
  padding: 38px 0 50px;
  color: var(--muted);
  font-size: 13.5px;
  border-top: 1px solid var(--glass-border);
  background: var(--glass-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.show {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media(max-width: 960px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .visual { min-height: 380px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .card-a { right: 0; }
  .card-b { left: 0; }
  .contact-box { grid-template-columns: 1fr; padding: 36px; }
}
@media(max-width: 560px) {
  .wrap { width: min(calc(100% - 28px), var(--max)); }
  .hero { padding-top: 104px; }
  .hero-grid { gap: 32px; }
  .visual { min-height: 300px; }
  .orb { width: 260px; }
  .code-card { width: 180px; padding: 14px; }
  .code-card strong { font-size: 13px; }
  section { padding: 76px 0; }
  .panel { padding: 24px; }
  .contact-box { padding: 26px; }
  .actions .btn { flex: 1 1 140px; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 768px), (pointer: coarse) {
  .panel, .edu-card, .ai-chamber, .opp-quote-box, .languages-grid,
  .note-box, .contact-box, footer {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
