/* ===== DESIGN SYSTEM ===== */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.1);
  --accent: #22d3ee;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --bg-elevated: #22222e;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: 0.5s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: white;
  margin: 0 auto 20px;
}

.loader-bar {
  width: 120px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.loader-progress {
  width: 0;
  height: 100%;
  background: var(--primary);
  animation: loading 1s ease forwards;
}

@keyframes loading {
  to {
    width: 100%;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 250, 252, 0.9);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: white;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--primary-light);
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition-fast);
}

.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-full {
  width: 100%;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.social-btn:hover {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Social Media Brand Colors on Hover */
#github:hover,
[id$="Github"]:hover {
  background: #333333;
  border-color: #333333;
}

#linkedin:hover,
[id$="Linkedin"]:hover {
  background: #0077B5;
  border-color: #0077B5;
}

#twitter:hover,
[id$="Twitter"]:hover {
  background: #000000;
  border-color: #000000;
}

#instagram:hover,
[id$="Instagram"]:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: #dc2743;
}

#facebook:hover,
[id$="Facebook"]:hover {
  background: #1877F2;
  border-color: #1877F2;
}

#youtube:hover,
[id$="Youtube"]:hover {
  background: #FF0000;
  border-color: #FF0000;
}

#whatsapp:hover,
[id$="Whatsapp"]:hover {
  background: #25D366;
  border-color: #25D366;
}

#telegram:hover,
[id$="Telegram"]:hover {
  background: #0088CC;
  border-color: #0088CC;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 1024px) {
  .hero {
    min-height: auto;
    padding-bottom: 60px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-badge i {
  font-size: 8px;
  color: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.hero-title {
  margin-bottom: 16px;
}

.greeting {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.name {
  display: block;
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 800;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 24px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-cursor {
  width: 3px;
  height: 28px;
  background: var(--primary);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero-social {
  display: flex;
  gap: 12px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image {
  width: 320px;
  height: 320px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 4px;
  position: relative;
  z-index: 2;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 4px);
}

.hero-decoration {
  position: absolute;
  inset: -20px;
  z-index: 1;
}

.deco-circle {
  position: absolute;
  inset: 0;
  border: 2px dashed var(--border);
  border-radius: var(--radius-full);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.deco-dots {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--primary) 2px, transparent 2px);
  background-size: 15px 15px;
  opacity: 0.3;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-scroll a {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.hero-scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    top: 8px;
    opacity: 1;
  }

  100% {
    top: 24px;
    opacity: 0;
  }
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 8px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: start;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
}

.stat-info h3 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.stat-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.about-content {
  max-width: 560px;
}

.about-text {
  margin-bottom: 24px;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.about-text b,
.about-text strong,
.hero-desc b,
.hero-desc strong {
  color: var(--primary);
  font-weight: 600;
}

/* Skills */
.skills-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition-fast);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: 160px;
}

.skill-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.skill-card i {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 12px;
}

.skill-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.skill-card span {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.skill-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* Education */
.education-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius-lg);
  position: relative;
  padding-left: 32px;
  transition: var(--transition-fast);
}

.edu-card::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 28px;
  bottom: 28px;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.edu-card:hover {
  border-color: var(--primary);
}

.edu-card .date {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edu-card h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.edu-card h4 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edu-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-fast);
}

.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.project-card.featured {
  border-color: var(--primary);
}

.project-img {
  height: 200px;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.project-card:hover .project-img img {
  transform: scale(1.05);
}

.project-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--primary);
  opacity: 0.5;
}

.featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-content {
  padding: 24px;
}

.project-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.project-content p,
.project-content .project-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  /* Show full description with max 4 lines */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  max-height: none;
  /* Allow all tags to show */
}

.tag {
  padding: 4px 12px;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
}

.project-links {
  display: flex;
  gap: 12px;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.project-link:hover {
  background: var(--primary);
  color: white;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: var(--transition-fast);
}

.service-card:hover {
  border-color: var(--primary);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card i {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Certificates */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.cert-card {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.cert-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.cert-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
}

.cert-content h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.cert-issuer {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-date {
  font-size: 12px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.cert-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.info-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.info-card:hover {
  border-color: var(--primary);
}

.info-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
}

.info-card span {
  font-size: 12px;
  color: var(--text-muted);
}

.info-card p {
  font-size: 15px;
  font-weight: 500;
}

.contact-form {
  padding: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer p {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: var(--transition-fast);
}

.footer-social a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* Back to Top & Toast */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
  z-index: 99;
  box-shadow: var(--shadow-md);
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 9999;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.contact-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.info-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.info-card:hover {
  border-color: var(--primary);
}

.info-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
}

.info-card span {
  font-size: 12px;
  color: var(--text-muted);
}

.info-card p {
  font-size: 15px;
  font-weight: 500;
}

.contact-form {
  padding: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer p {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: var(--transition-fast);
}

.footer-social a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* Back to Top & Toast */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
  z-index: 99;
  box-shadow: var(--shadow-md);
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 9999;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast i {
  color: var(--success);
  font-size: 20px;
}


/* Responsive Optimization */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-visual {
    order: 1;
    margin-bottom: 20px;
  }

  .hero-desc {
    margin: 0 auto 32px;
  }

  .hero-actions,
  .hero-social {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .about-content {
    text-align: center;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 260px;
    /* Fixed width */
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    transform: scale(0.95) translateY(-20px);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    left: auto;
  }

  [data-theme="light"] .nav-menu {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-link::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    opacity: 0.3;
  }

  .nav-link:active,
  .nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    padding-left: 20px;
  }

  .nav-link:active {
    background: var(--primary-light);
  }

  .menu-btn {
    display: flex;
  }

  .nav-right {
    gap: 12px;
  }

  .icon-btn[title="Admin"] {
    display: none;
    /* Hide admin on mobile nav bar to save space, maybe move to footer? */
  }

  .hero-image {
    width: 260px;
    height: 260px;
  }

  .stat-card {
    flex: 1 1 100%;
    /* Full width on mobile */
    min-width: unset;
    justify-content: center;
  }

  .stat-card:hover {
    transform: none;
    /* Disable hover movement on touch */
  }

  .projects-grid,
  .certificates-grid,
  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-contact p {
    justify-content: center;
  }


}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .section {
    padding: 50px 0;
  }

  .name {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 18px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-image {
    width: 220px;
    height: 220px;
  }

  .btn {
    width: 100%;
    /* Full width buttons */
    padding: 14px 20px;
    font-size: 14px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .skill-card {
    padding: 16px 12px;
  }

  .skill-card i {
    font-size: 28px;
  }

  .cert-card {
    flex-direction: column;
    text-align: center;
  }

  .cert-icon {
    margin: 0 auto;
  }

  .about-stats {
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  /* Make footer links bigger touch targets */
  .footer-links a {
    padding: 8px 0;
  }
}

/* Show More Button */
.show-more-wrap {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 20px;
}

.show-more-wrap.full-width {
  width: 100%;
}

.btn-show-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-show-more:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-show-more i {
  font-size: 12px;
}

/* Theme Selector */
.theme-selector {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.theme-btn:hover {
  color: var(--text-primary);
}

.theme-btn.active {
  background: var(--primary);
  color: white;
}

/* Enhanced Footer */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 60px 0 40px;
}

.footer-brand .logo {
  margin-bottom: 20px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Footer Social Media Brand Colors on Hover */
.footer-social #footerGithub:hover {
  background: #333333;
  border-color: #333333;
}

.footer-social #footerLinkedin:hover {
  background: #0077B5;
  border-color: #0077B5;
}

.footer-social #footerTwitter:hover {
  background: #000000;
  border-color: #000000;
}

.footer-social #footerInstagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: #dc2743;
}

.footer-social #footerFacebook:hover {
  background: #1877F2;
  border-color: #1877F2;
}

.footer-social #footerYoutube:hover {
  background: #FF0000;
  border-color: #FF0000;
}

.footer-social #footerWhatsapp:hover {
  background: #25D366;
  border-color: #25D366;
}

.footer-social #footerTelegram:hover {
  background: #0088CC;
  border-color: #0088CC;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

.footer-contact i {
  color: var(--primary);
  width: 16px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-credit {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.heart-icon {
  color: #ef4444;
  animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.social-btn.whatsapp:hover {
  background: #25D366;
  border-color: #25D366;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .footer-social {
    justify-content: center;
  }

  .theme-selector {
    order: -1;
  }
}

/* Hero Initials Fallback */
.hero-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: inherit;
  font-size: 80px;
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
}

#profileImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

@media (max-width: 768px) {
  .hero-initials {
    font-size: 60px;
  }
}

/* Availability Badge Styles */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 50px;
  color: #10b981;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-badge .pulse {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Unavailable State */
.hero-badge.unavailable {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.hero-badge.unavailable .pulse {
  background: #ef4444;
  animation: none;
}

.hero-badge .pulse.unavailable {
  background: #ef4444;
  animation: none;
}

/* Enhanced Mobile Menu - Appended Override */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px !important;
    right: 20px !important;
    left: auto !important;
    width: 260px !important;
    background: rgba(15, 15, 20, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    flex-direction: column;
    padding: 12px !important;
    gap: 4px !important;
    transform: scale(0.95) translateY(-20px);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  [data-theme='light'] .nav-menu {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
  }

  .nav-menu.active {
    transform: scale(1) translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 12px 16px !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent !important;
    border: none !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center;
    gap: 12px;
    justify-content: flex-start !important;
    transition: all 0.2s ease;
  }

  /* Add Icons via CSS */
  .nav-link::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    width: 24px;
    text-align: center;
    color: var(--primary);
    opacity: 0.8;
  }

  .nav-link[href='#home']::before {
    content: '\f015';
  }

  .nav-link[href='#about']::before {
    content: '\f007';
  }

  .nav-link[href='#skills']::before {
    content: '\f121';
  }

  .nav-link[href='#education']::before {
    content: '\f19d';
  }

  .nav-link[href='#projects']::before {
    content: '\f07b';
  }

  .nav-link[href='#services']::before {
    content: '\f0b1';
  }

  .nav-link[href='#certificates']::before {
    content: '\f0a3';
  }

  .nav-link[href='#contact']::before {
    content: '\f0e0';
  }

  /* Chevron arrow at the end */
  .nav-link::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    margin-left: auto;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
  }

  .nav-link:active,
  .nav-link:hover,
  .nav-link.active {
    background: var(--primary-light) !important;
    color: var(--text-primary) !important;
  }

  .nav-link:active::after,
  .nav-link:hover::after,
  .nav-link.active::after {
    opacity: 0.4;
    transform: translateX(0);
  }

  /* Staggered animation for links */
  .nav-menu.active .nav-link {
    animation: slideIn 0.3s backwards;
  }

  .nav-menu.active .nav-link:nth-child(1) {
    animation-delay: 0.05s;
  }

  .nav-menu.active .nav-link:nth-child(2) {
    animation-delay: 0.1s;
  }

  .nav-menu.active .nav-link:nth-child(3) {
    animation-delay: 0.15s;
  }

  .nav-menu.active .nav-link:nth-child(4) {
    animation-delay: 0.2s;
  }

  .nav-menu.active .nav-link:nth-child(5) {
    animation-delay: 0.25s;
  }

  .nav-menu.active .nav-link:nth-child(6) {
    animation-delay: 0.3s;
  }

  .nav-menu.active .nav-link:nth-child(7) {
    animation-delay: 0.35s;
  }

  .nav-menu.active .nav-link:nth-child(8) {
    animation-delay: 0.4s;
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateX(10px);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}


/* Enhanced Mobile Footer - Appended Override */
/* Compact Mobile Footer - Optimized */
@media (max-width: 768px) {
  .footer {
    padding: 30px 0 20px;
    border-top: 1px solid var(--border);
  }

  .footer-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    /* Side by side layout */
    gap: 20px 16px !important;
    /* Very small gap */
    text-align: left !important;
    padding: 0 0 24px;
  }

  /* Make brand full width */
  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 8px;
  }

  .footer-logo {
    justify-content: center;
    margin-bottom: 8px !important;
  }

  .footer-desc {
    font-size: 13px !important;
    margin-bottom: 16px !important;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Compact headings */
  .footer h4 {
    font-size: 14px !important;
    margin-bottom: 12px !important;
    color: var(--text-primary);
    font-weight: 600;
  }

  .footer h4::after {
    display: none;
    /* remove separator line */
  }

  /* Compact links */
  .footer-links a {
    font-size: 13px !important;
    padding: 4px 0 !important;
    border: none !important;
    color: var(--text-secondary);
  }

  /* Compact contact info */
  .footer-contact p {
    font-size: 13px !important;
    padding: 4px 0 !important;
    background: transparent !important;
    border: none !important;
    justify-content: flex-start !important;
    margin-bottom: 6px !important;
    border-radius: 0 !important;
  }

  .footer-contact i {
    font-size: 14px !important;
    width: 20px;
  }

  /* Compact social icons */
  .footer-social {
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 0;
  }

  .footer-social a {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  /* Footer Bottom */
  .footer-bottom {
    padding: 16px 0 0;
    border-top: 1px solid var(--border);
    margin-top: 0;
  }

  .footer-bottom p {
    font-size: 11px;
  }
}

/* Compact Mobile Hero - Optimized */
@media (max-width: 480px) {

  /* Tighter Hero Section */
  .hero {
    min-height: auto;
    padding: 80px 0 40px;
    /* Reduced padding */
  }

  .hero .container {
    gap: 20px !important;
  }

  .hero-visual {
    margin-bottom: 12px !important;
  }

  /* Smaller Image */
  .hero-image {
    width: 180px !important;
    height: 180px !important;
    margin: 0 auto;
    border-width: 3px;
    box-shadow: 0 10px 30px -10px var(--primary);
  }

  .hero-initials {
    font-size: 50px !important;
  }

  /* Compact Typography */
  .hero-title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .name {
    font-size: 26px !important;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 15px !important;
    gap: 8px !important;
    margin-bottom: 16px;
  }

  .hero-subtitle span {
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
  }

  .hero-desc {
    font-size: 14px;
    margin-bottom: 20px !important;
    line-height: 1.6;
    padding: 0 10px;
  }

  /* Compact Badge */
  .hero-badge {
    padding: 6px 14px !important;
    font-size: 12px !important;
    margin-bottom: 16px !important;
    border-radius: 30px !important;
  }

  .hero-badge .pulse {
    width: 8px !important;
    height: 8px !important;
  }

  /* Compact Buttons */
  .hero-actions {
    flex-direction: row !important;
    /* Side by side buttons */
    gap: 10px !important;
    padding: 0 10px;
  }

  .btn {
    padding: 10px 16px !important;
    /* Smaller padding */
    font-size: 13px !important;
    height: auto !important;
    flex: 1;
    /* Equal width */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Compact Socials */
  .hero-social {
    margin-top: 24px;
    gap: 12px !important;
  }

  .social-link {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 15px;
}

/* ===== PROFESSIONAL FEATURES ===== */

/* Navbar auto-hide transition */
.navbar {
  transition: transform 0.3s ease, background 0.3s ease, padding 0.3s ease;
}

/* Rainbow animation for Easter Egg */
@keyframes rainbow {
  0% {
    filter: hue-rotate(0deg);
  }

  50% {
    filter: hue-rotate(180deg);
  }

  100% {
    filter: hue-rotate(360deg);
  }
}

/* Print styles */
@media print {

  .navbar,
  .footer,
  .back-to-top,
  .hero-scroll,
  .theme-selector {
    display: none !important;
  }

  .section {
    page-break-inside: avoid;
  }

  body.printing {
    background: white !important;
    color: black !important;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Responsive Skills Grid ===== */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== MOBILE TOUCH FIXES ===== */
@media (max-width: 768px) {

  /* Disable hover effects on mobile - prevents sticky hover states */
  .skill-card:hover,
  .btn-primary:hover,
  .btn-outline:hover,
  .social-btn:hover,
  .stat-card:hover,
  .tab-btn:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  /* Skill cards - stable positioning */
  .skill-card {
    min-height: 140px;
    transition: none !important;
  }

  /* Prevent layout shift on touch */
  .skill-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Touch-friendly buttons */
  .btn,
  .tab-btn,
  .social-btn {
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Disable transform on buttons to prevent shift */
  .btn-primary:active,
  .btn-outline:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s ease !important;
  }

  /* Skills progress bar - no animation on mobile */
  .skill-progress {
    transition: none;
  }

  /* Prevent text selection during tap */
  .skill-card,
  .btn,
  .tab-btn {
    -webkit-user-select: none;
    user-select: none;
  }

  /* Smooth scroll for mobile */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Fix floating button position */
  .back-top {
    bottom: 20px;
    right: 20px;
    position: fixed !important;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .skill-card {
    padding: 16px 12px;
    min-height: 130px;
  }

  .skill-card i {
    font-size: 28px;
  }
}