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

:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-alt: #0d0d14;
  --border: #1e1e2e;
  --accent: #6c63ff;
  --accent-glow: rgba(108, 99, 255, 0.25);
  --accent2: #a78bfa;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --green: #22c55e;
  --radius: 12px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 200;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ===== MOUSE SPOTLIGHT ===== */
.spotlight {
  position: fixed;
  top: 0; left: 0;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,99,255,0.07) 0%, transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s;
  will-change: left, top;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 30%, transparent 80%);
  z-index: 0;
  pointer-events: none;
}
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}
.blob-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(108,99,255,0.35), transparent 70%);
  top: -120px; right: -80px;
  animation: float1 18s ease-in-out infinite;
}
.blob-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(167,139,250,0.25), transparent 70%);
  bottom: 5%; left: -120px;
  animation: float2 22s ease-in-out infinite;
}
@keyframes float1 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-40px, 60px); }
}
@keyframes float2 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(50px, -40px); }
}

nav, section, footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05em;
}
.logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active-link { color: var(--accent); }
.nav-links a.active-link::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 1rem; }

/* Language toggle */
.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--accent); color: #fff; }

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-btn span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: var(--transition);
}
.menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-link {
  display: block;
  padding: 0.6rem 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color var(--transition);
}
.mobile-link:hover { color: var(--accent); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-content { flex: 1; }

.hero-greeting {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.hero-name {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero-name .accent { color: var(--accent); }

.hero-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  min-height: 1.8rem;
}
.cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.wave {
  display: inline-block;
  animation: wave 2.4s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes wave {
  0%,60%,100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

/* ===== HERO SOCIALS ===== */
.hero-socials { display: flex; gap: 0.75rem; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  transition: all var(--transition);
}
.social-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

/* ===== SCROLL HINT ===== */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bob 2s ease-in-out infinite;
}
.mouse {
  display: block;
  width: 24px; height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  position: relative;
}
.wheel {
  position: absolute;
  top: 7px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80%,100% { opacity: 0; transform: translate(-50%, 12px); }
}
@keyframes bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent2);
  box-shadow: 0 0 32px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn-full { width: 100%; justify-content: center; }

/* ===== TAGS ===== */
.tag {
  padding: 0.3rem 0.8rem;
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: 99px;
  font-size: 0.8rem;
  color: var(--accent2);
  font-family: 'JetBrains Mono', monospace;
}
.tag-sm {
  padding: 0.2rem 0.65rem;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: 99px;
  font-size: 0.75rem;
  color: var(--accent2);
  font-family: 'JetBrains Mono', monospace;
}

/* ===== CODE CARD ===== */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.code-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(108,99,255,0.08);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.dot-red   { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.dot-yellow{ width: 12px; height: 12px; border-radius: 50%; background: #febc2e; }
.dot-green { width: 12px; height: 12px; border-radius: 50%; background: #28c840; }
.code-filename {
  margin-left: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.code-body {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.75;
  display: block;
  color: var(--text-dim);
}
.kw  { color: #c792ea; }
.fn  { color: #82aaff; }
.str { color: #c3e88d; }

/* ===== SECTIONS ===== */
.section { padding: 6rem 0; }
.section-alt { background: var(--bg-alt); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header { margin-bottom: 3rem; }
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ===== ABOUT ===== */
.about-simple { max-width: 760px; }
.about-lead {
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 1.3rem;
}
.about-lead strong { color: var(--text); font-weight: 600; }
.about-focus { margin-top: 1.75rem; }
.focus-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}
.focus-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  transition: all var(--transition);
}
.stat-card:hover {
  border-color: rgba(108,99,255,0.3);
  transform: translateY(-3px);
}
.stat-icon {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}
.stat-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.stat-label {
  display: block;
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===== STACK CHIPS ===== */
.stack-group { margin-bottom: 1.4rem; }
.stack-group:last-child { margin-bottom: 0; }
.stack-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  text-transform: lowercase;
}
.stack-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.35rem 0.85rem;
  background: rgba(108,99,255,0.08);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 8px;
  font-size: 0.83rem;
  color: var(--accent2);
  transition: all var(--transition);
  cursor: default;
}
.chip:hover {
  background: rgba(108,99,255,0.16);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ===== PROJECTS ===== */
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

/* Featured project */
.project-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}
.project-feature:hover {
  border-color: rgba(108,99,255,0.3);
  box-shadow: 0 16px 50px rgba(0,0,0,0.35);
}
.feature-media { position: relative; min-height: 320px; }
.feature-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.25);
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.project-title-lg {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Media placeholder */
.media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(108,99,255,0.18), transparent 60%),
    linear-gradient(135deg, #14141f, #0d0d14);
  border-right: 1px solid var(--border);
}
.media-placeholder.sm { position: relative; min-height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
.media-icon { font-size: 2.6rem; opacity: 0.9; }
.media-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Project actions */
.project-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.card-link {
  font-size: 0.85rem;
  color: var(--accent2);
  font-weight: 500;
  transition: color var(--transition);
}
.card-link:hover { color: var(--accent); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body .project-tags { margin-top: auto; }
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover {
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.project-card:hover::before { opacity: 1; }

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.project-icon { font-size: 1.8rem; }
.project-links { display: flex; gap: 0.5rem; }
.icon-link {
  color: var(--text-muted);
  transition: color var(--transition);
}
.icon-link:hover { color: var(--accent); }

.project-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.project-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.card-body .project-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* clickable cards + media images */
.clickable { cursor: pointer; }
.feature-media img,
.card-media img,
.modal-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-media { height: 180px; overflow: hidden; }
.card-media img { height: 180px; }
.projects-hint {
  text-align: center;
  margin-top: 1.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5, 5, 10, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 0.85rem; right: 0.85rem;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10,10,15,0.7);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.modal-media {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 240px;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
.modal-media .media-placeholder { position: relative; min-height: 240px; border: none; }
.modal-content { padding: 2rem; }
.modal-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.85rem; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.modal-desc p { color: var(--text-dim); line-height: 1.75; margin-bottom: 0.9rem; }
.modal-desc h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent2);
  margin: 1.4rem 0 0.5rem;
  padding-top: 0.2rem;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}
.modal-desc h4:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.modal-desc strong { color: var(--text); }
.modal-desc code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: rgba(108,99,255,0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  color: var(--accent2);
  display: inline;
}
.modal-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ===== EXPERIENCE ===== */
.experience-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: start;
}

.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -5px; top: 8px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.timeline-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.timeline-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ===== SKILLS ===== */
.skills-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.skills-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.skills-list { display: flex; flex-direction: column; gap: 1rem; }
.skill-row { display: flex; flex-direction: column; gap: 0.35rem; }
.skill-name {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.skill-pct { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }
.skill-bar {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  width: 0;
  transition: width 1s ease;
}

/* ===== CONTACT ===== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-desc {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color var(--transition);
}
.contact-link:hover { color: var(--accent); }

/* ===== FORM ===== */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}
.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}
.footer .container { display: flex; flex-direction: column; gap: 0.3rem; }
.footer p { font-size: 0.85rem; color: var(--text-muted); }
.footer-sub { font-size: 0.78rem; opacity: 0.5; }

/* ===== BACK TO TOP ===== */
.back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--accent2); transform: translateY(-3px); }

/* ===== SCROLL ANIMATION ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { flex-direction: column; gap: 3rem; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-stack { justify-content: center; }
  .hero-visual { width: 100%; }
  .code-card { max-width: 100%; }

  .experience-layout { grid-template-columns: 1fr; gap: 3rem; }
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .scroll-hint { display: none; }
  .spotlight { display: none; }

  .project-feature { grid-template-columns: 1fr; }
  .feature-media { min-height: 220px; }
  .media-placeholder { border-right: none; border-bottom: 1px solid var(--border); }
  .feature-body { padding: 1.75rem; }
  .about-lead { font-size: 1.05rem; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .nav-inner { padding: 0 1.25rem; }

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

  /* Hero */
  .hero { padding: 6rem 1.25rem 3rem; gap: 2.5rem; min-height: auto; }
  .hero-name { font-size: clamp(2.4rem, 12vw, 3.2rem); }
  .hero-desc { font-size: 0.98rem; }
  .hero-cta { gap: 0.6rem; }
  .hero-cta .btn { flex: 1; justify-content: center; }

  /* Spacing */
  .container { padding: 0 1.25rem; }
  .section { padding: 4rem 0; }
  .section-title { font-size: 1.7rem; }
  .back-top { bottom: 1.25rem; right: 1.25rem; }

  /* Code card — smaller, no horizontal blowout */
  .code-body { padding: 1rem 1.1rem; }
  .code-body code { font-size: 0.74rem; }

  /* Modal */
  .modal-overlay { padding: 0.75rem; }
  .modal-content { padding: 1.5rem; }
  .modal-title { font-size: 1.35rem; }

  /* Keep background blobs inside the viewport (no horizontal overflow) */
  .bg-blob { filter: blur(70px); opacity: 0.3; }
  .blob-1 { width: 280px; height: 280px; top: -60px; right: -40px; }
  .blob-2 { width: 260px; height: 260px; bottom: 8%; left: -60px; }
}

@media (max-width: 400px) {
  .hero-stack .tag { font-size: 0.72rem; padding: 0.25rem 0.6rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .lang-toggle .lang-btn { padding: 0.3rem 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
