@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #050816;
  --bg-2: #090b1f;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #38bdf8;
  --violet: #a855f7;
  --gold: #f59e0b;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  --radius: 28px;
  --font: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}

html[dir="ltr"] {
  --font: "Outfit", "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 34rem),
    radial-gradient(circle at 10% 20%, rgba(168, 85, 247, 0.2), transparent 32rem),
    linear-gradient(135deg, var(--bg), var(--bg-2) 54%, #03040d);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

body[data-theme="light"] {
  --bg: #eef6ff;
  --bg-2: #f8fbff;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --line: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --muted: #475569;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 34rem),
    radial-gradient(circle at 10% 20%, rgba(168, 85, 247, 0.14), transparent 32rem),
    linear-gradient(135deg, #eef6ff, #ffffff 54%, #eef2ff);
}

body[data-theme="light"] .site-header,
body[data-theme="light"] .nav-links,
body[data-theme="light"] .mini-panel,
body[data-theme="light"] .lightbox-card {
  background: rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .btn-primary,
body[data-theme="light"] .card-icon,
body[data-theme="light"] .lang-icon {
  color: #031321;
}

body[data-theme="light"] .brand-mark {
  background: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}

body[data-theme="light"] .badge {
  color: #7c2d12;
}

body[data-theme="light"] .project-card::after,
body[data-theme="light"] .gallery-item::after {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.76));
}

body[data-theme="light"] .project-content,
body[data-theme="light"] .gallery-item span {
  color: #f8fafc;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--gold));
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.7);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.1;
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.9) 0 1px, transparent 1px 4px);
  background-size: 8px 8px;
}

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

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 12px;
  color: #04111d;
  background: var(--cyan);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1160px, calc(100% - 38px));
  margin-inline: auto;
}

.section {
  padding-block: 96px;
}

.page-glow {
  position: fixed;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
}

.page-glow-one {
  top: 10vh;
  left: -160px;
  background: var(--violet);
}

.page-glow-two {
  bottom: 6vh;
  right: -180px;
  background: var(--cyan);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(5, 8, 22, 0.74);
  backdrop-filter: blur(18px);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.nav-links,
.hero-actions,
.signal-row,
.filter-bar,
.site-footer .shell {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 16px;
  background: #050816;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.25);
  overflow: hidden;
  padding: 2px;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.nav-links {
  list-style: none;
  gap: 6px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
}

.nav-link {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.94rem;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--text);
  background: rgba(56, 189, 248, 0.12);
  outline: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
  transition: 0.25s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.lang-toggle:hover,
.lang-toggle:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(56,189,248,0.45);
  outline: none;
}

.theme-icon,
.lang-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  color: #031321;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: 58px;
  padding-top: 70px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.eyebrow-line {
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(2.45rem, 6.5vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

h3 {
  letter-spacing: -0.03em;
}

.hero-lead,
.section-heading p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.9;
}

.typing-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(56,189,248,0.24);
  border-radius: 18px;
  color: #dbeafe;
  background: rgba(56,189,248,0.08);
  font-weight: 900;
}

body[data-theme="light"] .typing-line {
  color: #075985;
}

#typingText {
  color: var(--cyan);
}

.typing-line i {
  width: 2px;
  height: 1.2em;
  border-radius: 999px;
  background: var(--cyan);
  animation: caretBlink 0.8s steps(1) infinite;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 18px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
  outline: none;
}

.btn-primary {
  color: #031321;
  background: linear-gradient(135deg, var(--cyan), #7dd3fc);
  box-shadow: 0 18px 44px rgba(56, 189, 248, 0.22);
}

.btn-ghost {
  border-color: rgba(255,255,255,0.16);
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255,255,255,0.1);
}

.signal-row {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.signal-row span {
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  color: #dbeafe;
  background: rgba(255,255,255,0.04);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
}

.control-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
    radial-gradient(circle at top, rgba(56,189,248,0.2), transparent 50%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card {
  min-height: 520px;
  padding: 22px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(56,189,248,0.26);
  border-radius: 32px;
  pointer-events: none;
}

.terminal-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  direction: ltr;
  font-size: 0.82rem;
}

.terminal-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.terminal-bar i:nth-child(2) {
  background: var(--cyan);
}

.terminal-bar i:nth-child(3) {
  background: var(--violet);
}

.portrait-frame {
  position: absolute;
  inset: 82px 52px 88px;
  display: grid;
  place-items: center;
}

.portrait-frame img {
  position: relative;
  z-index: 3;
  width: min(100%, 360px);
  height: 390px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 34px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.5);
}

.portrait-orbit {
  position: absolute;
  border: 1px solid rgba(56,189,248,0.32);
  border-radius: 50%;
  animation: spin 12s linear infinite;
}

.orbit-one {
  width: 340px;
  height: 340px;
}

.orbit-two {
  width: 460px;
  height: 240px;
  border-color: rgba(168,85,247,0.34);
  transform: rotate(-20deg);
  animation-duration: 16s;
}

.mini-panel {
  position: absolute;
  z-index: 4;
  width: 150px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  background: rgba(7, 11, 30, 0.74);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.3);
}

.mini-panel strong {
  display: block;
  color: var(--cyan);
  font-size: 1.35rem;
}

.mini-panel span {
  color: var(--muted);
  font-size: 0.86rem;
}

.panel-top {
  top: 90px;
  right: 6px;
}

.panel-bottom {
  left: 8px;
  bottom: 90px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  color: var(--text);
}

.stat-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 34px;
  align-items: start;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.glass-card {
  position: relative;
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  overflow: hidden;
}

.glass-card::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  left: -60px;
  bottom: -70px;
  border-radius: 50%;
  background: rgba(56,189,248,0.12);
  filter: blur(8px);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border-radius: 16px;
  color: #04111d;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  font-weight: 900;
}

.glass-card p,
.project-content p,
.workflow p {
  color: var(--muted);
  line-height: 1.8;
}

.personal-strip {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(255,255,255,0.045);
}

.personal-strip h3 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.personal-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.personal-images img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  filter: saturate(1.06) contrast(1.04);
}

.narrow {
  max-width: 760px;
  margin-bottom: 36px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  grid-auto-rows: 310px;
  gap: 18px;
}

.project-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 18px 70px rgba(0,0,0,0.3);
}

.project-card.large {
  grid-row: span 2;
}

.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,8,22,0.08), rgba(5,8,22,0.86));
}

.project-card:hover img {
  transform: scale(1.06);
}

.project-content {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.spotlight-section {
  padding-top: 18px;
}

.spotlight-slider {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background:
    radial-gradient(circle at top right, rgba(56,189,248,0.14), transparent 42%),
    rgba(255,255,255,0.045);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.slider-track {
  position: relative;
  min-height: 440px;
  border-radius: 28px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(5,8,22,0.9));
}

.slide div {
  position: relative;
  z-index: 2;
  padding: 30px;
  color: #f8fafc;
}

.slide span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(56,189,248,0.18);
  color: #bae6fd;
  font-weight: 900;
}

.slide h3 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 3rem);
}

.slider-btn {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.slider-btn:hover,
.slider-btn:focus-visible {
  transform: scale(1.05);
  border-color: rgba(56,189,248,0.5);
  outline: none;
}

.slider-dots {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148,163,184,0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.slider-dots button.active {
  width: 30px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

.badge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 11px;
  border: 1px solid rgba(245,158,11,0.4);
  border-radius: 14px;
  color: #ffedd5;
  background: rgba(245,158,11,0.13);
  font-size: 0.84rem;
  font-weight: 900;
}

.filter-bar {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.gallery-search {
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin-bottom: 18px;
  font-weight: 900;
}

.gallery-search input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-search input::placeholder {
  color: var(--muted);
}

.gallery-search input:focus {
  border-color: rgba(56,189,248,0.5);
  box-shadow: 0 0 0 4px rgba(56,189,248,0.12);
}

.filter-btn {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--muted);
  background: rgba(255,255,255,0.045);
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-btn:hover,
.filter-btn:focus-visible,
.filter-btn.active {
  color: var(--text);
  border-color: rgba(56,189,248,0.45);
  background: rgba(56,189,248,0.14);
  outline: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.gallery-item {
  grid-column: span 4;
  position: relative;
  min-height: 250px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 16px 50px rgba(0,0,0,0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, opacity 0.22s ease;
}

.gallery-item:nth-child(5n + 1) {
  grid-column: span 5;
}

.gallery-item:nth-child(5n + 2) {
  grid-column: span 3;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(56,189,248,0.5);
  outline: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.07);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(5,8,22,0.9));
}

.gallery-item span {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  max-width: calc(100% - 36px);
  font-weight: 900;
}

.gallery-item.is-hidden {
  display: none;
}

.empty-state {
  margin-top: 18px;
  padding: 26px;
  border: 1px dashed rgba(56,189,248,0.38);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(56,189,248,0.07);
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--text);
  margin-bottom: 6px;
}

.skills-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at top right, rgba(56,189,248,0.12), transparent 44%),
    var(--panel);
}

.skill-cloud span {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 15px;
  color: #dbeafe;
  background: rgba(255,255,255,0.06);
}

.workflow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.workflow article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
}

.workflow strong {
  color: var(--cyan);
}

.site-footer {
  border-top: 1px solid rgba(255,255,255,0.09);
  padding: 26px 0;
  color: var(--muted);
}

.site-footer .shell {
  justify-content: space-between;
  gap: 16px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--cyan);
  font-weight: 800;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  padding: 26px;
  background: rgba(3, 4, 13, 0.82);
  backdrop-filter: blur(18px);
}

.lightbox.is-open {
  display: grid;
}

.lightbox-card {
  width: min(1080px, 100%);
  max-height: 88vh;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #070b1c;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lightbox-card img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #020617;
}

.lightbox-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.lightbox-card span {
  color: var(--cyan);
  font-weight: 900;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  left: 22px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: rgba(56,189,248,0.55);
  outline: none;
}

.back-to-top {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 120;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #031321;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 18px 44px rgba(56,189,248,0.24);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.tilt-card {
  transform-style: preserve-3d;
}

.reveal {
  --delay: 0ms;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s ease var(--delay), transform 0.65s ease var(--delay);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .skills-layout,
  .personal-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 52px;
  }

  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }

  .spotlight-slider {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .slider-track {
    min-height: 360px;
  }

  .project-card.large {
    grid-row: span 1;
    grid-column: span 2;
  }

  .gallery-item,
  .gallery-item:nth-child(5n + 1),
  .gallery-item:nth-child(5n + 2) {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 26px, 1160px);
  }

  .section {
    padding-block: 70px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-actions {
    order: 2;
  }

  .menu-toggle {
    order: 3;
  }

  .nav-links {
    position: fixed;
    top: 82px;
    right: 13px;
    left: 13px;
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(7, 11, 30, 0.96);
    box-shadow: var(--shadow);
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition: 0.22s ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    justify-content: center;
  }

  h1 {
    font-size: clamp(2.4rem, 16vw, 4.4rem);
  }

  .hero-card {
    min-height: 470px;
  }

  .portrait-frame {
    inset: 82px 24px 80px;
  }

  .portrait-frame img {
    height: 330px;
  }

  .mini-panel {
    width: 132px;
  }

  .stats-grid,
  .about-cards,
  .personal-images,
  .workflow,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .project-card.large,
  .project-card {
    grid-column: auto;
  }

  .featured-grid {
    grid-auto-rows: auto;
  }

  .spotlight-slider {
    grid-template-columns: 1fr;
  }

  .slider-track {
    min-height: 320px;
  }

  .slider-prev,
  .slider-next {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
  }

  .slider-prev {
    right: 18px;
  }

  .slider-next {
    left: 18px;
  }

  .slider-btn:hover,
  .slider-btn:focus-visible {
    transform: translateY(-50%) scale(1.05);
  }

  .project-card {
    min-height: 330px;
  }

  .gallery-item,
  .gallery-item:nth-child(5n + 1),
  .gallery-item:nth-child(5n + 2) {
    grid-column: span 12;
  }

  .personal-images img {
    height: 260px;
  }

  .site-footer .shell,
  .lightbox-card figcaption {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .theme-text,
  .lang-text {
    display: none;
  }

  .theme-toggle,
  .lang-toggle {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-card {
    min-height: 420px;
    padding: 16px;
  }

  .portrait-frame img {
    height: 300px;
    border-radius: 26px;
  }

  .orbit-one,
  .orbit-two {
    display: none;
  }

  .panel-top {
    top: 72px;
    right: -4px;
  }

  .panel-bottom {
    left: -4px;
    bottom: 62px;
  }

  .slide div {
    padding: 24px 18px;
  }

  .back-to-top {
    left: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* LTR Specific Overrides */
html[dir="ltr"] .skip-link {
  right: auto;
  left: 12px;
}

html[dir="ltr"] .lightbox-close {
  left: auto;
  right: 22px;
}

@media (max-width: 760px) {
  html[dir="ltr"] .slider-prev {
    right: auto;
    left: 18px;
  }

  html[dir="ltr"] .slider-next {
    left: auto;
    right: 18px;
  }
}

/* ========================
   PREMIUM ANIMATIONS
======================== */

/* Cursor Glow Tracker */
.mouse-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(56,189,248,0.12) 0%, rgba(168,85,247,0.07) 42%, transparent 72%);
  transform: translate(-50%, -50%);
  filter: blur(4px);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.mouse-glow.is-visible {
  opacity: 1;
}

/* Float animation for hero visual */
.hero-visual {
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-18px); }
}

/* Animated gradient glow on glass cards hover */
.glass-card {
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.glass-card:hover {
  box-shadow: 0 0 0 1px rgba(56,189,248,0.45), 0 20px 60px rgba(56,189,248,0.15);
  border-color: rgba(56,189,248,0.35);
}

/* Project card shimmer sweep on hover */
.project-card {
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 25%,
    rgba(255,255,255,0.07) 50%,
    transparent 75%
  );
  background-size: 250% 100%;
  background-position: -250% 0;
  pointer-events: none;
  transition: background-position 0s;
}

.project-card:hover::before {
  background-position: 250% 0;
  transition: background-position 0.65s ease;
}

/* Stat card periodic glow pulse */
.stat-card {
  animation: statPulse 3.5s ease-in-out infinite;
}

.stat-card:nth-child(2) { animation-delay: 1.1s; }
.stat-card:nth-child(3) { animation-delay: 2.2s; }

@keyframes statPulse {
  0%, 100% { box-shadow: 0 0 0px 0 rgba(56,189,248,0); }
  50%       { box-shadow: 0 0 24px 4px rgba(56,189,248,0.13); }
}

/* Counter gradient text */
.counter {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Skill cloud tags lift on hover */
.skill-cloud span {
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  cursor: default;
}

.skill-cloud span:hover {
  transform: translateY(-5px) scale(1.08);
  background: rgba(56,189,248,0.2);
  box-shadow: 0 8px 30px rgba(56,189,248,0.22);
  color: #e0f2fe;
}

/* Brand mark soft glow pulse */
.brand-mark {
  animation: brandPulse 4s ease-in-out infinite;
}

@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(56,189,248,0.25); }
  50%       { box-shadow: 0 0 52px rgba(56,189,248,0.55), 0 0 80px rgba(168,85,247,0.25); }
}

/* Page glow ambient drift */
.page-glow-one {
  animation: glowDrift1 10s ease-in-out infinite alternate;
}

.page-glow-two {
  animation: glowDrift2 13s ease-in-out infinite alternate;
}

@keyframes glowDrift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(70px, -50px) scale(1.18); }
}

@keyframes glowDrift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-55px, 55px) scale(1.22); }
}

/* Scroll progress bar shimmer */
.scroll-progress span {
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--gold), var(--cyan));
  background-size: 300% 100%;
  animation: progressShimmer 3s linear infinite;
}

@keyframes progressShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Lightbox card entrance animation */
.lightbox.is-open .lightbox-card {
  animation: lightboxIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.88) translateY(28px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Nav link underline slide from active end */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  inset-inline-start: 14px;
  inset-inline-end: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform: scaleX(0);
  transform-origin: var(--origin, right);
  transition: transform 0.25s ease;
}

html[dir="ltr"] .nav-link::after {
  --origin: left;
}

.nav-link.active::after,
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* Back-to-top button spring on hover */
.back-to-top {
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1), visibility 0.2s ease;
}

.back-to-top.is-visible:hover {
  transform: translateY(-6px) scale(1.12);
}

/* Gallery item entrance stagger */
.gallery-item.reveal.is-visible {
  animation: galleryItemIn 0.5s ease both;
}

@keyframes galleryItemIn {
  from { opacity: 0; transform: scale(0.93) translateY(18px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Eyebrow line reveal */
@keyframes eyebrowExpand {
  from { width: 0; opacity: 0; }
  to   { width: 34px; opacity: 1; }
}

.reveal.is-visible .eyebrow-line {
  animation: eyebrowExpand 0.65s ease 0.2s both;
}

/* Filter button active ripple */
.filter-btn {
  position: relative;
  overflow: hidden;
}

.filter-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(56,189,248,0.32) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: inherit;
}

.filter-btn:active::after {
  opacity: 1;
  transition: opacity 0s;
}

/* Orbit ring animation */
.orbit-one {
  animation: spin 12s linear infinite;
}

.orbit-two {
  animation: spin 16s linear infinite reverse;
}

/* Disable float on smaller screens */
@media (max-width: 980px) {
  .hero-visual {
    animation: none;
  }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-visual,
  .brand-mark,
  .stat-card,
  .page-glow-one,
  .page-glow-two,
  .scroll-progress span,
  .mouse-glow {
    animation: none !important;
    transition: none !important;
  }
}
