/*
 * Dark Theme - Constant dark mode styles
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

body {
  background-color: #18141b;
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  letter-spacing: -0.011em;
}

#binary-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Navigation */
.navbar {
  background: rgba(26, 26, 26, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 255, 136, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: translateY(-2px);
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.nav-link {
  font-weight: 500;
  color: rgba(0, 217, 255, 0.9) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ff88, #00d9ff);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.nav-link:hover {
  color: #ffffff !important;
}

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

/* Typography */

h1, .h1, .profile-title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
}

h2, .h2, .title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #ffffff !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

h3, .h3 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: #ffffff !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

h4, .h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  line-height: 1.4;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.95) !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h5, .h5 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.4;
  letter-spacing: 0.005em;
  color: rgba(255, 255, 255, 0.92) !important;
}

h6, .h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88) !important;
}

/* Body text - optimized for readability */
p, .description, .profile-description {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  word-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.88) !important;
}

/* Section headings with proper text wrapping */
h1 span, h2 span, h3 span {
  display: inline;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Ensure text-lowercase doesn't force bold */
.text-lowercase {
  font-weight: inherit;
  text-transform: none;
}

/* Uppercase headings with proper weight */
.text-uppercase {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.text-muted {
  color: rgba(255, 255, 255, 0.78) !important;
}

.small-text {
  color: rgba(255, 255, 255, 0.78) !important;
}

.page-header .card h2 {
  font-weight: 700;
  margin-bottom: 0;
}

.page-header .card h2 small.text-muted {
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7) !important;
  display: block;
  margin-top: 0.75rem;
}

.text-white-80 {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* Cards */
.card, .card-coin {
  background: rgba(45, 45, 45, 0.6) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.1);
  color: #ffffff !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: 0 25px 50px rgba(0, 255, 136, 0.2),
              0 10px 30px rgba(0, 217, 255, 0.15);
}

.card h1, .card h2, .card h3 {
  color: #ffffff !important;
  font-weight: 600;
}

.card h4, .card h5, .card h6 {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
}

.card p, 
.card .text-muted, 
.card .profile-description {
  color: rgba(255, 255, 255, 0.88) !important;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.col-md-12 {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.col-md-12:hover {
  transform: translateY(-8px);
}

.col-md-12:hover .card-header {
  transform: translateY(-8px);
}

.col-md-12:hover .card {
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: 0 25px 50px rgba(0, 255, 136, 0.2),
              0 10px 30px rgba(0, 217, 255, 0.15);
}

.col-md-12 .card-header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 0;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.col-md-12 .card-header i {
  font-size: 2rem;
  color: #ffffff;
}

/* Profile Images */
.profile-image {
  width: 280px;
  height: 280px;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  position: relative;
  border: 4px solid transparent;
  background: linear-gradient(#18141b, #18141b) padding-box,
              linear-gradient(135deg, #00ff88, #00d9ff, #0088ff) border-box;
  box-shadow: 0 0 50px rgba(0, 255, 136, 0.4),
              0 0 90px rgba(0, 217, 255, 0.25),
              inset 0 0 30px rgba(0, 255, 136, 0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulse-glow-green 4s ease-in-out infinite;
  will-change: transform, box-shadow;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.profile-image:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 0 70px rgba(0, 255, 136, 0.6),
              0 0 140px rgba(0, 217, 255, 0.4),
              inset 0 0 40px rgba(0, 255, 136, 0.12);
  border-width: 5px;
}

@keyframes pulse-glow-green {
  0%, 100% {
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.4),
                0 0 90px rgba(0, 217, 255, 0.25),
                inset 0 0 30px rgba(0, 255, 136, 0.08);
  }
  50% {
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.5),
                0 0 110px rgba(0, 217, 255, 0.35),
                inset 0 0 35px rgba(0, 255, 136, 0.1);
  }
}

@media (max-width: 576px) {
  .profile-image {
    width: 220px !important;
    height: 220px !important;
    max-width: 90%;
  }
}

/* Buttons */
.btn-simple {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.9rem;
  color: #00ff88 !important;
  border: 2px solid transparent;
  background: linear-gradient(#0a0a0a, #0a0a0a) padding-box,
              linear-gradient(135deg, #00ff88, #00d9ff) border-box;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 180px;
  padding: 14px 28px;
  min-height: 44px;
}

.btn-simple::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-simple:hover::before {
  left: 100%;
}

.btn-simple:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 255, 136, 0.4),
              0 4px 16px rgba(0, 255, 136, 0.25);
  color: #ffffff !important;
  background: linear-gradient(#111111, #111111) padding-box,
              linear-gradient(135deg, #00ff88, #00d9ff) border-box;
}

.btn-simple:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #1a1a2e, #16213e) !important;
  border: 2px solid #00ff88;
  color: #00ff88 !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 217, 255, 0.1)) !important;
  border-color: #00ff88;
  color: #ffffff !important;
}

.btn-primary:active {
  background: linear-gradient(135deg, #00ff88, #00d9ff) !important;
  color: #000000 !important;
}

.btn-info {
  background: linear-gradient(135deg, #0f3460, #16213e) !important;
  border: 2px solid #00d9ff;
  color: #00d9ff !important;
}

.btn-info:hover {
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(0, 136, 255, 0.1)) !important;
  border-color: #00d9ff;
  color: #ffffff !important;
}

.btn-info:active {
  background: linear-gradient(135deg, #00d9ff, #0088ff) !important;
  color: #000000 !important;
}

.btn-tech-stack {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(0, 255, 136, 0.2) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  min-width: 160px;
  padding: 12px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-tech-stack img {
  width: auto;
  height: 16px;
  vertical-align: middle;
  transition: transform 0.25s ease;
}

.btn-tech-stack:hover img {
  transform: scale(1.1);
}

.btn-contact-cta {
  display: inline-block;
  padding: 1.25rem 2.5rem;
  border: 2px solid rgba(0, 255, 136, 0.5);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.08) 0%, rgba(0, 255, 136, 0.03) 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  min-width: 220px;
  min-height: 44px;
  text-decoration: none;
  text-align: center;
}

.btn-contact-cta:hover {
  border-color: rgba(0, 255, 136, 0.8);
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0.08) 100%);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
  transform: translateY(-2px);
}

.btn-contact-cta:active {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.btn-contact-cta.drew-accent {
  border-color: rgba(232, 62, 140, 0.5);
  background: linear-gradient(135deg, rgba(232, 62, 140, 0.08) 0%, rgba(232, 62, 140, 0.03) 100%);
}

.btn-contact-cta.drew-accent .icon,
.btn-contact-cta.drew-accent .text {
  color: #e83e8c;
}

.btn-contact-cta.drew-accent:hover {
  border-color: rgba(232, 62, 140, 0.8);
  background: linear-gradient(135deg, rgba(232, 62, 140, 0.15) 0%, rgba(232, 62, 140, 0.08) 100%);
  box-shadow: 0 0 30px rgba(232, 62, 140, 0.4);
}

.btn-contact-cta.evan-accent {
  border-color: rgba(0, 217, 255, 0.5);
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.08) 0%, rgba(0, 217, 255, 0.03) 100%);
}

.btn-contact-cta.evan-accent .icon,
.btn-contact-cta.evan-accent .text {
  color: #00d9ff;
}

.btn-contact-cta.evan-accent:hover {
  border-color: rgba(0, 217, 255, 0.8);
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.15) 0%, rgba(0, 217, 255, 0.08) 100%);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.4);
}

.btn-contact-cta .icon {
  font-size: 1.5rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.btn-contact-cta:hover .icon {
  transform: scale(1.1) rotate(5deg);
}

.btn-contact-cta .text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  vertical-align: middle;
  letter-spacing: 0.05em;
}

/* Keyboard Navigation & Accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid #00ff88 !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(0, 255, 136, 0.25),
              0 0 0 3px rgba(0, 255, 136, 0.5) !important;
  border-radius: 4px;
}

.btn-contact-cta:focus-visible {
  outline: 3px solid currentColor !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(0, 255, 136, 0.2) !important;
}

.nav-link:focus-visible {
  outline: 3px solid #00d9ff !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(0, 217, 255, 0.3) !important;
}

.navbar-toggler:focus-visible {
  outline: 3px solid #00ff88 !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(0, 255, 136, 0.3) !important;
}

@media (pointer: coarse) {
  .btn,
  .btn-simple,
  .btn-contact-cta {
    min-height: 48px;
    padding: 16px 32px;
  }
}

html {
  scroll-behavior: smooth;
}

section[id], div[id] {
  scroll-margin-top: 80px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-on-scroll.delay-1 {
  animation-delay: 0.2s;
}

.animate-on-scroll.delay-2 {
  animation-delay: 0.4s;
}

.animate-on-scroll.delay-3 {
  animation-delay: 0.6s;
}

.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #00ff88;
  color: #000000;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100000;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
}

.btn-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
}

.btn-wrapper .btn {
  flex: 0 1 auto;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#contact .btn-wrapper,
.page-header .btn-wrapper {
  justify-content: center;
}

@media (pointer: coarse) {
  .btn,
  .btn-simple,
  .btn-contact-cta,
  .nav-link,
  a[role="button"] {
    min-height: 44px;
    min-width: 44px;
    padding: 14px 24px;
  }
  
  .navbar-toggler {
    min-height: 44px;
    min-width: 44px;
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .btn-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  
  .btn-wrapper .btn {
    width: 100%;
    max-width: 320px;
  }
  
  .btn-simple {
    font-size: 0.85rem;
    padding: 14px 24px;
  }
}

@media (max-width: 576px) {
  .btn-simple {
    font-size: 0.8rem;
    padding: 12px 20px;
    min-width: 140px;
  }
  
  .btn-contact-cta {
    padding: 1rem 2rem;
    min-width: 200px;
  }
}

.cursor {
  position: fixed;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,136,0.4), rgba(0,217,255,0.2));
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
  z-index: 9999;
  mix-blend-mode: screen;
  border: 2px solid rgba(0,255,136,0.3);
}

.cursor.hover {
  transform: translate(-50%, -50%) scale(1.8);
  background: radial-gradient(circle, rgba(0,255,136,0.6), rgba(0,217,255,0.3));
}

/* Section Spacing - Optimized for sleek design */
.section {
  padding: 4rem 0;
  position: relative;
  z-index: 1;
}

.page-header {
  padding: 6rem 0 3rem;
  padding-top: max(100px, 6rem);
  position: relative;
  overflow: hidden;
}

.profile-page .page-header .container {
  padding-top: 0 !important;
}

.col-lg-10, .col-md-8, .col-lg-6, .col-md-6, .col-md-5, .col-lg-5,
[class*="col-"] {
  position: relative;
}

.text-on-back {
  position: relative;
  z-index: 0;
  font-size: 9.5em;
  margin-left: -4px;
  margin-top: 0;
  margin-bottom: -0.5em;
  font-weight: 900;
  color: hsla(0, 0%, 100%, 0.08) !important;
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
  pointer-events: none;
}

.profile-page .profile-title,
.profile-title {
  position: relative;
  top: 0;
  left: 0;
  margin-top: -0.8em;
  margin-left: 60px;
  z-index: 2;
}

.profile-description,
.card,
.btn-wrapper {
  position: relative;
  z-index: 1;
}

.container {
  position: relative;
  z-index: 1;
}

/* HR Dividers */
hr {
  margin: 4rem auto;
  width: 100%;
  max-width: 1200px;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 255, 136, 0.1) 20%,
    rgba(0, 255, 136, 0.3) 50%,
    rgba(0, 255, 136, 0.1) 80%,
    transparent 100%);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
  opacity: 1;
}

/* Contact Section */
#contact {
  padding: 5rem 0 6rem;
  margin-bottom: 0;
  position: relative;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00ff88, #00d9ff, transparent);
}

#contact .title {
  margin-bottom: 30px;
  font-size: 3rem;
  text-align: center;
  background: linear-gradient(135deg, #00ff88, #00d9ff, #0088ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#contact .description {
  max-width: 600px;
  margin: 0 auto 50px;
  line-height: 1.8;
  font-size: 1.15rem;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  opacity: 0.9;
}

#contact .btn-wrapper {
  justify-content: center;
  margin-top: 40px;
  gap: 30px;
  display: flex;
  align-items: center;
}

#contact .btn {
  margin: 0;
  padding: 16px 40px;
  font-size: 1.05rem;
  min-width: 200px;
}

/* Footer Spacing & Typography */
footer {
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .row {
  margin-bottom: 1.5rem;
}

footer .row:last-child {
  margin-bottom: 0;
}

footer h4 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1rem 0;
  text-align: center;
  letter-spacing: 0.05em;
}

footer p,
footer .description,
footer a,
footer span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

footer a {
  transition: all 0.3s ease;
  text-decoration: none;
}

/* Info Sections - Hacker Theme */
.info.info-horizontal {
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  background: rgba(45, 45, 45, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info.info-horizontal:hover {
  transform: translateX(10px);
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(45, 45, 45, 0.5);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.info .icon {
  transition: all 0.3s ease;
}

.info:hover .icon {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.5));
}

.container > .row {
  margin-bottom: 0;
}

.container > .row:last-child {
  margin-bottom: 0;
}

.card-coin.card-plain {
  margin-bottom: 1.5rem;
  border-radius: 16px;
  overflow: hidden;
}

.card-body {
  padding: 2rem;
}

.img-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.section .container {
  padding: 0 15px;
}

/* Column width constraints for better wrapping */
.col-md-auto {
  max-width: 100%;
  flex: 0 0 auto;
}

.col-md-auto h1,
.col-md-auto h2 {
  max-width: 100%;
  padding-right: 15px;
}

/* Responsive Design - Mobile Optimizations */

@media (max-width: 767px) {
  /* Better button layout on smaller tablets */
  .btn-wrapper {
    flex-direction: column;
    gap: 16px;
  }
  
  .btn-wrapper .btn {
    width: 100%;
    max-width: 400px;
  }
}

/* Medium screens - Tablet landscape and smaller desktops */
@media (max-width: 991px) {
  h1, .h1 { 
    font-size: clamp(1.85rem, 5.5vw, 2.75rem);
    line-height: 1.3;
  }
  
  .col-md-auto h1 {
    padding-right: 20px;
  }
  
  .card-body p {
    font-size: 0.95rem;
    line-height: 1.7;
    padding: 0 10px;
  }
  
  .section .container {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }

  .page-header {
    padding: 6rem 0 3rem;
    padding-top: max(120px, 6rem);
  }

  h1, .h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  h2, .h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
  h3, .h3 { font-size: clamp(1.25rem, 4vw, 1.5rem); }

  .text-on-back {
    font-size: 6rem;
    margin-left: -2px;
    margin-top: 0;
    margin-bottom: -0.3em;
  }
  
  .profile-title {
    position: relative;
    top: auto;
    left: 0;
    margin-top: -0.6em;
    margin-left: 20px;
    margin-bottom: 5%;
  }

  #active-deployments {
    padding: 3rem 0;
  }
  
  #active-deployments canvas {
    height: 300px !important;
  }
  
  .pulse-node {
    max-width: 280px !important;
    margin: 0 auto;
  }
  
  .pulse-node-inner {
    width: 100px !important;
    height: 100px !important;
  }
  
  .pulse-node-inner svg {
    width: 55px !important;
    height: 55px !important;
  }
  
  .ticker-badge {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.6rem !important;
  }

  #github .row {
    flex-direction: column;
  }
  
  #github .col-lg-6,
  #github .col-lg-5 {
    margin-bottom: 2rem;
  }
  
  #github .card-coin.card-plain {
    padding: 2rem !important;
  }

  /* About sections - Drew and Evan */
  #about-drew .row,
  #about-evan .row {
    flex-direction: column;
  }
  
  #about-drew .col-lg-6,
  #about-drew .col-lg-5,
  #about-evan .col-lg-6,
  #about-evan .col-lg-5 {
    margin-bottom: 2rem;
  }
  
  #about-drew .card-coin.card-plain,
  #about-evan .card-coin.card-plain {
    padding: 2rem !important;
    margin-top: 2rem !important;
  }

  /* Contact section mobile improvements */
  #contact {
    padding: 3rem 0 4rem;
    margin-bottom: 0;
  }

  #contact .title {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    margin-bottom: 1rem;
    text-align: center;
  }

  #contact .description {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 20px;
    text-align: center;
  }

  #contact .btn-wrapper {
    margin-top: 2rem;
    flex-direction: column;
    gap: 20px;
  }

  #contact .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    font-size: 0.9rem;
    padding: 14px 28px;
  }
  
  #contact .btn-contact-cta {
    width: 100%;
    max-width: 300px;
    padding: 1rem 1.5rem;
  }

  hr {
    margin: 3rem auto;
  }

  footer {
    padding: 3rem 0 2rem;
    margin-top: 3rem;
  }

  footer h4 {
    font-size: 1rem;
    margin: 0.75rem 0;
    text-align: center;
  }

  .profile-image {
    width: 240px !important;
    height: 240px !important;
    max-width: 85%;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.35),
                0 0 70px rgba(0, 217, 255, 0.25),
                inset 0 0 25px rgba(0, 255, 136, 0.08);
    margin-bottom: 2rem !important;
  }

  .navbar-brand {
    font-size: 0.9rem;
  }

  .btn-wrapper {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .btn-wrapper .btn {
    width: 100%;
    max-width: 320px;
    font-size: 0.85rem;
    padding: 12px 24px;
  }

  .card {
    margin-bottom: 1.5rem;
  }

  .card-body {
    padding: 1.5rem;
  }

  .info.info-horizontal {
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
  }
  
  /* Ensure images scale properly on mobile */
  img.img-fluid {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Better tech stack button layout */
  .page-header .btn-wrapper {
    justify-content: center;
  }
  
  .page-header .btn-wrapper .btn {
    min-width: 140px;
    font-size: 0.8rem;
    padding: 10px 18px;
  }
}

/* Extra small devices (phones in portrait) - 576px and below */
@media (max-width: 576px) {
  .section {
    padding: 2.5rem 0;
  }
  
  .page-header {
    padding: 5rem 0 2.5rem;
    padding-top: max(100px, 5rem);
  }
  
  h1, .h1 { font-size: clamp(1.5rem, 8vw, 2rem); }
  h2, .h2 { font-size: clamp(1.35rem, 7vw, 1.75rem); }
  
  .text-on-back {
    font-size: 4.5rem;
    margin-bottom: -0.25em;
  }
  
  .profile-title {
    margin-left: 15px;
    font-size: clamp(1.5rem, 8vw, 2rem);
  }
  
  .profile-image {
    width: 200px !important;
    height: 200px !important;
    max-width: 80%;
  }
  
  /* Smaller card padding on tiny screens */
  .card-coin.card-plain {
    padding: 1.5rem !important;
  }
  
  .card-body {
    padding: 1rem !important;
  }
  
  /* Smaller buttons on very small screens */
  .btn-simple {
    font-size: 0.75rem;
    padding: 10px 18px;
    min-width: 120px;
  }
  
  .btn-wrapper .btn {
    max-width: 280px;
  }
  
  /* Tech stack badges - 2 per row on tiny screens */
  .page-header .btn-wrapper {
    gap: 12px;
  }
  
  .page-header .btn-wrapper .btn {
    min-width: calc(50% - 8px);
    font-size: 0.7rem;
    padding: 8px 14px;
  }
  
  /* Deployment cards on mobile */
  .pulse-node {
    max-width: 240px !important;
  }
  
  .pulse-node-inner {
    width: 90px !important;
    height: 90px !important;
  }
  
  .pulse-node-inner svg {
    width: 50px !important;
    height: 50px !important;
  }
  
  /* Contact section on tiny screens */
  #contact .btn-contact-cta {
    max-width: 260px;
    padding: 0.9rem 1.25rem;
    font-size: 0.85rem;
  }
  
  /* Footer adjustments */
  footer {
    padding: 2.5rem 0 1.5rem;
  }
  
  footer h4 {
    font-size: 0.95rem;
  }
  
  footer p,
  footer span {
    font-size: 0.8rem;
  }
}

/* Large devices optimization (desktops) - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  
  .profile-description {
    font-size: 0.98rem;
    line-height: 1.7;
  }
}

/* Extra large devices (large desktops) - 1200px and up */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .section {
    padding: 5rem 0;
  }
}

/* Ultra-wide displays - 1400px and up */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  /* Larger spacing for ultra-wide */
  .section {
    padding: 6rem 0;
  }
  
  h1, .h1 {
    font-size: 4rem;
  }
  
  h2, .h2 {
    font-size: 3rem;
  }
}
