/* ===================================================
   Caio Cabral — Portfolio Custom CSS
   Dark Theme with Blue Accent (default) + Multi-theme support
   =================================================== */

/* ---------- CSS Variables (default: Blue) ---------- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #101830;
  --bg-card: #152040;
  --bg-card-hover: #1c2a55;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --border-color: rgba(59, 130, 246, 0.1);
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-width: 0;
}

/* Override Bootstrap .text-muted for dark theme contrast */
.text-muted {
  color: var(--text-secondary) !important;
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--accent-hover);
}

/* Prevent any section from causing horizontal overflow */
section,
header,
footer {
  overflow-x: clip;
}

/* Break long words/URLs on small screens */
p,
a,
span,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- Utility ---------- */
.text-accent {
  color: var(--accent) !important;
}
.bg-darker {
  background: var(--bg-secondary) !important;
}
.fw-500 {
  font-weight: 500;
}
.fw-800 {
  font-weight: 800;
}

.section-padding {
  padding: 100px 0;
}

/* ---------- Section Headers ---------- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 4px;
  margin-top: 12px;
}

/* ---------- Navbar ---------- */
#mainNav {
  background: rgba(15, 15, 35, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  transition: var(--transition);
}

#mainNav.scrolled {
  padding: 6px 0;
  background: rgba(15, 15, 35, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#mainNav .navbar-brand {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  letter-spacing: -1px;
}

#mainNav .nav-link {
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 16px !important;
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition);
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--accent);
}

#mainNav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: var(--transition);
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
  width: 60%;
}

.navbar-toggler {
  color: var(--text-primary);
  font-size: 1.25rem;
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
  padding-top: 80px;
}

.hero-main-row {
  min-height: calc(100vh - 220px);
}

.hero-bg-animation {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(0, 212, 170, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(100, 100, 255, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 60% 80%,
      rgba(0, 212, 170, 0.04) 0%,
      transparent 50%
    );
  animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: scale(1) translate(0, 0);
  }
  25% {
    transform: scale(1.02) translate(10px, -10px);
  }
  50% {
    transform: scale(1) translate(-5px, 5px);
  }
  75% {
    transform: scale(1.01) translate(5px, 10px);
  }
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.hero-title {
  line-height: 1.1;
  letter-spacing: -2px;
}

.hero-typing {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  min-height: 30px;
}

.typing-cursor {
  animation: blink 0.7s step-end infinite;
  color: var(--accent);
  font-weight: 300;
}

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

.hero-description {
  max-width: 520px;
  line-height: 1.7;
  color: var(--text-secondary) !important;
  width: 100%;
}

/* Hero Buttons */
.btn-accent {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  border: none;
  border-radius: 12px;
  transition: var(--transition);
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-outline-light {
  border-radius: 12px;
  font-weight: 600;
}

.btn-outline-accent {
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-outline-accent:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Social Icons */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1.15rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.social-icon:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* Make hero primary button and social icons consistent and aligned */
.hero-buttons {
  align-items: center; /* vertically center button and social icons */
}

/* Desktop: remove the extra top margin applied via utility class and
   force consistent heights for visual alignment */
@media (min-width: 992px) {
  .hero-social {
    margin-top: 0 !important;
  }
  .hero-buttons .btn {
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }
  .hero-social .social-icon {
    width: 48px;
    height: 48px;
  }
}

/* Small screens: keep stacked layout and spacing */
@media (max-width: 991.98px) {
  .hero-buttons {
    justify-content: center;
  }
}

/* Hero Avatar */
.hero-avatar-wrapper {
  position: relative;
  display: inline-block;
}

.hero-avatar-wrapper::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent),
    rgba(100, 100, 255, 0.6),
    var(--accent)
  );
  animation: avatarSpin 6s linear infinite;
  opacity: 0.6;
}

@keyframes avatarSpin {
  to {
    transform: rotate(360deg);
  }
}

.hero-avatar {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-primary);
  position: relative;
  z-index: 1;
}

/* ---------- About Section ---------- */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

/* ---------- Project Icons (images used alongside font icons) ---------- */
.project-image .project-icon-img {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  display: inline-block;
}

.modal-icon-img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  display: inline-block;
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-card strong {
  color: var(--accent);
}

.hero-tech {
  width: 100%;
  margin-top: 14px;
  margin-bottom: 64px;
  display: flex;
  justify-content: center;
}

.tech-grid.hero-tech-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.tech-grid.hero-tech-grid .tech-item {
  flex: 0 0 130px;
  min-height: 118px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 18px 14px;
  border-radius: 12px;
  font-size: 1rem;
}

.tech-grid.hero-tech-grid .tech-item i {
  font-size: 2.2rem;
}

/* Tech Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 16px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tech-item i {
  font-size: 2.2rem;
  color: var(--accent);
  transition: var(--transition);
}

.tech-item:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.tech-item:hover i {
  transform: scale(1.15);
}

/* ---------- Projects Section ---------- */
.filter-buttons .btn-filter {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 20px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-buttons .btn-filter:hover,
.filter-buttons .btn-filter.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

/* Project Cards */
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 20px var(--accent-glow);
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-secondary);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

.project-image-icon {
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 212, 170, 0.2);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: var(--transition);
}

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

.project-info {
  padding: 20px;
}

.project-tech {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.project-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 6px 0 4px;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Projects card hide/show */
.projects-card {
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.projects-card.hide {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

/* ---------- Organization Section ---------- */
.org-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.org-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 15px var(--accent-glow);
}

.org-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.org-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 2px solid var(--border-color);
}

.org-name {
  font-size: 1.3rem;
  font-weight: 700;
}

.org-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.org-description {
  color: var(--text-secondary);
  line-height: 1.7;
  flex-grow: 1;
}

.org-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.org-tech-badge {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.repo-link {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
}

.repo-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 170, 0.08);
}

.org-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
}

/* ---------- Education / Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 40px;
  max-width: 720px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border-color));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -33px;
  top: 8px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-header {
  align-items: flex-start !important;
  gap: 12px;
}

.timeline-header .timeline-date {
  margin-left: auto;
  text-align: right;
  line-height: 1.2;
  padding-top: 2px;
}

.timeline-content .d-flex > div {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 767.98px) {
  .timeline-header {
    flex-wrap: wrap;
  }
  .timeline-header .timeline-date {
    width: 100%;
    margin-left: 0;
    text-align: left;
    padding-top: 4px;
    white-space: normal;
  }
}

/* ---------- Contact Section ---------- */
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: var(--transition);
  color: var(--text-primary);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.3),
    0 0 15px var(--accent-glow);
  color: var(--text-primary);
}

.contact-icon {
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 14px;
  transition: var(--transition);
}

.contact-card:hover .contact-icon {
  transform: scale(1.15);
}

.contact-card h5 {
  font-weight: 700;
  margin-bottom: 4px;
}

/* ---------- Certifications ---------- */
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px 20px;
  transition: var(--transition);
  color: var(--text-primary);
  text-decoration: none;
  height: 100%;
}

.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.3),
    0 0 15px var(--accent-glow);
  color: var(--text-primary);
}

.cert-icon {
  font-size: 2.5rem;
  color: var(--accent);
  transition: var(--transition);
}

.cert-card:hover .cert-icon {
  transform: scale(1.15);
}

.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.cert-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ---------- Theme Switcher ---------- */

/* Teal theme — dark purple gradient with teal/cyan accent */
[data-theme="teal"] {
  --bg-primary: #0f0f23;
  --bg-secondary: #161634;
  --bg-card: #1a1a3e;
  --bg-card-hover: #222255;
  --accent: #00d4aa;
  --accent-hover: #00f0c0;
  --accent-glow: rgba(0, 212, 170, 0.25);
  --text-primary: #e8e8f0;
  --text-secondary: #b8b8d8;
  --border-color: rgba(255, 255, 255, 0.06);
}

/* Orange theme — dark warm gradient with fiery orange-red accent */
[data-theme="orange"] {
  --bg-primary: #1a0e08;
  --bg-secondary: #261510;
  --bg-card: #351c12;
  --bg-card-hover: #45261a;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.25);
  --text-primary: #fef2e8;
  --text-secondary: #d4a882;
  --border-color: rgba(249, 115, 22, 0.1);
}

/* Green theme — dark forest gradient with emerald accent */
[data-theme="green"] {
  --bg-primary: #081a10;
  --bg-secondary: #0e2618;
  --bg-card: #123520;
  --bg-card-hover: #1a4530;
  --accent: #22c55e;
  --accent-hover: #4ade80;
  --accent-glow: rgba(34, 197, 94, 0.25);
  --text-primary: #e8f5ee;
  --text-secondary: #86c4a0;
  --border-color: rgba(34, 197, 94, 0.1);
}

.theme-switcher-section {
  padding: 48px 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.theme-switcher-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.theme-btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
  color: var(--text-primary);
}

.theme-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.theme-btn-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.theme-btn-swatch[data-color="default"] {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.theme-btn-swatch[data-color="teal"] {
  background: linear-gradient(135deg, #00d4aa, #00f0c0);
}

.theme-btn-swatch[data-color="orange"] {
  background: linear-gradient(135deg, #ea580c, #fb923c);
}

.theme-btn-swatch[data-color="green"] {
  background: linear-gradient(135deg, #16a34a, #4ade80);
}

/* ---------- Footer ---------- */
.footer-section {
  padding: 40px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-section .text-muted {
  color: var(--text-secondary) !important;
}

.scroll-top {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* ---------- Modals ---------- */
.modal-content {
  background: var(--bg-secondary) !important;
  border-radius: var(--radius);
}

.modal-header .modal-title {
  color: var(--text-primary);
}

.modal-body p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-body video,
.modal-body img {
  border-radius: 12px;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ---------- Responsive ---------- */
@media (min-width: 1400px) {
  .hero-avatar {
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 991.98px) {
  .hero-section .row {
    text-align: center;
  }
  .hero-main-row {
    min-height: auto;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-social {
    justify-content: center;
  }
  .hero-description {
    margin: 0 auto 24px;
  }
  .hero-tech {
    margin: 0 auto;
  }
  .hero-avatar {
    width: 200px;
    height: 200px;
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    height: auto;
  }

  .section-padding {
    padding: 70px 0;
  }

  .timeline {
    padding-left: 30px;
  }
  .timeline-marker {
    left: -23px;
  }

  /* Prevent AOS horizontal animations from overflowing */
  [data-aos="fade-left"],
  [data-aos="fade-right"] {
    overflow: visible;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .section-padding {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.8rem !important;
  }

  .org-card {
    padding: 20px;
  }

  .timeline-content {
    padding: 18px;
  }
  .timeline-date {
    font-size: 0.75rem;
  }

  /* Container safety margin */
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 575.98px) {
  .hero-avatar {
    width: 160px;
    height: 160px;
  }
  .hero-title {
    font-size: 1.9rem;
  }
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-title {
    font-size: 1.5rem !important;
  }
  .hero-greeting {
    font-size: 0.95rem;
  }
  .hero-typing {
    font-size: 0.95rem;
  }
  .hero-description {
    font-size: 0.95rem;
  }

  .org-card-header {
    flex-direction: column;
    text-align: center;
  }
  .org-footer {
    justify-content: center;
  }

  .cert-card {
    padding: 20px 14px;
  }

  .contact-card {
    padding: 24px 16px;
  }
  .contact-card p {
    font-size: 0.82rem;
  }

  /* Ensure modal content doesn't overflow */
  .modal-body video,
  .modal-body img {
    max-width: 100%;
    height: auto;
  }
}
