/* =========================================================
   TOKENS
   ========================================================= */
:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-2: #ecefe9;
  --text: #171b19;
  --text-muted: #5c6b63;
  --border: #dde1d9;
  --accent: #1f6f5c;
  --accent-text: #ffffff;
  --accent-soft: #e3efe9;
  --status-planned: #a3743f;
  --status-planned-soft: #f3e7d8;
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.04), 0 8px 24px rgba(20, 30, 25, 0.05);
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --font-display: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif;
  --font-body: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif;
  --font-mono: "IBM Plex Mono", "IBM Plex Sans Arabic", monospace;
}

html[data-theme="dark"] {
  --bg: #10140f;
  --surface: #171d18;
  --surface-2: #1e2620;
  --text: #e7ece7;
  --text-muted: #8fa098;
  --border: #29342c;
  --accent: #55c2a3;
  --accent-text: #0b1512;
  --accent-soft: #1a2b25;
  --status-planned: #e0a25c;
  --status-planned-soft: #2c2317;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[lang="ar"] {
  --font-display: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
}

html[lang="ar"] .eyebrow { letter-spacing: 0; }

section { padding: 88px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; font-weight: 600; }

h2.section-title {
  font-size: clamp(26px, 3.4vw, 34px);
  margin-bottom: 36px;
  letter-spacing: -0.01em;
}

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand{
display:flex;
align-items:center;
gap:12px;

font-family:var(--font-mono);
font-size:15px;
}

.brand-logo{

width:34px;

height:34px;

border-radius:10px;

box-shadow:0 0 18px rgba(85,194,163,.35);

transition:.3s;

}

.brand-logo:hover{

transform:rotate(8deg) scale(1.08);

}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
}

.nav-links a { color: var(--text-muted); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }

.topbar-controls { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 17px; height: 17px; }

.lang-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 0 12px;
  height: 36px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.lang-btn:hover { border-color: var(--accent); }

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

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding: 72px 0 96px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-role {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-muted);
  margin-bottom: 10px;
}

.hero-learning {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 30px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--radius-s);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }

/* Terminal */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

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

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-inline-start: 6px;
}

.terminal-body {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 20px;
  min-height: 190px;
}

.term-line { margin-bottom: 14px; }
.term-line:last-child { margin-bottom: 0; }

.term-prompt { color: var(--accent); }
.term-prompt::before { content: "$ "; opacity: 0.6; }
.term-output { color: var(--text-muted); margin-top: 4px; white-space: pre-wrap; }

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  margin-inline-start: 4px;
  vertical-align: -2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.photo-card {
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.photo-card img { aspect-ratio: 1 / 1; object-fit: cover; }

.photo-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
}

.about-bio { font-size: 17px; color: var(--text); max-width: 62ch; }

/* =========================================================
   SKILLS
   ========================================================= */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 22px;
  box-shadow: var(--shadow);
}

.skill-cat {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--accent);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  transition: .25s;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.skill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill-info i {
  font-size: 30px;
}

.skill-info span {
  font-size: 15px;
  font-weight: 600;
}

.skill-percent {
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.progress {
  width: 100%;
  height: 9px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  transition: width .8s ease;
}

@media(max-width:860px){

.skills-grid{

grid-template-columns:1fr;

}

}

/* =========================================================
   PROJECTS
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card.is-planned {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

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

.project-name { font-family: var(--font-mono); font-size: 16.5px; font-weight: 600; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.status-badge.planned { background: var(--status-planned-soft); color: var(--status-planned); }
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.project-desc { color: var(--text-muted); font-size: 14.5px; flex-grow: 1; }

.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 4px;
}

.project-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-link svg { width: 13px; height: 13px; transition: transform 0.15s ease; }
.project-link:hover svg { transform: translate(2px, -2px); }
html[dir="rtl"] .project-link:hover svg { transform: translate(-2px, -2px); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.contact-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-s);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 19px; height: 19px; }

.contact-label { font-size: 14px; font-weight: 500; }
.contact-value {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  word-break: break-all;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  padding: 32px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}
/* =========================================================
   ACHIEVEMENTS
   ========================================================= */

#achievements {
  padding: 40px 0;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.achievement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.achievement-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.achievement-value {
  font-size: 34px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.achievement-title {
  font-size: 14px;
  color: var(--text-muted);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .photo-card { max-width: 220px; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 56px 0; }
}

@media (max-width: 520px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ==========================
   Custom Scrollbar
========================== */

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:var(--bg);
}

::-webkit-scrollbar-thumb{
    background:var(--accent);
    border-radius:20px;
    border:2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover{
    opacity:.8;
}

.back-to-top{

position:fixed;

right:25px;

bottom:25px;

width:48px;

height:48px;

border:none;

border-radius:50%;

background:var(--accent);

color:white;

font-size:22px;

cursor:pointer;

display:none;

align-items:center;

justify-content:center;

box-shadow:var(--shadow);

transition:.3s;

z-index:999;

}

.back-to-top:hover{

transform:translateY(-4px);

}

.back-to-top.show{

display:flex;

}

.nav-links a.active{

color:var(--accent);

font-weight:600;

position:relative;

}

.nav-links a.active::after{

content:"";

position:absolute;

left:0;

bottom:-8px;

width:100%;

height:2px;

background:var(--accent);

}