/* ================================================================
   KAMAN.PORTFOLIO — Dark/Light · RTL-aware · Animated
   ================================================================ */

:root, [data-theme="dark"] {
  --bg: #07080f;
  --bg-soft: #0d0f1a;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-hover: rgba(255, 255, 255, 0.07);
  --text: #e8eaf6;
  --text-soft: #9aa0b8;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --accent-3: #ff5c8a;
  --gradient: linear-gradient(135deg, #7c5cff 0%, #00d4ff 50%, #ff5c8a 100%);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(7, 8, 15, 0.75);
  --orb-opacity: 0.35;
  --grid-color: rgba(255, 255, 255, 0.03);
  --code-bg: #0a0c16;
}

[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-soft: #e9ebf5;
  --card: rgba(255, 255, 255, 0.75);
  --card-border: rgba(20, 24, 60, 0.1);
  --card-hover: rgba(255, 255, 255, 0.95);
  --text: #171a2e;
  --text-soft: #5a6080;
  --accent: #6a48ff;
  --accent-2: #0099cc;
  --accent-3: #e64477;
  --glass-shadow: 0 8px 32px rgba(30, 34, 90, 0.1);
  --nav-bg: rgba(244, 245, 251, 0.8);
  --orb-opacity: 0.22;
  --grid-color: rgba(20, 24, 60, 0.04);
  --code-bg: #171a2e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
  transition: background 0.4s ease, color 0.4s ease;
}

html[lang="en"] body { font-family: 'Space Grotesk', 'Vazirmatn', sans-serif; }
html[lang="fa"] body, html[lang="ar"] body { font-family: 'Vazirmatn', sans-serif; }

::selection { background: var(--accent); color: #fff; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; height: auto; }
.accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--glass-shadow);
}

/* ---------------- Animated background ---------------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--orb-opacity);
  animation: float 14s ease-in-out infinite alternate;
}
.orb-1 { width: 480px; height: 480px; background: var(--accent); top: -140px; inset-inline-start: -120px; }
.orb-2 { width: 420px; height: 420px; background: var(--accent-2); top: 30%; inset-inline-end: -140px; animation-delay: -5s; }
.orb-3 { width: 380px; height: 380px; background: var(--accent-3); bottom: -120px; inset-inline-start: 35%; animation-delay: -9s; }

@keyframes float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(50px, 40px) scale(1.12); }
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 40%, transparent 80%);
}

/* ---------------- Navbar ---------------- */
.nav-wrap { position: fixed; top: 0; inset-inline: 0; z-index: 100; transition: 0.35s ease; }
.nav-wrap.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.logo-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--gradient); color: #fff; font-size: 14px;
  font-weight: 800; letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.4);
}
.logo-text { font-size: 19px; font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  color: var(--text-soft); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 10px; transition: 0.25s;
}
.nav-links a:hover { color: var(--text); background: var(--card); }
.nav-cta {
  color: #fff !important;
  background: var(--gradient) !important;
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.35);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124, 92, 255, 0.5); }

.nav-controls { display: flex; align-items: center; gap: 10px; }

.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text);
  padding: 8px 13px; border-radius: 11px; cursor: pointer; font-size: 13px;
  font-family: inherit; font-weight: 600; transition: 0.25s;
}
.lang-btn:hover { border-color: var(--accent); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 130px; padding: 6px; display: none; flex-direction: column;
  z-index: 50;
}
.lang-menu.open { display: flex; }
.lang-menu a {
  color: var(--text-soft); text-decoration: none; padding: 8px 12px;
  border-radius: 9px; font-size: 14px; transition: 0.2s;
}
.lang-menu a:hover { background: var(--card-hover); color: var(--text); }
.lang-menu a.active { color: var(--accent); font-weight: 700; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text);
  display: grid; place-items: center; cursor: pointer; transition: 0.25s;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(15deg); }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }
.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; flex-direction: column; justify-content: center; padding: 120px 0 60px; position: relative; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 100px;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text-soft); font-size: 13px; font-weight: 600;
}
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #2ee6a8;
  box-shadow: 0 0 0 0 rgba(46, 230, 168, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(46, 230, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 230, 168, 0); }
}

.hero-greeting { font-size: 18px; color: var(--text-soft); margin-top: 22px; font-weight: 500; }
.hero-name {
  font-size: clamp(42px, 6.5vw, 74px);
  font-weight: 800; line-height: 1.12; letter-spacing: -1px;
}
.hero-typing { font-size: clamp(20px, 3vw, 30px); font-weight: 600; margin-top: 8px; min-height: 1.6em; color: var(--accent-2); }
.cursor { animation: blink 1s step-end infinite; color: var(--accent); font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline { color: var(--text-soft); max-width: 560px; margin-top: 18px; font-size: 16.5px; }

.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 13px; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: none; font-family: inherit;
  transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 6px 22px rgba(124, 92, 255, 0.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(124, 92, 255, 0.55); }
.btn-ghost {
  background: var(--card); color: var(--text);
  border: 1px solid var(--card-border);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-3px); }
.btn-full { width: 100%; justify-content: center; }

.hero-stats { display: flex; gap: 34px; margin-top: 42px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 34px; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 12.5px; color: var(--text-soft); font-weight: 500; }

/* Code window */
.hero-visual { position: relative; }
.code-window {
  background: var(--code-bg); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: perspective(900px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.4s ease;
}
html[dir="rtl"] .code-window { transform: perspective(900px) rotateY(6deg) rotateX(3deg); }
.code-titlebar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; background: rgba(255, 255, 255, 0.04); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.code-filename { margin-inline-start: auto; font-size: 12px; color: #8b90a8; font-family: 'JetBrains Mono', monospace; }
.code-body {
  padding: 20px 22px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px; line-height: 1.85; color: #c8cce8; direction: ltr; text-align: left;
  overflow-x: auto;
}
.c-kw { color: #c792ea; } .c-cls { color: #7cd6ff; } .c-str { color: #a5e075; }
.c-fn { color: #ffcb6b; } .c-self { color: #ff7b93; } .c-bool { color: #f78c6c; } .c-cmt { color: #5c6282; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--text-soft); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase;
  text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint span {
  width: 22px; height: 36px; border: 2px solid var(--text-soft); border-radius: 12px;
  position: relative;
}
.scroll-hint span::after {
  content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 2px; background: var(--accent);
  animation: wheel 1.6s infinite;
}
@keyframes wheel { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 18px; } }

/* ---------------- Sections ---------------- */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-soft); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-label {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.5px; }
.section-sub { color: var(--text-soft); margin-top: 14px; font-size: 16px; }
.subsection-title { font-size: 22px; font-weight: 700; margin: 56px 0 24px; color: var(--text); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease var(--d, 0ms), transform 0.7s ease var(--d, 0ms); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------------- About ---------------- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 36px; align-items: start; }
.about-card { padding: 36px 28px; text-align: center; }
.about-avatar { width: 130px; height: 130px; margin: 0 auto 20px; border-radius: 50%; padding: 4px; background: var(--gradient); }
.about-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-fallback {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg-soft); display: grid; place-items: center; font-size: 54px;
}
.about-card h3 { font-size: 22px; font-weight: 700; }
.about-role { font-weight: 600; font-size: 14.5px; margin-top: 4px; }
.about-loc { color: var(--text-soft); font-size: 14px; margin-top: 10px; }
.about-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.badge {
  padding: 6px 13px; border-radius: 100px; font-size: 12.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text-soft);
}
.about-text { padding: 8px 4px; }
.about-text p { color: var(--text-soft); font-size: 16.5px; margin-bottom: 18px; }
.about-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* ---------------- Skills ---------------- */
/* min(320px,100%): a bare 320px minimum cannot shrink below 320px, so on
   ≤360px screens the column overflows the container and (in RTL) spills off
   the left edge, widening the page to ~334px. Clamping with min() lets the
   column shrink to the container width instead. */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.skill-card { padding: 20px 22px; transition: 0.3s; }
.skill-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.skill-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.skill-icon { font-size: 21px; }
.skill-name { font-weight: 600; font-size: 14.5px; flex: 1; }
.skill-level { font-size: 13px; font-weight: 700; color: var(--accent-2); font-family: 'JetBrains Mono', monospace; }
.skill-bar { height: 7px; background: var(--card); border-radius: 100px; overflow: hidden; border: 1px solid var(--card-border); }
.skill-fill {
  display: block; height: 100%; width: 0; border-radius: 100px;
  background: var(--gradient);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

/* ---------------- Projects ---------------- */
.filter-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn {
  padding: 9px 20px; border-radius: 100px; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text-soft); font-size: 14px; font-weight: 600; font-family: inherit;
  transition: 0.25s;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: 0 4px 16px rgba(124, 92, 255, 0.35); }
.filter-btn.active:hover { color: #fff; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card { overflow: hidden; display: flex; flex-direction: column; transition: 0.35s; }
.project-card:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: 0 20px 50px rgba(124, 92, 255, 0.18); }
.project-card.span-2 { grid-column: span 2; }
.project-card.hidden { display: none; }

.project-cover {
  position: relative; display: grid; place-items: center;
  height: 180px; text-decoration: none; overflow: hidden;
}
.project-card.span-2 .project-cover { height: 240px; }
.cat-ai { background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(0, 212, 255, 0.18)); }
.cat-web { background: linear-gradient(135deg, rgba(0, 212, 255, 0.22), rgba(46, 230, 168, 0.16)); }
.cat-security { background: linear-gradient(135deg, rgba(255, 92, 138, 0.22), rgba(124, 92, 255, 0.18)); }
.cat-desktop { background: linear-gradient(135deg, rgba(255, 193, 7, 0.18), rgba(255, 92, 138, 0.14)); }
.cover-icon { font-size: 62px; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)); transition: 0.4s; }
.cover-icon.big { font-size: 96px; }
.project-cover:hover .cover-icon { transform: scale(1.15) rotate(-6deg); }
.live-pill {
  position: absolute; top: 14px; inset-inline-end: 14px;
  padding: 4px 12px; border-radius: 100px;
  background: rgba(46, 230, 168, 0.15); border: 1px solid rgba(46, 230, 168, 0.5);
  color: #2ee6a8; font-size: 11px; font-weight: 800; letter-spacing: 1px;
}

.project-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-cat {
  font-size: 11.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent-2);
}
.project-title { font-size: 19px; font-weight: 700; }
.project-desc { color: var(--text-soft); font-size: 14px; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 7px; }
.project-tech span {
  padding: 4px 11px; border-radius: 100px; font-size: 11.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text-soft);
  font-family: 'JetBrains Mono', monospace;
}
.project-links { display: flex; gap: 18px; margin-top: 6px; }
.link-btn {
  color: var(--accent); text-decoration: none; font-size: 13.5px; font-weight: 700;
  transition: 0.2s;
}
.link-btn:hover { color: var(--accent-2); }

.mini-projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini-card {
  display: flex; gap: 15px; padding: 19px; text-decoration: none; color: var(--text);
  transition: 0.3s; align-items: flex-start;
}
.mini-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.mini-card.hidden { display: none; }
.mini-icon { font-size: 26px; }
.mini-card h4 { font-size: 15.5px; font-weight: 700; }
.mini-card p { color: var(--text-soft); font-size: 13px; margin: 5px 0 9px; }

/* ---------------- Services ---------------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card { padding: 30px 24px; transition: 0.3s; }
.service-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.service-icon {
  width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center;
  font-size: 26px; background: var(--card); border: 1px solid var(--card-border);
  margin-bottom: 18px;
}
.service-card h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 9px; }
.service-card p { color: var(--text-soft); font-size: 13.8px; }

/* ---------------- Testimonials ---------------- */
.testimonials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.testimonial-card { padding: 30px; position: relative; transition: 0.3s; }
.testimonial-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.quote-mark { font-size: 44px; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }
.testimonial-card p { color: var(--text-soft); font-size: 15px; margin: 12px 0 22px; font-style: italic; }
.testimonial-card footer { display: flex; align-items: center; gap: 13px; }
.t-avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-weight: 800; font-size: 17px;
}
.testimonial-card footer strong { display: block; font-size: 14.5px; }
.testimonial-card footer span { color: var(--text-soft); font-size: 12.5px; }

/* ---------------- Contact ---------------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 26px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-row {
  display: flex; align-items: center; gap: 16px; padding: 17px 20px;
  text-decoration: none; color: var(--text); transition: 0.28s;
}
.contact-row:hover { transform: translateX(6px); border-color: var(--accent); }
html[dir="rtl"] .contact-row:hover { transform: translateX(-6px); }
.contact-icon { font-size: 23px; }
.contact-row strong { display: block; font-size: 14px; }
.contact-row span { color: var(--text-soft); font-size: 13px; direction: ltr; unicode-bidi: embed; }
html[dir="rtl"] .contact-row span { text-align: end; }

.contact-form { padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input, .contact-form textarea {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 14px 17px; color: var(--text); font-size: 14.5px; font-family: inherit;
  transition: 0.25s; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-soft); }
.form-msg { text-align: center; font-size: 14px; font-weight: 600; min-height: 1.4em; }
.form-msg.ok { color: #2ee6a8; }
.form-msg.err { color: var(--accent-3); }

/* ---------------- Project detail ---------------- */
.project-detail { padding-top: 130px; }
.back-link {
  display: inline-block; color: var(--text-soft); text-decoration: none;
  font-size: 14.5px; font-weight: 600; margin-bottom: 30px; transition: 0.2s;
}
.back-link:hover { color: var(--accent); }
.detail-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.detail-cover { height: 320px; border-radius: 20px; }
.detail-title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin: 10px 0 16px; letter-spacing: -0.5px; }
.detail-desc { color: var(--text-soft); font-size: 16.5px; }
.detail-tech { margin-top: 28px; }
.detail-tech h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-soft); margin-bottom: 12px; }
.detail-actions { display: flex; gap: 13px; margin-top: 30px; flex-wrap: wrap; }
.next-project {
  margin-top: 70px; padding: 28px 32px; display: flex; align-items: center;
  justify-content: space-between; text-decoration: none; color: var(--text); transition: 0.3s;
}
.next-project:hover { border-color: var(--accent); transform: translateY(-4px); }
.next-project h3 { font-size: 21px; font-weight: 700; margin-top: 4px; }
.next-arrow { font-size: 30px; color: var(--accent); transition: 0.3s; }
html[dir="rtl"] .next-arrow { transform: scaleX(-1); }
.next-project:hover .next-arrow { transform: translateX(8px); }
html[dir="rtl"] .next-project:hover .next-arrow { transform: scaleX(-1) translateX(8px); }

/* ---------------- Footer ---------------- */
.footer { border-top: 1px solid var(--card-border); background: var(--bg-soft); margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; padding: 54px 24px 34px; }
.footer-note { color: var(--text-soft); font-size: 13.5px; margin-top: 15px; max-width: 320px; }
.footer-col h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { color: var(--text-soft); text-decoration: none; font-size: 14px; transition: 0.2s; }
.footer-col ul a:hover { color: var(--accent); }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text-soft);
  transition: 0.28s;
}
.socials a:hover { color: #fff; background: var(--gradient); transform: translateY(-3px); border-color: transparent; }
.footer-bottom { border-top: 1px solid var(--card-border); padding: 20px 24px; text-align: center; }
.footer-bottom p { color: var(--text-soft); font-size: 13px; }
.footer-domain { color: var(--accent); text-decoration: none; font-weight: 700; }
.footer-domain:hover { color: var(--accent-2); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  /* 64px gap: top chips overhang ~50px (offset + bob animation) above the
     photo — 40px made a chip sit on the stats row. */
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  /* width:100% is REQUIRED: auto margins alone collapse this grid item to
     fit-content = 0px because every child of .hero-photo-wrap is absolutely
     positioned (photo ring, photo, chips, badge) -> invisible photo + chips
     piled on the stats row. With an explicit width the auto margins only center. */
  .hero-visual { width: 100%; max-width: 560px; margin-inline: auto; }
  .projects-grid, .mini-projects { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid, .detail-hero { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Tablet / small laptop — collapse nav into hamburger */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 72px; inset-inline: 0; flex-direction: column;
    background: var(--nav-bg); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px; gap: 6px; border-bottom: 1px solid var(--card-border);
    display: none; max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 16px; }
  .hamburger { display: flex; }
  .nav-controls { gap: 8px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .hero { padding-top: 100px; }
  .hero-name { font-size: clamp(34px, 8vw, 48px); }
  .hero-stats { gap: 24px; }
  .stat-num { font-size: 28px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 44px; }
  .detail-cover { height: 240px; }
  .cv-avatar { width: 100px; height: 100px; }
  .code-body { font-size: 12px; padding: 16px 18px; }
  .footer-inner { padding: 44px 20px 28px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .logo-text { font-size: 16px; }
  .logo-img { width: 34px; height: 34px; }
  .lang-btn { padding: 7px 10px; font-size: 12px; }
  .theme-toggle { width: 36px; height: 36px; }
  .nav-controls { gap: 6px; }
  .hero { padding-top: 90px; }
  .hero-name { font-size: clamp(30px, 9vw, 40px); }
  .hero-greeting { font-size: 16px; margin-top: 16px; }
  .hero-typing { font-size: 18px; }
  .hero-tagline { font-size: 15px; }
  .hero-actions { gap: 10px; }
  .btn { padding: 11px 18px; font-size: 14px; }
  .hero-stats { gap: 18px; margin-top: 30px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 11.5px; }
  .scroll-hint { display: none; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .section-title { font-size: clamp(24px, 7vw, 32px); }
  .section-sub { font-size: 14.5px; }
  .subsection-title { font-size: 19px; margin: 40px 0 18px; }
  .projects-grid, .mini-projects, .services-grid, .testimonials-grid, .articles-grid, .form-row, .footer-inner { grid-template-columns: 1fr; }
  .project-card.span-2 { grid-column: span 1; }
  .project-card.span-2 .project-cover { height: 180px; }
  .project-body { padding: 18px; }
  .project-title { font-size: 17px; }
  .project-desc { font-size: 13.5px; }
  .service-card { padding: 22px 18px; }
  .testimonial-card { padding: 22px; }
  .about-card { padding: 24px 18px; }
  .about-text p { font-size: 15px; }
  .about-actions { gap: 10px; }
  .contact-form { padding: 20px; }
  .contact-row { padding: 14px 16px; }
  .contact-row span { font-size: 12px; }
  .code-body { font-size: 11px; padding: 14px 14px; line-height: 1.7; }
  .project-detail, .article-detail, .cv-page { padding-top: 100px; }
  .detail-hero { gap: 24px; }
  .detail-cover { height: 200px; }
  .detail-title { font-size: clamp(24px, 7vw, 32px); }
  .detail-desc { font-size: 15px; }
  .next-project { padding: 20px; margin-top: 50px; }
  .next-project h3 { font-size: 18px; }
  .cv-head { padding: 20px; gap: 18px; }
  .cv-avatar { width: 88px; height: 88px; }
  .cv-section { padding: 20px 18px; }
  .cv-section > p { font-size: 15px; }
  .cv-lang { min-width: 100%; }
  .cv-exp-item { padding: 15px 16px; }
  .cv-exp-head h4 { font-size: 15px; }
  .cv-exp-item > p { font-size: 13.5px; }
  .article-content { font-size: 15px; }
  .article-body { padding: 18px; }
  .footer-inner { padding: 40px 16px 24px; gap: 26px; }
  .footer-bottom { padding: 16px; }
  .footer-bottom p { font-size: 12px; }
  .filter-btn { padding: 8px 15px; font-size: 13px; }
  .marquee { margin-top: 40px; }
}

/* Small phones */
@media (max-width: 400px) {
  .logo-text { display: none; }
  .hero-name { font-size: 28px; }
  .hero-actions, .about-actions, .detail-actions, .cv-head-actions { flex-direction: column; }
  .hero-actions .btn, .about-actions .btn, .detail-actions .btn, .cv-head-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 14px; }
  .stat-num { font-size: 22px; }
  .hero-photo-wrap { width: min(240px, 82%); }
  .filter-bar { gap: 7px; }
  .filter-btn { padding: 7px 12px; font-size: 12px; }
  .cv-head { flex-direction: column; text-align: center; }
  .cv-head-actions { justify-content: center; }
  .cv-exp-head { flex-direction: column; align-items: flex-start; }
  .cv-exp-period { white-space: normal; }
}


/* ================================================================
   V2 UPGRADES — logo, photo hero, marquee, confidential section
   ================================================================ */

.logo-img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 18px rgba(124, 92, 255, 0.4); }

/* ---------------- Hero photo ---------------- */
.hero-photo-wrap { position: relative; width: min(300px, 74%); margin: 0 auto; aspect-ratio: 1; }
.hero-photo-ring {
  position: absolute; inset: -8px; border-radius: 34px;
  background: conic-gradient(from var(--ring-angle, 0deg), var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  animation: spin-ring 6s linear infinite;
  filter: blur(1px);
}
@property --ring-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin-ring { to { --ring-angle: 360deg; } }
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 28px; object-fit: cover; object-position: center 20%;
  border: 4px solid var(--bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.hero-photo-fallback { display: grid; place-items: center; font-size: 110px; background: var(--bg-soft); }

/* Floating chips — 8 slots around the photo, never overlapping each other or the face */
.floating-chip {
  position: absolute; padding: 9px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-border);
  backdrop-filter: blur(10px); font-size: 13px; font-weight: 700;
  box-shadow: var(--glass-shadow); animation: bob 4s ease-in-out infinite;
  white-space: nowrap; z-index: 2;
}
.chip-1 { top: -4px;    inset-inline-start: -104px; }
.chip-2 { top: -4px;    inset-inline-end: -108px; animation-delay: -0.5s; }
.chip-3 { bottom: -6px; inset-inline-start: -100px; animation-delay: -1s; }
.chip-4 { top: -40px;   inset-inline-start: 16%; animation-delay: -1.5s; }
.chip-5 { bottom: -44px; inset-inline-start: 20%; animation-delay: -2s; }
.chip-6 { top: 38%;     inset-inline-end: -104px; animation-delay: -2.5s; }
.chip-7 { top: 40%;     inset-inline-start: -108px; animation-delay: -3s; }
.chip-8 { bottom: 30%;  inset-inline-end: -100px; animation-delay: -3.5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* Experience badge — bottom-right corner, clear of every chip */
.exp-badge {
  position: absolute; bottom: -8px; inset-inline-end: -14px;
  padding: 9px 16px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--card-border);
  backdrop-filter: blur(12px); box-shadow: var(--glass-shadow);
  font-size: 12px; color: var(--text-soft); animation: bob 4s ease-in-out infinite;
  animation-delay: -2.8s; z-index: 3;
}
.exp-badge strong { font-size: 18px; color: var(--text); display: block; line-height: 1.2; }

@media (max-width: 700px) {
  .chip-1 { top: -16px; inset-inline-start: 2px; }
  .chip-2 { top: -16px; inset-inline-end: 2px; }
  .chip-3 { bottom: -16px; inset-inline-start: 2px; }
  .chip-4, .chip-5, .chip-7, .chip-8 { display: none; }
  .chip-6 { bottom: -16px; inset-inline-end: 2px; top: auto; }
  .exp-badge { bottom: -58px; inset-inline-end: auto; left: 50%; transform: translateX(-50%); }
  .hero-photo-wrap { margin-bottom: 64px; }
}

/* ================================================================
   V3 — extra effects & animations
   ================================================================ */

/* Scroll progress bar */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--gradient); z-index: 300;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.7);
  transition: width 0.08s linear;
}

/* Animated shimmer on the hero name */
.hero-name {
  background: linear-gradient(90deg, var(--text) 0%, var(--accent) 25%, var(--accent-2) 50%, var(--accent) 75%, var(--text) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* Soft glow pulse on primary buttons */
.btn-primary { animation: glow-pulse 3.2s ease-in-out infinite; }
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(124, 92, 255, 0.4); }
  50% { box-shadow: 0 6px 38px rgba(124, 92, 255, 0.65); }
}

/* Sheen sweep across cards on hover */
.project-card, .article-card, .service-card { position: relative; overflow: hidden; }
.project-card::before, .article-card::before, .service-card::before {
  content: ''; position: absolute; top: 0; left: -80%;
  width: 55%; height: 100%; pointer-events: none; z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.10), transparent);
  transform: skewX(-20deg);
}
.project-card:hover::before, .article-card:hover::before, .service-card:hover::before {
  animation: sheen 0.9s ease;
}
@keyframes sheen { to { left: 140%; } }

/* Logo spin on hover */
.logo:hover .logo-img { transform: rotate(10deg) scale(1.06); }
.logo-img { transition: transform 0.35s ease; }

/* Gentle floating for service icons */
.service-icon { animation: bob 5s ease-in-out infinite; }

/* Cursor-follow tilt (JS adds transform) */
.tilt { transition: transform 0.25s ease; will-change: transform; }

/* ---------------- Resume (CV) page ---------------- */
.cv-page { padding-top: 130px; }
.cv-container { max-width: 900px; }
.cv-head {
  display: flex; align-items: center; gap: 26px;
  padding: 34px; margin-bottom: 26px; flex-wrap: wrap;
}
.cv-avatar {
  width: 120px; height: 120px; flex-shrink: 0;
  border-radius: 50%; padding: 4px; background: var(--gradient);
}
.cv-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.cv-avatar .avatar-fallback { font-size: 50px; }
.cv-head-info h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.cv-head-actions { display: flex; gap: 13px; margin-top: 16px; flex-wrap: wrap; }
.cv-section { padding: 30px 32px; margin-bottom: 22px; }
.cv-section h3 {
  font-size: 15px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.cv-section h3::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.cv-section > p { color: var(--text-soft); font-size: 16px; }

.cv-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 28px; }
.cv-skill { display: flex; align-items: center; gap: 12px; }
.cv-skill-name { flex: 0 0 auto; width: 44%; font-size: 13.5px; font-weight: 600; }
.cv-skill .skill-bar { flex: 1; }
.cv-skill .skill-level { width: 38px; text-align: end; }

.cv-projects { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.cv-projects li {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-border);
}
.cv-projects strong { font-size: 14.5px; display: block; }
.cv-proj-tech { color: var(--text-soft); font-size: 12.5px; font-family: 'JetBrains Mono', monospace; }

.cv-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.cv-contact-grid .contact-row { padding: 13px 16px; }

/* Experience / Education / Languages blocks */
.cv-experience { display: flex; flex-direction: column; gap: 24px; }
.cv-exp-item {
  padding: 18px 20px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--card-border);
  border-inline-start: 3px solid var(--accent);
}
.cv-exp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cv-exp-head h4 { font-size: 16px; font-weight: 700; }
.cv-exp-period { color: var(--accent-2); font-size: 12.5px; font-weight: 700; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.cv-exp-org { color: var(--text-soft); font-size: 13px; font-weight: 600; margin: 2px 0 8px; }
.cv-exp-item > p { color: var(--text-soft); font-size: 14.5px; }
.cv-details { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cv-details li { color: var(--text-soft); font-size: 14px; padding-inline-start: 18px; position: relative; }
.cv-details li::before { content: '•'; position: absolute; inset-inline-start: 0; color: var(--accent); }

.cv-langs { display: flex; flex-wrap: wrap; gap: 14px; }
.cv-lang {
  display: flex; align-items: center; gap: 11px; padding: 13px 18px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--card-border); min-width: 170px; flex: 1;
}
.cv-lang-icon { font-size: 22px; }
.cv-lang strong { display: block; font-size: 14.5px; }
.cv-lang span { color: var(--text-soft); font-size: 12.5px; }

@media (max-width: 640px) {
  .cv-skills { grid-template-columns: 1fr; }
  .cv-contact-grid { grid-template-columns: 1fr; }
  .cv-head { flex-direction: column; text-align: center; }
  .cv-head-actions { justify-content: center; }
}

/* ---------------- Tech tag marquee ---------------- */
.marquee {
  width: 100%; overflow: hidden; margin-top: 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex; gap: 14px; width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
html[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.marquee-tag {
  padding: 9px 20px; border-radius: 100px; white-space: nowrap;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text-soft); font-size: 13.5px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  transition: 0.25s;
}
.marquee-tag:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

/* ---------------- Code window in About ---------------- */
.about-code { margin-top: 30px; max-width: 620px; transform: none; }
html[dir="rtl"] .about-code { transform: none; }

/* ---------------- Articles ---------------- */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { overflow: hidden; display: flex; flex-direction: column; transition: 0.35s; }
.article-card:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: 0 20px 50px rgba(124, 92, 255, 0.18); }
.article-cover {
  position: relative; display: grid; place-items: center; height: 150px;
  text-decoration: none; overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(0, 212, 255, 0.16));
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover .cover-icon { font-size: 52px; transition: 0.4s; }
.article-cover:hover .cover-icon { transform: scale(1.15) rotate(-6deg); }
.article-body { padding: 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.article-date { font-size: 12px; color: var(--text-soft); font-family: 'JetBrains Mono', monospace; }

/* Article detail page */
.article-detail { padding-top: 130px; }
.article-container { max-width: 820px; }
.article-hero-img { width: 100%; border-radius: 18px; margin: 18px 0 8px; }
.article-content { color: var(--text-soft); font-size: 16.5px; line-height: 1.95; margin: 18px 0 30px; }
.article-content p { margin-bottom: 16px; }

/* Articles-grid responsive collapse — MUST live after the late V2 base rule
   above (same specificity, later wins), otherwise the 3-column base overrides
   the mobile media queries and cards render ~105px wide on phones. */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .articles-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   RESPONSIVE REFINEMENTS — all screens & devices
   ================================================================ */

/* Laptops 1025–1280px — pull floating chips inward so nothing clips at screen edge */
@media (max-width: 1280px) and (min-width: 1025px) {
  .hero-photo-wrap { width: min(264px, 60%); }
  .chip-1 { inset-inline-start: -62px; }
  .chip-2 { inset-inline-end: -62px; }
  .chip-3 { inset-inline-start: -58px; }
  .chip-6 { inset-inline-end: -62px; }
  .chip-7 { inset-inline-start: -66px; }
  .chip-8 { inset-inline-end: -58px; }
}

/* Large tablets / small laptops — flatten 3D code window */
@media (max-width: 1024px) {
  .code-window,
  html[dir="rtl"] .code-window,
  .code-window.tilt,
  html[dir="rtl"] .code-window.tilt {
    transform: none;
  }
  .hero-photo-wrap { width: min(280px, 70%); }
  .chip-1 { inset-inline-start: -88px; }
  .chip-2 { inset-inline-end: -92px; }
  .chip-3 { inset-inline-start: -84px; }
  .chip-6 { inset-inline-end: -88px; }
  .chip-7 { inset-inline-start: -92px; }
  .chip-8 { inset-inline-end: -84px; }
}

/* Tablets — tighten spacing */
@media (max-width: 820px) {
  /* keep >=64px: top chips overhang ~50px above the photo (see 1024 block) */
  .hero-inner { gap: 64px; }
  .hero-tagline { max-width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { max-width: 420px; margin-inline: auto; }
  .about-text { text-align: center; }
  .about-actions { justify-content: center; }
  .detail-hero { grid-template-columns: 1fr; }
  .marquee { margin-top: 40px; }
}

/* Phones — chips collapse into a compact ring */
@media (max-width: 700px) {
  .hero-photo-wrap { width: min(260px, 72%); }
  .floating-chip { padding: 7px 12px; font-size: 12px; }
  .chip-1 { top: -14px; inset-inline-start: 0; }
  .chip-2 { top: -14px; inset-inline-end: 0; }
  .chip-3 { bottom: -14px; inset-inline-start: 0; }
  .chip-6 { bottom: -14px; inset-inline-end: 0; top: auto; }
  .exp-badge { bottom: -52px; inset-inline-end: auto; left: 50%; right: auto; transform: translateX(-50%); }
  .hero-photo-wrap { margin-bottom: 60px; }
  .marquee-tag { padding: 7px 14px; font-size: 12px; }
}

/* Short landscape phones — avoid unnecessary scroll */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: auto; padding-top: 90px; padding-bottom: 50px; }
  .scroll-hint { display: none; }
  .marquee { margin-top: 30px; }
}

/* Extra small screens */
@media (max-width: 360px) {
  /* Kill min-content pressure: without this, grid items (about-card etc.)
     inflate their 1fr column to their intrinsic width (~355px) and stretch
     the whole body to 369px on 320px phones (RTL shifts everything off-edge).
     min-width:0 lets content wrap/shrink instead. */
  .hero-inner > *, .about-grid > *, .skills-grid > *, .contact-grid > *,
  .detail-hero > *, .projects-grid > *, .mini-projects > *, .articles-grid > *,
  .services-grid > *, .testimonials-grid > *, .form-row > *,
  .cv-skills > *, .cv-contact-grid > *, .footer-inner > * {
    min-width: 0;
  }
  .container { padding: 0 14px; }
  .nav-controls { gap: 4px; }
  .lang-btn { padding: 6px 8px; }
  .theme-toggle { width: 34px; height: 34px; }
  .hamburger { padding: 6px; }
  .hero-stats { gap: 12px; }
  .stat-num { font-size: 20px; }
  .btn { padding: 10px 16px; font-size: 13px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-icon { font-size: 19px; }
  .contact-row { padding: 12px 13px; gap: 12px; }
  .cv-container { padding: 0 10px; }
  .cv-section { padding: 18px 14px; }
  .cv-skill-name { width: 42%; }
  .detail-cover { height: 170px; }
  .next-project { flex-direction: column; gap: 10px; text-align: center; }
}
