@font-face {
  font-family: janna;
  src: url('janna/bahij-janna-regular.ttf');
  font-display: swap;
}
@font-face {
  font-family: helvetic;
  src: url('Bahij Helvetica Neue-Roman.ttf');
  font-display: swap;
}

html[ data-lang="ps"] {
  font-size: 18px;
}

/* ===== CSS VARIABLES ===== */
:root {
  --primary-bg: #1a1a2e;
  --secondary-bg: #16213e;
  --card-bg: rgba(22, 33, 62, 0.8);
  --accent-1: hsl(168, 100%, 48%);
  --accent-2: #e94560;

  --accent-1-tr: hsla(168, 100%, 48%, 0.233);
  --accent-2-tr: hsla(350, 79%, 59%, 0.233);

  --red: #e94560;
  --yellow: #febc2e;
  --yellow-2: #f0c674;
  --orange: #ff973d;

  --green: #28c840;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-color: rgba(160, 160, 160, 0.15);
  --nav-bg: rgba(26, 26, 46, 0.92);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s ease;
  --radius: 12px;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  /* --font-pashto: helvetic, janna, 'Noto Nastaliq Urdu', 'JetBrains Mono', serif; */
}

 [data-theme="light"] {
   --primary-bg: #f0f4f8;
  --secondary-bg: #e2e8f0;
    --accent-1: hsl(168, 100%, 32%);
  --accent-2: #e94560;

  --accent-1-tr: hsla(168, 76%, 31%, 0.242);
  --accent-2-tr: hsla(350, 79%, 59%, 0.233);

  --yellow-2: #cf9831;
  --orange: #ff7600;
  --card-bg: rgba(255, 255, 255, 0.9);
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --border-color: rgba(26, 26, 46, 0.12);
  --nav-bg: rgba(240, 244, 248, 0.95);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1); 
  --primary-bg: #f0f4f8;
  --secondary-bg: #e2e8f0;
  --card-bg: rgba(255, 255, 255, 0.9);
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --border-color: rgba(26, 26, 46, 0.12);
  --nav-bg: rgba(240, 244, 248, 0.95);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1); 
}  





/* =========================================================
   DYNAMIC MULTI-THEME DESIGN SYSTEM
   3 LIVE THEMES + SMOOTH TRANSITIONS
========================================================= */

/* =========================================================
   GLOBAL TRANSITIONS
========================================================= */

*,
*::before,
*::after {
  transition:
    background-color .45s ease,
    color .45s ease,
    border-color .45s ease,
    box-shadow .45s ease,
    transform .35s ease,
    opacity .35s ease,
    backdrop-filter .45s ease;
}

/* =========================================================
   BASE VARIABLES
========================================================= */

:root {

  --radius: 18px;
  --radius-lg: 28px;

  --blur: blur(18px);

  --transition:
    all .4s cubic-bezier(.22,1,.36,1);

  --font-main:
    Inter,
    system-ui,
    sans-serif;

  --font-mono:
    "JetBrains Mono",
    monospace;

  --shadow:
    0 12px 40px rgba(0,0,0,.35);

  --shadow-lg:
    0 20px 60px rgba(0,0,0,.45);
}

/* =========================================================
   THEME 1 — CYBER BLUE
========================================================= */

[data-theme="cyber"] {

  --primary-bg: #070b17;
  --secondary-bg: #10182c;

  --card-bg: rgba(16,24,44,.72);

  --accent-1: hsl(189, 100%, 50%);
  --accent-2: #7c4dff;
  --accent-3: #00ffb3;
  
  
  --accent-1-hsl:189, 100%, 50%;
  --accent-2-hsl: 256, 100%, 65%;
  --accent-3-hsl: 162, 100%, 50%;
  


  --text-primary: #ffffff;
  --text-secondary: #9db0cc;

  --border-color: rgba(255,255,255,.08);

  --gradient-main:
    linear-gradient(
      135deg,
      #00d9ff,
      #7c4dff,
      #00ffb3
    );

  --nav-bg: rgba(7,11,23,.75);

  --glow:
    0 0 40px rgba(124,77,255,.22);
}

/* =========================================================
   THEME 2 — SUNSET ORANGE
========================================================= */

[data-theme="sunset"] {

  --primary-bg: #1a120b;
  --secondary-bg: #2d1b12;

  --card-bg: rgba(45,27,18,.72);

  --accent-1: #ff8c42;
  --accent-2: #ffb347;
  --accent-3: #ff5e78;

  --text-primary: #fff7f0;
  --text-secondary: #d9b8a7;

  --border-color: rgba(255,255,255,.07);

  --gradient-main:
    linear-gradient(
      135deg,
      #ff8c42,
      #ffb347,
      #ff5e78
    );

  --nav-bg: rgba(26,18,11,.75);

  --glow:
    0 0 40px rgba(255,140,66,.22);
}

/* =========================================================
   THEME 3 — EMERALD LUXE
========================================================= */

[data-theme="emerald"] {

  --primary-bg: #071511;
  --secondary-bg: #0f241d;

  --card-bg: rgba(15,36,29,.72);

  --accent-1: #00d68f;
  --accent-2: #00b894;
  --accent-3: #7dffcf;

  --text-primary: #f4fff9;
  --text-secondary: #9fc9bb;

  --border-color: rgba(255,255,255,.08);

  --gradient-main:
    linear-gradient(
      135deg,
      #00d68f,
      #00b894,
      #7dffcf
    );

  --nav-bg: rgba(7,21,17,.75);

  --glow:
    0 0 40px rgba(0,214,143,.22);
}

/* =========================================================
   BODY
========================================================= */

body {

  background:
    radial-gradient(
      circle at top left,
      rgba(255,255,255,.05),
      transparent 30%
    ),
    var(--primary-bg);

  color: var(--text-primary);

  font-family: var(--font-main);

  transition: var(--transition);
}

/* =========================================================
   NAVBAR
========================================================= */

.navbar {

  background: var(--nav-bg);

  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);

  border-bottom:
    1px solid var(--border-color);

  box-shadow: var(--shadow);
}

/* =========================================================
   CARD
========================================================= */

.card {

  background: var(--card-bg);

  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);

  border:
    1px solid var(--border-color);

  border-radius: var(--radius);

  box-shadow:
    var(--shadow);

  position: relative;

  overflow: hidden;
}

/* animated glow border */
.card::before {

  content: "";

  position: absolute;
  inset: -1px;

  background: var(--gradient-main);

  opacity: 0;

  transition: .5s ease;

  z-index: 0;

  filter: blur(30px);
}

/* live hover animation */
.card:hover {

  transform:
    translateY(-8px)
    scale(1.015);

  box-shadow:
    var(--shadow-lg),
    var(--glow);
}

.card:hover::before {
  opacity: .18;
}

/* card content */
.card > * {
  position: relative;
  z-index: 1;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn-primary {

  background: var(--gradient-main);

  color: white;

  border: none;

  border-radius: 14px;

  padding: 14px 24px;

  font-weight: 600;

  cursor: pointer;

  position: relative;

  overflow: hidden;

  box-shadow:
    0 10px 30px rgba(0,0,0,.25);

  transition: var(--transition);
}

/* moving shine */
.btn-primary::before {

  content: "";

  position: absolute;

  top: 0;
  left: -120%;

  width: 100%;
  height: 100%;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.35),
      transparent
    );

  transition: .8s;
}

.btn-primary:hover::before {
  left: 120%;
}

.btn-primary:hover {

  transform:
    translateY(-3px)
    scale(1.03);

  box-shadow:
    0 20px 50px rgba(0,0,0,.35),
    var(--glow);
}

/* =========================================================
   INPUTS
========================================================= */

input,
textarea,
select {

  background:
    rgba(255,255,255,.04);

  border:
    1px solid var(--border-color);

  color:
    var(--text-primary);

  border-radius:
    14px;

  padding:
    14px 16px;

  transition:
    var(--transition);
}

/* focus */
input:focus,
textarea:focus,
select:focus {

  outline: none;

  border-color:
    var(--accent-2);

  box-shadow:
    0 0 0 4px rgba(255,255,255,.05),
    var(--glow);
}

/* =========================================================
   LINKS
========================================================= */

a {

  color:
    var(--accent-1);

  transition:
    var(--transition);
}

a:hover {

  color:
    var(--accent-3);

  text-shadow:
    var(--glow);
}

/* =========================================================
   LIVE BACKGROUND ORBS
========================================================= */

body::before,
body::after {

  content: "";

  position: fixed;

  width: 400px;
  height: 400px;

  border-radius: 50%;

  filter: blur(100px);

  z-index: -1;

  opacity: .15;

  animation:
    float 14s ease-in-out infinite;
}

body::before {

  top: -100px;
  left: -100px;

  background:
    var(--accent-1);
}

body::after {

  bottom: -120px;
  right: -120px;

  background:
    var(--accent-2);

  animation-delay: 4s;
}

/* floating animation */
@keyframes float {

  0%,100% {
    transform:
      translateY(0)
      translateX(0);
  }

  50% {
    transform:
      translateY(30px)
      translateX(20px);
  }
}



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

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

body {
  font-family: var(--font-mono);
  background-color: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

[data-lang="ps"] body,
[data-lang="ps"] {
  font-family: var(--font-pashto);
  direction: rtl;
}

[data-lang="en"] {
  direction: ltr;
  font-family: var(--font-mono);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

::selection {
  background-color: var(--accent-1-tr);
  /* color: var(--accent-1); */
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--secondary-bg); }
::-webkit-scrollbar-thumb { background: var(--accent-1); border-radius: 3px; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.logo-bracket { color: var(--accent-1); }
.logo-name { color: var(--text-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-lang="ps"] .nav-links { flex-direction: row-reverse; }

.nav-link {
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
  font-weight: 500;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%; right: 50%;
  height: 2px;
  background: var(--accent-1);
  transition: var(--transition);
  border-radius: 1px;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-1);
}

.nav-link:hover::after, .nav-link.active::after {
  left: 14px; right: 14px;
}

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

.theme-toggle, .lang-toggle {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: var(--font-mono);
  font-weight: 600;
}

.theme-toggle:hover, .lang-toggle:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 100px 24px 60px;
  gap: 60px;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
}

[data-theme="light"] .hero-bg-grid {
  background-image: linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}

.glow-1 {
  width: 400px; height: 400px;
  background: rgba(0, 245, 195, 0.12);
  top: 10%; left: -5%;
}

.glow-2 {
  width: 350px; height: 350px;
  background: rgba(233, 69, 96, 0.1);
  bottom: 10%; right: -5%;
}

.hero-content, .hero-visual {
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent-1);
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-1) 50%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--accent-2);
  margin-bottom: 20px;
  font-weight: 600;
  min-height: 2rem;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--accent-1);
}

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

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

[data-lang="ps"] .hero-buttons { flex-direction: row-reverse; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent-1);
  color: var(--primary-bg);
  border-color: var(--accent-1);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 245, 195, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-outline:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

.hero-social {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

[data-lang="ps"] .hero-social { flex-direction: row-reverse; }

.social-link {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-link:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 245, 195, 0.2);
}

.hero-visual {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.code-card {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  width: 320px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.code-card:hover {
  border-color: rgba(0, 245, 195, 0.3);
  box-shadow: 0 0 40px rgba(0, 245, 195, 0.1);
  transform: translateY(-4px);
}

.code-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}

.dot-red   { background: var(--red); }
.dot-yellow{ background: var(--yellow); }
.dot-green { background: var(--green); }

.code-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
}

.c-k { color: var(--accent-2); }
.c-v { color: var(--accent-1); }
.c-p { color: var(--text-primary); }
.c-s { color: var(--orange); }
.c-b { color: var(--red); }

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
  animation: bounce 2s infinite;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== SECTIONS ===== */
.section { padding: 100px 24px; }

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent-1);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.section-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  margin: 0 auto;
  border-radius: 2px;
}

/* ===== ABOUT ===== */
.about-section { background: var(--secondary-bg); }

[data-theme="light"] .about-section {
  background: rgba(226, 232, 240, 0.5);
}

.about-grid {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}

[data-lang="ps"] .about-grid { flex-direction: row-reverse; }

.about-avatar-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.about-avatar {
  position: relative;
  width: 200px; height: 200px;
}

.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  animation: spin 12s linear infinite;
}

.ring-1 {
  inset: 0;
  border-color: rgba(0, 245, 195, 0.3);
  animation-duration: 10s;
}

.ring-2 {
  inset: 12px;
  border-color: rgba(233, 69, 96, 0.2);
  animation-duration: 16s;
  animation-direction: reverse;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.avatar-core {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--accent-1);
}

.avatar-stats {
  display: flex;
  gap: 20px;
}

.astat {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.astat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-1);
  line-height: 1;
}

.astat span { font-size: 1.2rem; font-weight: 800; color: var(--accent-1); }

.astat small {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.about-content { flex: 1; }

.about-hello {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.about-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.9;
  margin-bottom: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin: 24px 0;
  padding: 20px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.info-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.info-label {
  font-size: 0.8rem;
  color: var(--accent-1);
  font-weight: 600;
  white-space: nowrap;
}

.info-val {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.badge-green {
  color: var(--accent-1);
  font-weight: 600;
}

.about-btns {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

[data-lang="ps"] .about-btns { flex-direction: row-reverse; }

/* ===== EXPERIENCE ===== */
.timeline { position: relative; padding: 0 0 0 60px; }

[data-lang="ps"] .timeline { padding: 0 60px 0 0; }

.tl-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 20px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-2), transparent);
}

[data-lang="ps"] .tl-line { left: auto; right: 20px; }

.tl-item {
  position: relative;
  margin-bottom: 48px;
}

.tl-dot {
  position: absolute;
  top: 20px;
  left: -50px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--secondary-bg);
  border: 2px solid var(--accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-1);
  font-size: 0.9rem;
  box-shadow: 0 0 20px rgba(0, 245, 195, 0.2);
}

[data-lang="ps"] .tl-dot { left: auto; right: -50px; }

.tl-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.tl-card:hover {
  border-color: rgba(0, 245, 195, 0.3);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

[data-lang="ps"] .tl-card:hover { transform: translateX(-4px); }

.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tl-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tl-date {
  font-size: 0.78rem;
  color: var(--accent-1);
  background: rgba(0, 245, 195, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 600;
}

.tl-company {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tl-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

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

[data-lang="ps"] .tl-tags { flex-direction: row-reverse; }

.tag {
  font-size: 0.75rem;
  padding: 4px 12px;
  background: rgba(0, 245, 195, 0.08);
  border: 1px solid rgba(0, 245, 195, 0.2);
  border-radius: 20px;
  color: var(--accent-1);
  font-family: 'JetBrains Mono', monospace;
  direction: ltr;
}

/* ===== PROJECTS ===== */
.projects-section { background: var(--secondary-bg); }

[data-theme="light"] .projects-section {
  background: rgba(226, 232, 240, 0.5);
}

.filter-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 8px 24px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--primary-bg);
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: rgba(0, 245, 195, 0.08);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.project-card:hover {
  border-color: rgba(0, 245, 195, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

.project-card.hidden { display: none; }

.proj-img {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.proj-img img{
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.proj-icon {
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
}

.proj-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: var(--transition);
}

.proj-img:hover .proj-overlay { opacity: 1; }
.proj-img:hover .proj-icon { transform: scale(0.85); opacity: 0.4; }

.proj-overlay a {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: var(--transition);
}

.proj-overlay a:hover {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: var(--primary-bg);
}

.proj-info { padding: 24px; }

.proj-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.proj-cat {
  font-size: 0.75rem;
  color: var(--accent-1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.proj-links {
  display: flex;
  gap: 12px;
}

.proj-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: var(--transition);
}

.proj-links a:hover { color: var(--accent-1); }

.proj-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
  line-height: 1.4;
}

.proj-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

[data-lang="ps"] .proj-tech { flex-direction: row-reverse; }

.proj-tech span {
  font-size: 0.72rem;
  padding: 3px 10px;
  background: rgba(0, 245, 195, 0.06);
  border: 1px solid rgba(0, 245, 195, 0.15);
  border-radius: 12px;
  color: var(--accent-1);
  font-family: 'JetBrains Mono', monospace;
  direction: ltr;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.skill-cat {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.skill-cat:hover {
  border-color: rgba(0, 245, 195, 0.3);
  box-shadow: var(--shadow);
}

.cat-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--accent-1);
  letter-spacing: 0.02em;
}

.skill-bars { display: flex; flex-direction: column; gap: 18px; }

.skill-item { }

.sk-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.sk-info span:first-child {
  color: var(--text-primary);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  direction: ltr;
}

.sk-info span:last-child { color: var(--accent-1); font-weight: 600; }

.sk-track {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.sk-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 10px;
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: default;
}

.tool-item:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-3px);
}

.tool-item i { font-size: 1.8rem; color: var(--text-secondary); transition: var(--transition); }
.tool-item:hover i { color: var(--accent-1); }
.tool-item span { font-size: 0.72rem; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }

/* ===== CONTACT ===== */
.contact-section { background: var(--secondary-bg); }

[data-theme="light"] .contact-section {
  background: rgba(226, 232, 240, 0.5);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 40rem;
  gap: 64px;
  align-items: start;
  margin: 0 auto;
}

[data-lang="ps"] .contact-grid { direction: rtl; }

.contact-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 32px;
}

.contact-methods { display: flex; flex-direction: column; gap: 16px; }

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.contact-method:hover {
  border-color: var(--accent-1);
  transform: translateX(4px);
}

[data-lang="ps"] .contact-method:hover { transform: translateX(-4px); }

.cm-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(0, 245, 195, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent-1);
  flex-shrink: 0;
}

.cm-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cm-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.cm-val {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  direction: ltr;
}

.contact-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  transition: var(--transition);
  resize: vertical;
  outline: none;
  backdrop-filter: blur(10px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(160, 160, 160, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(0, 245, 195, 0.1);
}

.form-success {
  text-align: center;
  font-size: 0.88rem;
  color: var(--accent-1);
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 245, 195, 0.08);
  border: 1px solid rgba(0, 245, 195, 0.2);
  display: none;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-bg);
  border-top: 1px solid var(--border-color);
  padding: 48px 24px 32px;
}

.footer-wrap { max-width: 1100px; margin: 0 auto; }

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
}

.footer-logo { font-size: 1.2rem; font-weight: 700; }

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-2px);
}

.footer-divider {
  height: 1px;
  background: var(--border-color);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--accent-1);
  color: var(--primary-bg);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0, 245, 195, 0.3);
}

.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-grid {
    flex-direction: column;
    align-items: center;
  }

  [data-lang="ps"] .about-grid { flex-direction: column; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: -380px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 60px);
    flex-direction: column;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    gap: 4px;
    /* transform: translateY(-130%); */
    transition: transform 0.35s ease;
    z-index: 999;
  }

  [data-lang="ps"] .nav-links { flex-direction: column; }

  .nav-links.open { 

     top: 80px;
   }

  .nav-link { padding: 12px 16px; width: 100%; text-align: center; }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 100px 20px 60px;
    gap: 40px;
  }

  [data-lang="ps"] .hero { text-align: center; }

  .hero-buttons, .hero-social {
    justify-content: center;
    flex-direction: row;
  }

  /* .hero-visual { display: none; } */

  .section { padding: 70px 20px; }

  .timeline { padding: 0 0 0 48px; }
  [data-lang="ps"] .timeline { padding: 0 48px 0 0; }

  .tl-dot { left: -44px; }
  [data-lang="ps"] .tl-dot { left: auto; right: -44px; }

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

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

  .back-to-top { bottom: 20px; right: 20px; }
}

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

  .hero-name { font-size: 2rem; }

  .code-card { width: 100%; max-width: 300px; }

  .avatar-stats { flex-wrap: wrap; justify-content: center; }

  .about-avatar { width: 160px; height: 160px; }

  .footer-top { flex-direction: column; text-align: center; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .contact-grid { gap: 28px; }

  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
