/* ============================================
   SAHIL RAJ VERMA — PORTFOLIO CSS
   Design: Minimal Premium · Red Theme
   ============================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
  --red: #ef4444;
  --red-light: #f87171;
  --red-dark: #dc2626;
  --red-muted: rgba(239, 68, 68, 0.12);
  --red-border: rgba(239, 68, 68, 0.25);

  /* Dark theme defaults */
  --bg: #0a0a0b;
  --bg-alt: #0f0f10;
  --bg-card: #141415;
  --bg-card-hover: #1a1a1c;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #f5f5f6;
  --text-muted: #8b8b8e;
  --text-subtle: #545458;
  --nav-bg: rgba(10, 10, 11, 0.85);
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-alt: #f4f4f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8f9;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --text: #0f0f10;
  --text-muted: #52525b;
  --text-subtle: #a1a1aa;
  --nav-bg: rgba(250, 250, 250, 0.88);
}

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

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

body {
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

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

/* ---------- TYPOGRAPHY ---------- */
h1,
h2,
h3,
h4,
h5 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}
.section-alt {
  background: var(--bg-alt);
}

/* ---------- SECTION HEADERS ---------- */
.section-header {
  margin-bottom: 56px;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text);
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}
.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--red);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition:
    color 0.2s,
    background 0.2s;
  position: relative;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--border);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--red);
  border-radius: 50%;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.2s;
  font-size: 1rem;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-card);
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-hamburger span {
  width: 20px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s;
  display: block;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-card);
}
.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-primary-sm {
  background: var(--red);
  color: #fff;
}
.btn-primary-sm:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}
.btn-ghost-sm {
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
}
.btn-ghost-sm:hover {
  color: var(--text);
  border-color: var(--text-subtle);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 24px 60px;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black 40%,
    transparent 100%
  );
  opacity: 0.5;
  pointer-events: none;
}
.hero-container {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.hero-name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 20px;
}
.name-accent {
  color: var(--red);
}
.hero-subtitle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 24px;
  min-height: 32px;
}
.subtitle-prefix {
  color: var(--red);
}
.rotating-text {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.rotating-text.exit {
  opacity: 0;
  transform: translateY(-8px);
}
.rotating-text.enter {
  opacity: 0;
  transform: translateY(8px);
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}
.hero-socials {
  display: flex;
  gap: 10px;
}
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.2s;
}
.social-link:hover {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-muted);
  transform: translateY(-2px);
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-subtle);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-subtle), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.1);
  }
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  background: var(--red-muted);
  border: 1px solid var(--red-border);
  padding: 4px 12px;
  border-radius: 999px;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: var(--red-border);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- TIMELINE ---------- */
.timeline {
  position: relative;
  max-width: 700px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 48px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -5px;
  top: 6px;
  width: 11px;
  height: 11px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 3px var(--red-muted);
}
.timeline-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.timeline-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.timeline-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--red-muted);
  color: var(--red);
  border: 1px solid var(--red-border);
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 10px;
}

/* ---------- PROJECTS ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.25s;
  position: relative;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.project-featured {
  border-color: var(--red-border);
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    rgba(239, 68, 68, 0.04) 100%
  );
}
.project-featured:hover {
  border-color: var(--red);
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.12);
}
.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.project-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--red-muted);
  border: 1px solid var(--red-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--red);
}
.project-link-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-subtle);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.project-link-btn:hover {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-muted);
}
.project-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--red-muted);
  color: var(--red);
  border: 1px solid var(--red-border);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 12px;
}
.project-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.project-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-techs span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 5px;
}

/* ---------- FREELANCE ---------- */
.freelance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.freelance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s;
}
.freelance-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}
.freelance-thumb {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #fff;
}
.fl-dental {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}
.fl-jewel {
  background: linear-gradient(135deg, #eab308, #ca8a04);
}
.fl-faith {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.fl-enterprise {
  background: linear-gradient(135deg, #10b981, #059669);
}
.fl-tours {
  background: linear-gradient(135deg, #f97316, #ea580c);
}
.fl-astro {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.freelance-info {
  padding: 20px;
}
.freelance-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.freelance-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.freelance-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.freelance-tech span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-subtle);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
}
.freelance-actions {
  display: flex;
  gap: 8px;
}

/* ---------- SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.2s;
}
.skill-group:hover {
  border-color: var(--red-border);
}
.skill-group-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-group-title i {
  color: var(--red);
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.skill-tags span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 7px;
  transition: all 0.2s;
}
.skill-tags span:hover {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-muted);
}

/* ---------- OPEN SOURCE ---------- */
.oss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.oss-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.2s;
}
.oss-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.oss-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--red-muted);
  border: 1px solid var(--red-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--red);
  margin-bottom: 16px;
}
.oss-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.oss-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.oss-highlights {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}
.oss-highlights h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.highlight-tags span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.highlight-tags span i {
  color: var(--red);
  font-size: 0.9rem;
}
.highlight-tags span:hover {
  border-color: var(--red-border);
  background: var(--red-muted);
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}
.contact-info > p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 32px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.contact-item i {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--red);
  flex-shrink: 0;
}
.contact-item:hover {
  color: var(--text);
}

/* ---------- FORM ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
  resize: vertical;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-muted);
}
.form-status {
  font-size: 0.85rem;
  text-align: center;
  min-height: 20px;
  font-weight: 500;
  margin-top: 4px;
}
.form-status.success {
  color: #22c55e;
}
.form-status.error {
  color: var(--red);
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg-alt);
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo {
  font-size: 1rem;
  font-weight: 800;
  color: var(--red);
}
.footer-content p {
  font-size: 0.82rem;
  color: var(--text-subtle);
}
.footer-socials {
  display: flex;
  gap: 10px;
}
.footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-subtle);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.footer-socials a:hover {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-muted);
}

/* ---------- ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.7s ease forwards;
}
.delay-1 {
  animation-delay: 0.12s;
}
.delay-2 {
  animation-delay: 0.24s;
}
.delay-3 {
  animation-delay: 0.36s;
}
.delay-4 {
  animation-delay: 0.48s;
}
.delay-5 {
  animation-delay: 0.6s;
}

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

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 {
  transition-delay: 0.1s;
}
.reveal.delay-2 {
  transition-delay: 0.2s;
}
.project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  z-index: 9999;
  background: linear-gradient(90deg, #ef4444, #dc2626, #991b1b);
  transition: width 0.15s linear;
}

.dark .scroll-progress {
  box-shadow:
    0 0 15px rgba(239, 68, 68, 0.8),
    0 0 30px rgba(239, 68, 68, 0.4);
}

.light .scroll-progress {
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.scroll-top-btn {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 54px;
  height: 54px;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: 0.4s;
  backdrop-filter: blur(20px);
  color: #ef4444;
}

.dark .scroll-top-btn {
  background: rgba(18, 18, 18, 0.8);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

.light .scroll-top-btn {
  background: rgba(255, 255, 255, 0.85);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

@media (max-width: 768px) {
  .scroll-top-btn {
    width: 48px;
    height: 48px;
    right: 20px;
    bottom: 20px;
  }
}

@media (max-width: 768px) {
  .scroll-top-btn {
    width: 48px;
    height: 48px;
    right: 20px;
    bottom: 20px;
  }
}

/* ---------- MOBILE NAV ---------- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link {
    padding: 12px 24px;
    width: 100%;
  }
  .nav-hamburger {
    display: flex;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-featured {
    grid-column: span 2;
  }
}
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .freelance-grid {
    grid-template-columns: 1fr 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }
  .hero-name {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-featured {
    grid-column: span 1;
  }
  .freelance-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .oss-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
  .hero-scroll {
    display: none;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
