/* =========================================================
   Salaheddin Allak Portfolio – Premium Neon Dashboard CSS
   Professional redesign: clean dark UI, better project images,
   smoother cards, stronger spacing, animations, responsive layout.
   Replace your current style.css with this file.
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #070912;
  --bg-2: #0d1020;
  --surface: rgba(14, 20, 37, 0.82);
  --surface-strong: rgba(18, 26, 47, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.055);
  --text: #f5f7ff;
  --muted: #a6b0c9;
  --muted-2: #7f8aa6;
  --line: rgba(181, 195, 230, 0.16);
  --line-strong: rgba(105, 231, 205, 0.34);

  --accent: #69e7cd;
  --accent-2: #8b7cff;
  --accent-3: #ffc36a;
  --accent-4: #ff5f8f;

  --chip: rgba(105, 231, 205, 0.1);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  --shadow-soft: 0 16px 46px rgba(0, 0, 0, 0.3);

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --section-space: 92px;
  --section-space-mobile: 54px;
  --content-max: 1240px;
}

body.dark-mode {
  --bg: #070912;
  --bg-2: #0d1020;
  --surface: rgba(14, 20, 37, 0.82);
  --surface-strong: rgba(18, 26, 47, 0.94);
  --text: #f5f7ff;
  --muted: #a6b0c9;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(139, 124, 255, 0.34), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(105, 231, 205, 0.22), transparent 26%),
    radial-gradient(circle at 70% 82%, rgba(255, 95, 143, 0.12), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg-2) 58%, #04050b);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(105, 231, 205, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 231, 205, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .85), rgba(0, 0, 0, .14));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -9;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.035), transparent);
  transform: translateX(-120%);
  animation: pageLightSweep 9s ease-in-out infinite;
}

@keyframes pageLightSweep {
  0%, 18% { transform: translateX(-120%); opacity: 0; }
  35% { opacity: .32; }
  55%, 100% { transform: translateX(120%); opacity: 0; }
}

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

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

h1,
h2,
h3,
h4,
.brand {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.container {
  width: min(var(--content-max), calc(100% - 36px));
  margin-inline: auto;
}

/* background decoration elements from HTML */
.bg-orb {
  position: fixed;
  z-index: -8;
  border-radius: 999px;
  filter: blur(84px);
  pointer-events: none;
}

.orb-1 {
  width: 360px;
  height: 360px;
  left: -140px;
  top: 140px;
  background: rgba(139, 124, 255, .42);
  animation: orbFloatA 11s ease-in-out infinite alternate;
}

.orb-2 {
  width: 430px;
  height: 430px;
  right: -170px;
  bottom: 120px;
  background: rgba(105, 231, 205, .3);
  animation: orbFloatB 13s ease-in-out infinite alternate;
}

.bg-grid {
  display: none;
}

@keyframes orbFloatA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(34px, -22px, 0) scale(1.08); }
}

@keyframes orbFloatB {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-28px, 28px, 0) scale(1.05); }
}

/* page */
.page-shell {
  padding-bottom: 74px;
}

.page-frame {
  width: 100%;
  margin: 0;
}

.page-frame main {
  padding-top: 116px;
}

/* header */
.site-header {
  position: fixed;
  z-index: 500;
  top: 18px;
  left: 0;
  right: 0;
  background: transparent;
}

.nav.nav-pill {
  position: relative;
  width: min(var(--content-max), calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(105, 231, 205, 0.24);
  border-radius: 999px;
  background: rgba(8, 12, 23, 0.76);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .36);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.nav.nav-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(105,231,205,.16), transparent 28%, rgba(139,124,255,.16));
  opacity: .9;
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--text);
  font-size: .96rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.brand::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.brand span {
  color: var(--accent);
}

.nav-links {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 850;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #04110e;
  background: var(--accent);
  box-shadow: 0 0 24px rgba(105, 231, 205, .28);
  transform: translateY(-1px);
}

.nav-links a::after {
  display: none;
}

.nav-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-switch,
.theme-toggle,
.menu-toggle {
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(181, 195, 230, .2);
  background: rgba(255,255,255,.065);
  color: var(--text);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: .2s ease;
}

.lang-switch:hover,
.theme-toggle:hover,
.menu-toggle:hover {
  border-color: rgba(105,231,205,.5);
  transform: translateY(-1px);
}

.lang-switch {
  min-width: 78px;
  padding: 0 32px 0 13px;
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 11px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.theme-toggle,
.menu-toggle {
  width: 42px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

#themeIcon {
  color: var(--accent-3);
}

/* hero */
.hero-section {
  padding: 42px 0 78px;
  scroll-margin-top: 120px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  padding: clamp(30px, 5.2vw, 72px);
  border: 1px solid rgba(105, 231, 205, 0.26);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(105,231,205,.105), transparent 42%),
    linear-gradient(320deg, rgba(139,124,255,.22), transparent 48%),
    rgba(12, 18, 34, .72);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-lg) - 1px);
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(105,231,205,.16), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 40%);
}

.hero-panel::after {
  content: "JAVA • WEB • API • BACKEND";
  position: absolute;
  right: 28px;
  bottom: 22px;
  color: rgba(245,247,255,.055);
  font-size: clamp(2.4rem, 8vw, 7rem);
  font-weight: 950;
  line-height: .9;
  letter-spacing: -.08em;
  pointer-events: none;
}

.hero-compact {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
  min-height: 520px;
}

.hero-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-avatar-wrap::before,
.hero-avatar-wrap::after {
  content: "";
  position: absolute;
  border-radius: 38px;
  pointer-events: none;
}

.hero-avatar-wrap::before {
  width: min(320px, 78vw);
  height: min(320px, 78vw);
  border: 1px solid rgba(105,231,205,.38);
  background: rgba(105,231,205,.055);
  transform: rotate(7deg);
  animation: avatarFrameA 5.5s ease-in-out infinite alternate;
}

.hero-avatar-wrap::after {
  width: min(265px, 70vw);
  height: min(265px, 70vw);
  border: 1px solid rgba(139,124,255,.45);
  transform: rotate(-8deg);
  animation: avatarFrameB 6s ease-in-out infinite alternate;
}

@keyframes avatarFrameA {
  from { transform: rotate(7deg) translateY(0); }
  to { transform: rotate(10deg) translateY(-10px); }
}

@keyframes avatarFrameB {
  from { transform: rotate(-8deg) translateY(0); }
  to { transform: rotate(-11deg) translateY(8px); }
}

.hero-avatar {
  position: relative;
  z-index: 3;
  width: min(252px, 68vw);
  height: min(252px, 68vw);
  border-radius: 34px;
  object-fit: cover;
  object-position: center;
  border: 3px solid rgba(105,231,205,.9);
  box-shadow:
    20px 20px 0 rgba(139,124,255,.34),
    0 26px 70px rgba(0,0,0,.5);
  filter: saturate(1.08) contrast(1.06);
  transition: transform .28s ease, filter .28s ease;
}

.hero-avatar:hover {
  transform: translateY(-6px) scale(1.025);
  filter: saturate(1.18) contrast(1.08);
}

.hero-main {
  max-width: 780px;
}

.hero-name {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3.1rem, 8.4vw, 6.6rem);
  line-height: .9;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: -.075em;
  color: var(--text);
  text-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.hero-title {
  display: inline-flex;
  margin: 28px 0 0;
  padding: 9px 14px;
  border: 1px solid rgba(105,231,205,.38);
  border-radius: 999px;
  background: rgba(105,231,205,.09);
  color: var(--accent);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 900;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.hero-focus {
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 850;
}

.hero-desc {
  margin: 12px 0 0;
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-location-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 0;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.055);
  font-size: .9rem;
  font-weight: 850;
}

.hero-location-chip svg {
  width: 16px;
  height: 16px;
  color: var(--accent-3);
}

.hero-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.social-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(105,231,205,.26);
  border-radius: 15px;
  background: rgba(255,255,255,.052);
  color: var(--text);
  font-weight: 950;
  transition: .22s ease;
}

.social-icon svg {
  width: 21px;
  height: 21px;
}

.social-icon:hover {
  transform: translateY(-5px) rotate(-3deg);
  color: #04110e;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(105,231,205,.32);
}

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

.btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 950;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  border-color: var(--accent);
  color: #04110e;
  background: var(--accent);
  box-shadow: 0 0 30px rgba(105,231,205,.22);
}

.btn-primary:hover {
  box-shadow: 0 0 44px rgba(105,231,205,.42);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,.045);
}

.btn-secondary:hover {
  border-color: var(--accent-2);
  background: rgba(139,124,255,.16);
}

/* sections */
.section {
  position: relative;
  padding: var(--section-space) 0;
  scroll-margin-top: 112px;
}

.section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(var(--content-max), calc(100% - 36px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(105,231,205,.32), rgba(139,124,255,.25), transparent);
}

.section-heading {
  display: grid;
  gap: 9px;
  margin-bottom: 30px;
}

.section-heading h2 {
  position: relative;
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: -.06em;
}

.section-heading h2::before {
  content: "";
  display: inline-block;
  width: .55em;
  height: .55em;
  margin-right: .18em;
  border: 5px solid var(--accent);
  box-shadow: inset 0 0 0 5px rgba(7,9,18,1), 0 0 22px rgba(105,231,205,.24);
  vertical-align: .02em;
}

.section-lead {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 900;
  font-size: 1.1rem;
}

.section-sub,
.content-card p,
.project-summary {
  color: var(--muted);
}

/* common cards */
.content-card,
.skills-cv-card,
.project-card-modern,
.exp-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(255,255,255,.065), transparent 56%),
    var(--surface);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}

.content-card::before,
.skills-cv-card::before,
.project-card-modern::before,
.exp-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(105,231,205,.65), transparent 34%, rgba(139,124,255,.48));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: .46;
  pointer-events: none;
  z-index: -1;
}

.content-card {
  padding: 26px;
}

.content-card h3 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.45rem;
}

/* about */
.about-layout {
  display: grid;
  grid-template-columns: 1.13fr .87fr;
  gap: 18px;
}

.about-lead {
  margin: 0 0 17px;
  color: var(--text);
  font-weight: 850;
}

.about-points {
  display: grid;
  gap: 11px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.about-points li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}

.about-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 950;
}

.edu-timeline {
  display: grid;
  gap: 14px;
  padding: 0;
}

.edu-timeline::before {
  display: none;
}

.edu-item {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  overflow: hidden;
}

.edu-item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  box-shadow: 0 0 18px rgba(105,231,205,.24);
}

.edu-item h4 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 1.1rem;
}

.edu-item p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.edu-item span {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 950;
}

/* projects */
.projects-grid-modern {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.project-card-modern {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 555px;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.project-card-modern:hover {
  transform: translateY(-10px);
  border-color: rgba(105,231,205,.55);
  box-shadow: 0 26px 70px rgba(0,0,0,.42), 0 0 34px rgba(105,231,205,.1);
}

.project-cover {
  position: relative;
  width: 100%;
  height: 245px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(105,231,205,.18), transparent 56%),
    rgba(255,255,255,.035);
}

.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(7,9,18,.48));
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.36));
  transition: transform .34s ease, filter .34s ease;
}

.project-card-modern:hover .project-cover img {
  transform: scale(1.045);
  filter: drop-shadow(0 22px 32px rgba(0,0,0,.45)) saturate(1.08);
}

/* use this class optionally for screenshot-like tall project images */
.project-cover.project-cover--screenshot img {
  object-fit: cover;
  object-position: top center;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 19px;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-date {
  color: var(--accent-3);
  font-size: .78rem;
  font-weight: 950;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.project-type {
  padding: 5px 9px;
  border: 1px solid rgba(139,124,255,.38);
  border-radius: 999px;
  background: rgba(139,124,255,.14);
  color: var(--text);
  font-size: .72rem;
  font-weight: 950;
}

.project-title {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.25;
}

.project-summary {
  margin: 0;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-tech span,
.skill-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(105,231,205,.2);
  border-radius: 999px;
  background: rgba(105,231,205,.075);
  color: var(--text);
  font-size: .78rem;
  font-weight: 850;
}

.project-tech span:hover,
.skill-tag:hover {
  border-color: var(--accent);
  background: rgba(105,231,205,.13);
}

/* experience */
#experience .exp-timeline {
  position: relative;
  display: grid;
  gap: 20px;
  padding-left: 0;
  --exp-date-col: 185px;
  --exp-marker-col: 24px;
  --exp-gap: 18px;
}

#experience .exp-timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--exp-date-col) + var(--exp-gap) + 10px);
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(transparent, var(--accent), var(--accent-2), transparent);
}

#experience .exp-item {
  display: grid;
  grid-template-columns: var(--exp-date-col) var(--exp-marker-col) 1fr;
  gap: var(--exp-gap);
  align-items: start;
}

#experience .exp-date {
  color: var(--accent-3);
  font-weight: 950;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.35;
}

#experience .exp-dot {
  width: 17px;
  height: 17px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(105,231,205,.12), 0 0 26px rgba(105,231,205,.56);
  justify-self: center;
}

#experience .exp-card {
  padding: 24px;
  transition: transform .24s ease, border-color .24s ease;
}

#experience .exp-card:hover {
  transform: translateX(8px);
  border-color: rgba(105,231,205,.48);
}

#experience .exp-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

#experience .exp-org {
  margin: 5px 0 13px;
  color: var(--accent);
  font-weight: 950;
}

#experience .exp-points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
}

/* skills */
.skills-cv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.skills-cv-card {
  padding: 21px;
  overflow: hidden;
  transition: transform .24s ease, border-color .24s ease;
}

.skills-cv-card:hover {
  transform: translateY(-8px);
  border-color: rgba(105,231,205,.48);
}

.skills-cv-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.skills-cv-head h3 {
  margin: 0;
  font-size: 1.08rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* focus / certifications */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.certifications-grid .content-card {
  min-height: 210px;
  transition: transform .24s ease, border-color .24s ease;
}

.certifications-grid .content-card:hover {
  transform: translateY(-8px);
  border-color: rgba(105,231,205,.48);
}

/* contact */
.contact-card-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 28px;
}

.contact-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 17px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(105,231,205,.25);
  border-radius: 999px;
  background: rgba(105,231,205,.08);
  color: var(--text);
  font-weight: 900;
}

.contact-links-grid {
  display: grid;
  gap: 11px;
}

.contact-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.052);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.contact-link-card:hover {
  transform: translateX(8px);
  border-color: var(--accent);
  background: rgba(105,231,205,.09);
}

.contact-link-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.contact-link-label {
  color: var(--muted-2);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.contact-link-value {
  color: var(--text);
  font-weight: 850;
  overflow-wrap: anywhere;
}

/* footer + back */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 220;
  width: 50px;
  height: 50px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 18px;
  background: var(--accent);
  color: #04110e;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 0 34px rgba(105,231,205,.28);
  transition: transform .2s ease;
}

.back-to-top.show {
  display: inline-flex;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(34px) scale(.985);
  transition: opacity .75s ease, transform .75s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* small stagger without JS changes */
.projects-grid-modern .reveal:nth-child(2),
.skills-cv-grid .reveal:nth-child(2),
.certifications-grid .reveal:nth-child(2) {
  transition-delay: .08s;
}

.projects-grid-modern .reveal:nth-child(3),
.skills-cv-grid .reveal:nth-child(3),
.certifications-grid .reveal:nth-child(3) {
  transition-delay: .16s;
}

.projects-grid-modern .reveal:nth-child(4),
.skills-cv-grid .reveal:nth-child(4) {
  transition-delay: .24s;
}

/* responsive */
@media (max-width: 1120px) {
  .hero-compact {
    grid-template-columns: 280px 1fr;
  }

  .projects-grid-modern,
  .skills-cv-grid,
  .certifications-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-layout,
  .contact-card-modern {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .page-frame main {
    padding-top: 98px;
  }

  .nav.nav-pill {
    grid-template-columns: 1fr auto;
    border-radius: 24px;
  }

  .brand {
    font-size: .9rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(8,12,23,.96);
    backdrop-filter: blur(16px);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
  }

  .hero-panel {
    min-height: auto;
  }

  .hero-compact {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-main {
    margin-inline: auto;
  }

  .hero-name {
    max-width: none;
  }

  .hero-title,
  .hero-location-chip {
    align-self: center;
  }

  .hero-socials,
  .hero-actions {
    justify-content: center;
  }

  #experience .exp-timeline::before {
    display: none;
  }

  #experience .exp-item {
    grid-template-columns: 1fr;
  }

  #experience .exp-date {
    text-align: left;
  }

  #experience .exp-dot {
    display: none;
  }

  #experience .exp-card:hover {
    transform: translateY(-6px);
  }
}

@media (max-width: 650px) {
  :root {
    --section-space: var(--section-space-mobile);
  }

  .container,
  .nav.nav-pill {
    width: min(100% - 24px, var(--content-max));
  }

  .nav.nav-pill {
    padding: 10px;
  }

  .brand {
    max-width: 168px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: .11em;
  }

  .lang-switch,
  .theme-toggle,
  .menu-toggle {
    height: 38px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 38px;
  }

  .hero-section {
    padding-top: 28px;
  }

  .hero-panel {
    padding: 24px 16px 34px;
    border-radius: 22px;
  }

  .hero-panel::after {
    font-size: 2.3rem;
    right: 12px;
    bottom: 10px;
  }

  .hero-name {
    font-size: clamp(2.55rem, 15vw, 4.1rem);
  }

  .hero-title {
    margin-top: 20px;
  }

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

  .projects-grid-modern,
  .skills-cv-grid,
  .certifications-grid {
    grid-template-columns: 1fr;
  }

  .project-card-modern {
    min-height: auto;
  }

  .project-cover {
    height: 220px;
  }

  .contact-link-card {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

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

/* ===== Premium Blue / Gold Redesign Override ===== */

:root {
  --bg: #0b1020;
  --bg-2: #111827;
  --surface: rgba(18, 28, 51, 0.88);
  --surface-strong: rgba(24, 36, 65, 0.96);
  --text: #f8fafc;
  --muted: #b6c2d9;
  --line: rgba(255, 255, 255, 0.14);
  --card-border: rgba(245, 158, 11, 0.35);
  --accent: #f59e0b;
  --accent-2: #38bdf8;
  --accent-3: #a78bfa;
  --chip: rgba(56, 189, 248, 0.12);
}

body {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 34%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(135deg, #0b1020, #111827 55%, #020617) !important;
}

.theme-toggle {
  display: none !important;
}

.nav.nav-pill {
  border-color: rgba(245, 158, 11, 0.35) !important;
  background: rgba(11, 16, 32, 0.82) !important;
}

.brand {
  border-left-color: var(--accent) !important;
}

.brand span,
.section-heading h2::before,
.about-points li::before,
.edu-item span,
.project-date,
#experience .exp-org {
  color: var(--accent) !important;
}

.nav-links a:hover,
.nav-links a.active,
.btn-primary,
.back-to-top {
  background: linear-gradient(135deg, var(--accent), #facc15) !important;
  color: #111827 !important;
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), transparent 40%),
    linear-gradient(315deg, rgba(245, 158, 11, 0.16), transparent 44%),
    rgba(15, 23, 42, 0.9) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.hero-avatar {
  border-color: var(--accent) !important;
  box-shadow:
    18px 18px 0 rgba(56, 189, 248, 0.22),
    0 26px 60px rgba(0, 0, 0, 0.45) !important;
}

.project-card-modern,
.content-card,
.skills-cv-card,
.exp-card {
  border-color: rgba(255, 255, 255, 0.13) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 60%),
    rgba(18, 28, 51, 0.88) !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card-modern:hover,
.skills-cv-card:hover,
.content-card:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.55) !important;
  box-shadow: 0 24px 60px rgba(245, 158, 11, 0.12);
}

.project-cover {
  height: 260px !important;
  padding: 16px !important;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.14), transparent 60%),
    rgba(255, 255, 255, 0.04) !important;
}

.project-cover img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 12px;
}

.project-body {
  min-height: 250px;
}

.project-title {
  color: #ffffff !important;
}

.project-tech span,
.skill-tag {
  border-color: rgba(56, 189, 248, 0.28) !important;
  background: rgba(56, 189, 248, 0.09) !important;
}

.social-icon:hover,
.contact-link-card:hover {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ===== Language Switch Fix ===== */

.lang-switch {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: rgba(20, 28, 48, 0.95);
  color: #ffffff;

  border: 2px solid rgba(245, 158, 11, 0.5);
  border-radius: 18px;

  padding: 12px 44px 12px 18px;
  min-width: 88px;

  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;

  transition: 0.25s ease;
  outline: none;

  box-shadow:
    0 0 0 3px rgba(245, 158, 11, 0.08),
    0 10px 25px rgba(0,0,0,0.25);

  background-image:
    linear-gradient(45deg, transparent 50%, #f59e0b 50%),
    linear-gradient(135deg, #f59e0b 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.lang-switch:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow:
    0 14px 30px rgba(245, 158, 11, 0.15);
}

.lang-switch:focus {
  border-color: #38bdf8;
}

.lang-switch option {
  background: #111827;
  color: white;
  font-weight: 600;
  padding: 10px;
}


........

@media (max-width: 768px) {
  .brand {
    font-size: 0;
  }

  .brand::before {
    content: "SALAHEDDIN";
    font-size: 1rem;
    font-weight: 800;
  }

  .brand span {
    font-size: 1rem !important;
  }
}

/* ===== MOBILE HEADER FIX ===== */

@media (max-width: 768px) {

  .nav.nav-pill {
    padding: 12px 14px !important;
    gap: 10px;
    border-radius: 26px;
  }

  .brand {
    font-size: 1.15rem !important;
    letter-spacing: 1px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }

  .brand span {
    display: inline !important;
  }

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

  .lang-switch {
    min-width: 72px !important;
    height: 50px !important;
    font-size: 0.95rem !important;
    padding: 10px 34px 10px 14px !important;
    border-radius: 18px !important;
    background-position:
      calc(100% - 18px) center,
      calc(100% - 13px) center !important;
  }

  .menu-toggle {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .nav-links {
    top: 90px !important;
    left: 12px;
    right: 12px;
    width: auto !important;
    border-radius: 24px;
  }
}