/* ===========================================
   PORTFOLIO - Võ Chí Cường
   CSS Design System & Styles
   =========================================== */

/* -------- 1. CSS VARIABLES (Design Tokens) -------- */
:root {
  /* Dark theme (default) */
  --bg-primary: #0a0f1e;
  --bg-secondary: #0d1530;
  --bg-card: #111827;
  --bg-card-hover: #1a2340;
  --border: rgba(99, 102, 241, 0.15);
  --border-hover: rgba(99, 102, 241, 0.4);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Brand colors - Indigo + Violet gradient */
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));

  /* UI */
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.5rem;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Navbar height */
  --nav-h: 70px;
}

[data-theme="light"] {
  --bg-primary: #f8faff;
  --bg-secondary: #eef2ff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4ff;
  --border: rgba(99, 102, 241, 0.12);
  --border-hover: rgba(99, 102, 241, 0.35);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow: 0 4px 24px rgba(99, 102, 241, 0.08);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.12);
  --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul {
  list-style: none;
}

input,
textarea {
  font-family: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* -------- 3. LAYOUT UTILITIES -------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 7rem 0;
}

.section-alt {
  background: var(--bg-secondary);
  position: relative;
}

.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  padding: 0.3rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* -------- 4. BUTTONS -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

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

/* -------- 5. HEADER & NAVIGATION -------- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="light"] #header {
  background: rgba(248, 250, 255, 0.8);
}

#header.scrolled {
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-logo {
  font-family: 'Fira Code', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-bracket {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s;
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

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

.nav-link.active::after {
  width: 100%;
}

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

.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: var(--transition);
}

.theme-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(20deg);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  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);
}

/* Mobile menu */
.mobile-menu {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: none;
  animation: slideDown 0.3s ease;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-link {
  display: block;
  padding: 0.6rem 0;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-link:hover {
  color: var(--accent);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------- 6. HERO SECTION -------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

/* Animated background */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Radial glow blobs */
.hero-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: blobFloat 8s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: blobFloat 10s ease-in-out infinite reverse;
}

/* Floating particles */
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient);
  opacity: 0.3;
  animation: particleFloat linear infinite;
}

.particle:nth-child(1) {
  width: 4px;
  height: 4px;
  top: 20%;
  left: 10%;
  animation-duration: 12s;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 6px;
  height: 6px;
  top: 60%;
  left: 20%;
  animation-duration: 15s;
  animation-delay: -3s;
}

.particle:nth-child(3) {
  width: 3px;
  height: 3px;
  top: 40%;
  left: 70%;
  animation-duration: 10s;
  animation-delay: -6s;
}

.particle:nth-child(4) {
  width: 5px;
  height: 5px;
  top: 80%;
  left: 80%;
  animation-duration: 14s;
  animation-delay: -2s;
}

.particle:nth-child(5) {
  width: 4px;
  height: 4px;
  top: 10%;
  left: 55%;
  animation-duration: 11s;
  animation-delay: -8s;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, -30px) scale(1.05);
  }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  padding: 4rem 1.5rem;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 8px #22c55e;
  }

  50% {
    box-shadow: 0 0 16px #22c55e;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  min-height: 2rem;
}

.typing-wrapper {
  display: inline-flex;
  align-items: center;
}

.typing-text {
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
  font-weight: 300;
  margin-left: 1px;
}

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

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

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

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* 3D Code card */
.hero-card {
  perspective: 1000px;
}

.hero-card-inner {
  transition: transform 0.1s ease;
  transform-style: preserve-3d;
}

.code-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
  position: relative;
}

.code-window::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.code-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
}

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

.dot.red {
  background: #ff5f57;
}

.dot.yellow {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.code-filename {
  margin-left: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.code-body {
  padding: 1.5rem;
  overflow: auto;
}

.code-body pre {
  margin: 0;
}

.code-body code {
  font-family: 'Fira Code', monospace;
  font-size: 0.88rem;
  line-height: 2;
  display: block;
}

/* Syntax highlight */
.c-keyword {
  color: #c792ea;
}

.c-class {
  color: #82aaff;
}

.c-type {
  color: #ffcb6b;
}

.c-string {
  color: #c3e88d;
}

.c-fn {
  color: #80cbc4;
}

.c-bool {
  color: #f78c6c;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  animation: fadeUpDown 2s ease-in-out infinite;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  80% {
    transform: translateY(12px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

@keyframes fadeUpDown {

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

  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

/* -------- 7. ABOUT SECTION -------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: center;
}

.about-visual {
  display: flex;
  justify-content: center;
  position: relative;
  /* anchor for badge-stack */
}

.avatar-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient);
  animation: ringRotate 8s linear infinite;
  z-index: 0;
}

.avatar-ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--bg-primary);
  border-radius: 50%;
}

.avatar-placeholder {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--accent);
  z-index: 1;
  border: 2px solid var(--border);
  overflow: hidden;
  /* clip ảnh theo hình tròn */
}

/* Ảnh avatar vừa khít khung tròn */
.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* zoom/crop để lấp đầy vòng tròn */
  object-position: center top;
  /* ưu tiên hiển thị phần trên (mặt) */
  border-radius: 50%;
  display: block;
}

@keyframes ringRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.avatar-badge-stack {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 2;
}

.av-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  animation: badgeFloat 4s ease-in-out infinite;
}

.av-badge.flutter {
  color: #02569b;
  border-color: rgba(2, 86, 155, 0.3);
  animation-delay: 0s;
}

.av-badge.web {
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.3);
  animation-delay: 1s;
}

.av-badge.wear {
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.3);
  animation-delay: 2s;
}

@keyframes badgeFloat {

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

  50% {
    transform: translateX(5px);
  }
}

.about-name {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.about-role {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.about-bio {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.info-val {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.status-available {
  color: #22c55e !important;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.status-available::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

/* -------- 8. SKILLS SECTION -------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.skill-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.web-icon {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.mobile-icon {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.devops-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.skill-cat-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
}

.skill-chip:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.skill-chip img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.skill-chip span {
  font-size: 0.88rem;
  font-weight: 500;
  flex: 1;
}

.skill-bar {
  width: 80px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.skill-fill.animated {
  width: var(--w);
}

/* -------- 9. PROJECTS SECTION -------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.project-card.featured {
  border-color: rgba(99, 102, 241, 0.3);
}

.project-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  transition: transform 0.4s ease;
}

.project-card:hover .project-img-placeholder {
  transform: scale(1.05);
}

.project-img-placeholder.finance {
  background: linear-gradient(135deg, #0a0f1e, #1a1050);
  color: #6366f1;
}

.project-img-placeholder.bike {
  background: linear-gradient(135deg, #0f1a0a, #1a3010);
  color: #22c55e;
}

.project-img-placeholder.bot {
  background: linear-gradient(135deg, #0a1020, #102030);
  color: #06b6d4;
}

.project-img-placeholder.network {
  background: linear-gradient(135deg, #1a0a0a, #301020);
  color: #f59e0b;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.proj-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: var(--transition);
}

.proj-link:hover {
  transform: scale(1.1);
}

.project-featured-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  z-index: 1;
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1rem;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid;
}

.badge.flutter {
  background: rgba(2, 86, 155, 0.15);
  color: #02569b;
  border-color: rgba(2, 86, 155, 0.3);
}

.badge.dart {
  background: rgba(1, 117, 194, 0.15);
  color: #0175c2;
  border-color: rgba(1, 117, 194, 0.3);
}

.badge.android {
  background: rgba(61, 220, 132, 0.15);
  color: #3ddc84;
  border-color: rgba(61, 220, 132, 0.3);
}

.badge.firebase {
  background: rgba(255, 153, 0, 0.15);
  color: #ff9900;
  border-color: rgba(255, 153, 0, 0.3);
}

.badge.html {
  background: rgba(227, 79, 38, 0.15);
  color: #e34f26;
  border-color: rgba(227, 79, 38, 0.3);
}

.badge.css {
  background: rgba(21, 114, 182, 0.15);
  color: #1572b6;
  border-color: rgba(21, 114, 182, 0.3);
}

.badge.js {
  background: rgba(247, 223, 30, 0.15);
  color: #c8a800;
  border-color: rgba(247, 223, 30, 0.3);
}

.badge.cf {
  background: rgba(243, 128, 32, 0.15);
  color: #f38020;
  border-color: rgba(243, 128, 32, 0.3);
}

.badge.node {
  background: rgba(51, 153, 51, 0.15);
  color: #339933;
  border-color: rgba(51, 153, 51, 0.3);
}

.badge.render {
  background: rgba(70, 227, 183, 0.15);
  color: #46e3b7;
  border-color: rgba(70, 227, 183, 0.3);
}

.badge.pf {
  background: rgba(33, 33, 33, 0.15);
  color: #888;
  border-color: rgba(99, 99, 99, 0.3);
}

.badge.docker {
  background: rgba(36, 150, 237, 0.15);
  color: #2496ed;
  border-color: rgba(36, 150, 237, 0.3);
}

.badge.net {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.3);
}

.project-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* -------- 10. FREELANCE SECTION -------- */
.freelance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.freelance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.freelance-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.freelance-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-primary); 
  border: 1px solid var(--border);
  padding: 15px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.freelance-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.freelance-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.freelance-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.freelance-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.freelance-link:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

/* -------- 11. CONTACT SECTION -------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

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

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gradient-glow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-card h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.contact-card a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.2s;
}

.contact-card a:hover {
  color: var(--accent);
}

.social-icons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

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

.social-btn:hover {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Contact form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-group input,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  transition: var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-status {
  font-size: 0.88rem;
  padding: 0.5rem 0;
  border-radius: var(--radius-sm);
  text-align: center;
}

.form-status.success {
  color: #22c55e;
}

.form-status.error {
  color: #ef4444;
}

/* -------- 11. FOOTER -------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-logo {
  font-family: 'Fira Code', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 400px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* -------- 12. BACK TO TOP -------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

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

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

/* Staggered reveals for grid items */
.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* ========================================
   14. RESPONSIVE — COMPREHENSIVE MOBILE
   Breakpoints:
   1024px  Tablet landscape
   768px   Tablet / large phone
   600px   Common Android phones
   480px   iPhone SE / small phones
   360px   Very small Android phones
   ======================================== */

/* ---------- STICKY BOTTOM NAV (mobile only) ---------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 0.4rem 0;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.mobile-bottom-nav ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 500;
  min-width: 56px;
  min-height: 44px;
  justify-content: center;
  transition: color 0.25s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav a i {
  font-size: 1.1rem;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
  color: var(--accent);
}

/* -------- 1024px — Tablet Landscape -------- */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .about-grid {
    gap: 3rem;
  }

  .hero-content {
    gap: 2.5rem;
  }
}

/* -------- 768px — Tablet / Large Phone -------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Sticky bottom nav + body padding */
  .mobile-bottom-nav {
    display: block;
  }

  body {
    padding-bottom: 68px;
  }

  /* Hero */
  .hero-content {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem 3rem;
    gap: 2rem;
    text-align: center;
  }

  .hero-badge {
    justify-content: center;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .hero-desc {
    margin: 0 auto 2rem;
    font-size: 0.95rem;
  }

  .hero-cta {
    justify-content: center;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    flex: 1 1 min(140px, 45%);
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 1.5rem;
  }

  .hero-card {
    order: -1;
    max-width: 100%;
    margin: 0 auto;
  }

  .code-body {
    padding: 1rem;
  }

  .code-body code {
    font-size: 0.78rem;
    line-height: 1.8;
  }

  .scroll-indicator {
    display: none;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .avatar-wrapper {
    margin: 0 auto;
    width: 220px;
    height: 220px;
  }

  /* On mobile, badges flow below avatar via flex column */
  .avatar-badge-stack {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    gap: 0.5rem;
  }

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

  .about-role {
    justify-content: center;
    flex-wrap: wrap;
  }

  .about-info-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

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

  .skill-bar {
    width: 60px;
  }

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

  /* Freelance */
  .freelance-grid {
    grid-template-columns: 1fr;
  }

  .project-img {
    height: 170px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Back-to-top above bottom nav */
  .back-to-top {
    bottom: 5.25rem;
    right: 1.25rem;
  }

  .footer {
    padding: 2rem 0 1.5rem;
  }
}

/* -------- 600px — Common Android phones -------- */
@media (max-width: 600px) {
  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 4rem 0;
  }

  .section-header {
    margin-bottom: 2.25rem;
  }

  .section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .section-sub {
    font-size: 0.88rem;
  }

  .hero-content {
    padding: 1.5rem 1rem 2.5rem;
    gap: 1.75rem;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7.5vw, 2.5rem);
  }

  .hero-badge {
    font-size: 0.75rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-num {
    font-size: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 300px;
  }

  .avatar-wrapper {
    width: 190px;
    height: 190px;
  }

  .skill-chip {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }

  .skill-chip span {
    font-size: 0.82rem;
  }

  .skill-bar {
    width: 50px;
  }

  .project-body {
    padding: 1.1rem;
  }

  .project-title {
    font-size: 1rem;
  }

  .project-desc {
    font-size: 0.85rem;
  }

  .project-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .contact-form {
    padding: 1.25rem;
  }

  .contact-card {
    padding: 1rem;
  }

  .about-info-grid {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }
}

/* -------- 480px — iPhone SE / small phones -------- */
@media (max-width: 480px) {
  .nav-logo {
    font-size: 1.05rem;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-desc {
    font-size: 0.88rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }

  .stat-divider {
    display: none;
  }

  .stat-num {
    font-size: 1.4rem;
  }

  .skill-category {
    padding: 1.25rem;
  }

  .project-img {
    height: 145px;
  }

  .project-img-placeholder {
    font-size: 3rem;
  }

  .social-icons {
    justify-content: center;
  }

  .mobile-bottom-nav a {
    font-size: 0.58rem;
    min-width: 44px;
  }
}

/* -------- 360px — Very small Android phones -------- */
@media (max-width: 360px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 0.85rem;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
  }

  .btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
  }

  .tech-badges {
    gap: 0.3rem;
  }

  .badge {
    font-size: 0.62rem;
    padding: 0.15rem 0.45rem;
  }

  .skill-bar {
    display: none;
  }

  .avatar-wrapper {
    width: 170px;
    height: 170px;
  }

  .contact-form {
    padding: 1rem;
  }
}

/* -------- Landscape on phones -------- */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 0.5rem) 0 2rem;
  }

  .hero-content {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
  }

  .hero-badge {
    justify-content: flex-start;
  }

  .hero-cta {
    justify-content: flex-start;
    flex-direction: row;
  }

  .hero-cta .btn {
    flex: initial;
    width: auto;
  }

  .hero-stats {
    justify-content: flex-start;
  }

  .hero-card {
    order: 0;
    max-width: 100%;
  }

  .scroll-indicator {
    display: none;
  }

  .section {
    padding: 3rem 0;
  }
}