:root {
  color-scheme: dark;
}
html {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Accessible focus styles */
:focus {
  outline: none;
}
:focus-visible {
  outline: 3px solid rgba(28,130,255,0.18);
  outline-offset: 2px;
  border-radius: 6px;
}
.title-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 0.3rem;
}
.title-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #1c82ff, transparent);
  transform-origin: left;
  transform: scaleX(0.6);
  transition: transform 0.5s ease;
}
.title-underline.is-visible::after {
  transform: scaleX(1);
}
.gradient-border {
  position: relative;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(28, 130, 255, 0.9), rgba(28, 130, 255, 0.2));
}
.gradient-border > .inner {
  border-radius: calc(1rem - 1px);
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(6px);
}

/* interactive-card styles (previously inline in index.html) */
.interactive-card {
  position: relative;
  transform-style: preserve-3d;
  will-change: auto;
}

/* subtle light overlay that appears on hover (instant, no animation) */
.interactive-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  mix-blend-mode: screen;
  opacity: 0;
  background: radial-gradient(circle at 18% 20%, rgba(255,255,255,0.06), transparent 18%), linear-gradient(120deg, rgba(28,130,255,0.03), transparent 40%);
}
.interactive-card:hover::after {
  opacity: 1;
}

/* make the icon glow on hover (instant) */
.interactive-card .icon {
  display: inline-grid;
  place-items: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
}
.interactive-card:hover .icon {
  box-shadow: 0 10px 30px rgba(28,130,255,0.12), 0 2px 6px rgba(2,6,23,0.6);
}

/* slight emphasis via border color on hover (instant) */
.interactive-card:hover {
  border-color: rgba(28,130,255,0.32);
}

/* ===== ENHANCED EXPERIENCE SECTION RESPONSIVENESS ===== */

/* Experience timeline container */
.experience-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Timeline vertical line - hidden on mobile */
.timeline-line {
  position: absolute;
  left: 2rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 1px;
  background: rgba(148, 163, 184, 0.3);
  display: none;
}

@media (min-width: 640px) {
  .timeline-line {
    display: block;
  }
}

/* Experience card responsive layout */
.experience-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.experience-card:hover {
  border-color: rgba(28, 130, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(28, 130, 255, 0.1);
}

/* Mobile-first layout */
@media (max-width: 639px) {
  .experience-card {
    padding: 1.25rem;
    margin-left: 0;
  }
  
  .experience-card .icon {
    position: static !important;
    display: inline-flex;
    margin-bottom: 1rem;
    margin-right: 0;
  }
  
  .experience-card .content-wrapper {
    margin-left: 0;
  }
  
  .experience-card .header-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .experience-card .title-group {
    order: 1;
  }
  
  .experience-card .date-badge {
    order: 2;
    align-self: flex-start;
    margin-top: 0;
  }
  
  .experience-card .tech-tags {
    order: 3;
    margin-top: 0.75rem;
  }
}

/* Tablet and desktop layout */
@media (min-width: 640px) {
  .experience-card {
    padding-left: 4rem;
    margin-left: 1rem;
  }
  
  .experience-card .icon {
    position: absolute;
    left: -2rem;
    top: 1.5rem;
    z-index: 10;
  }
  
  .experience-card .header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .experience-card .title-group {
    flex: 1;
    min-width: 0;
  }
  
  .experience-card .date-badge {
    flex-shrink: 0;
    margin-top: 0;
  }
}

/* Icon styling */
.experience-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #1C82FF, #0066CC);
  color: white;
  box-shadow: 0 4px 12px rgba(28, 130, 255, 0.3);
  transition: all 0.3s ease;
}

.experience-icon.secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.experience-icon.tertiary {
  background: linear-gradient(135deg, rgba(28, 130, 255, 0.8), rgba(28, 130, 255, 0.6));
}

.experience-icon svg {
  width: 1rem;
  height: 1rem;
}

/* Content styling */
.experience-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.experience-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.experience-date {
  font-size: 0.75rem;
  color: #64748b;
  background: rgba(30, 41, 59, 0.5);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  white-space: nowrap;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background: rgba(28, 130, 255, 0.1);
  border-color: rgba(28, 130, 255, 0.3);
  color: #1C82FF;
}

.experience-description {
  margin-top: 1rem;
  line-height: 1.6;
}

.experience-description ul {
  list-style: none;
  padding: 0;
  space-y: 0.5rem;
}

.experience-description li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.experience-description li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #1C82FF;
  font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .experience-card {
    padding: 1rem;
  }
  
  .experience-title {
    font-size: 1rem;
  }
  
  .experience-subtitle {
    font-size: 0.8rem;
  }
  
  .tech-tags {
    gap: 0.375rem;
  }
  
  .tech-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
}

@media (min-width: 768px) {
  .experience-timeline {
    gap: 2.5rem;
  }
  
  .experience-card {
    padding: 2rem;
    padding-left: 5rem;
  }
  
  .experience-icon {
    width: 3rem;
    height: 3rem;
  }
  
  .experience-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* ===== FLOATING BACK TO TOP BUTTON ANIMATIONS ===== */
#toTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #1C82FF 0%, #0066CC 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 20px rgba(28, 130, 255, 0.3),
    0 2px 10px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0) scale(1);
  will-change: transform;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#toTop.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
}

#toTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: toTopAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover Effects */
#toTop:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 8px 30px rgba(28, 130, 255, 0.4),
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #2A8FFF 0%, #1C82FF 100%);
}

#toTop:active {
  transform: translateY(-1px) scale(1.02);
  transition: all 0.1s ease;
}

/* Floating animation when idle */
@keyframes toTopFloat {
  0%, 100% { 
    transform: translateY(0) scale(1); 
  }
  50% { 
    transform: translateY(-4px) scale(1); 
  }
}

/* Appear animation */
@keyframes toTopAppear {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.8) rotate(-10deg);
  }
  50% {
    transform: translateY(-5px) scale(1.1) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

/* Arrow icon animation */
#toTop::before {
  content: '↑';
  transition: transform 0.2s ease;
  display: block;
}

#toTop:hover::before {
  transform: translateY(-2px);
  animation: arrowBounce 0.6s ease-in-out;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(-6px); }
}

/* Magnetic effect - will be controlled by JavaScript */
#toTop.magnetic {
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Ripple effect on click */
#toTop::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
}

#toTop.ripple::after {
  width: 120%;
  height: 120%;
}

/* Focus styles for accessibility */
#toTop:focus-visible {
  outline: 3px solid rgba(28, 130, 255, 0.5);
  outline-offset: 4px;
}

/* Pulse animation for attention */
@keyframes toTopPulse {
  0% {
    box-shadow: 
      0 4px 20px rgba(28, 130, 255, 0.3),
      0 2px 10px rgba(0, 0, 0, 0.2),
      0 0 0 0 rgba(28, 130, 255, 0.7);
  }
  70% {
    box-shadow: 
      0 4px 20px rgba(28, 130, 255, 0.3),
      0 2px 10px rgba(0, 0, 0, 0.2),
      0 0 0 15px rgba(28, 130, 255, 0);
  }
  100% {
    box-shadow: 
      0 4px 20px rgba(28, 130, 255, 0.3),
      0 2px 10px rgba(0, 0, 0, 0.2),
      0 0 0 0 rgba(28, 130, 255, 0);
  }
}

#toTop.pulse {
  animation: toTopPulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #toTop {
    bottom: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #toTop {
    animation: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
  }
  
  #toTop:hover {
    transform: none !important;
  }
  
  #toTop::before,
  #toTop::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== ENHANCED NAVBAR STYLES ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(2, 6, 23, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, background-color;
}

.navbar.scrolled {
  background: rgba(2, 6, 23, 0.95);
  border-bottom: 1px solid rgba(28, 130, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  transition: padding 0.3s ease;
}

.navbar.scrolled .navbar-container {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Logo/Brand Section */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.navbar-brand:hover {
  transform: translateY(-1px);
}

.navbar-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(28, 130, 255, 0.9) 0%, rgba(28, 130, 255, 0.5) 100%);
  box-shadow: 
    0 4px 12px rgba(28, 130, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.navbar-brand:hover .navbar-logo::before {
  left: 100%;
}

.navbar-logo::after {
  content: 'D';
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  position: relative;
  z-index: 1;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
}

.navbar-brand-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  color: #f8fafc;
  margin: 0;
}

.navbar-brand-subtitle {
  font-size: 0.75rem;
  line-height: 1.2;
  color: #94a3b8;
  margin: 0;
  transition: color 0.2s ease;
}

.navbar-brand:hover .navbar-brand-subtitle {
  color: #1C82FF;
}

/* Main Navigation */
.navbar-nav {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .navbar-nav {
    display: flex;
  }
}

.navbar-nav-item {
  position: relative;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.navbar-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(28, 130, 255, 0.1), rgba(28, 130, 255, 0.05));
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: inherit;
}

.navbar-nav-item:hover::before {
  opacity: 1;
}

.navbar-nav-item:hover {
  color: #1C82FF;
  transform: translateY(-1px);
}

.navbar-nav-item.active {
  color: #1C82FF;
  background: rgba(28, 130, 255, 0.1);
}

.navbar-nav-item.active::before {
  opacity: 1;
}

/* CTA Button */
.navbar-cta {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .navbar-cta {
    display: flex;
  }
}

.navbar-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #1C82FF 0%, #0066CC 100%);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(28, 130, 255, 0.3);
  position: relative;
  overflow: hidden;
}

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

.navbar-cta-button:hover::before {
  left: 100%;
}

.navbar-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(28, 130, 255, 0.4);
  background: linear-gradient(135deg, #2A8FFF 0%, #1C82FF 100%);
}

.navbar-cta-button:active {
  transform: translateY(-1px);
}

/* Mobile Menu Button */
.mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.5);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

.mobile-menu-button:hover {
  border-color: #1C82FF;
  background: rgba(28, 130, 255, 0.1);
  color: #1C82FF;
}

.mobile-menu-button:focus-visible {
  outline: 2px solid #1C82FF;
  outline-offset: 2px;
}

/* Hamburger Icon Animation */
.hamburger {
  width: 1rem;
  height: 1rem;
  position: relative;
  transition: transform 0.3s ease;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

.mobile-menu-button[aria-expanded="true"] .hamburger span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-button[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
  transform: translateX(-100%);
}

.mobile-menu-button[aria-expanded="true"] .hamburger span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Mobile Navigation */
.mobile-nav {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }
}

.mobile-nav-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-item {
  display: block;
  padding: 0.75rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.mobile-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(28, 130, 255, 0.1), rgba(28, 130, 255, 0.05));
  transition: left 0.3s ease;
}

.mobile-nav-item:hover::before {
  left: 0;
}

.mobile-nav-item:hover {
  color: #1C82FF;
  background: rgba(28, 130, 255, 0.05);
  transform: translateX(4px);
}

.mobile-nav-item.active {
  color: #1C82FF;
  background: rgba(28, 130, 255, 0.1);
}

/* Mobile CTA */
.mobile-nav-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.mobile-nav-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #1C82FF 0%, #0066CC 100%);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(28, 130, 255, 0.3);
}

.mobile-nav-cta-button:hover {
  background: linear-gradient(135deg, #2A8FFF 0%, #1C82FF 100%);
  box-shadow: 0 4px 12px rgba(28, 130, 255, 0.4);
  transform: translateY(-1px);
}

/* Animation classes */
.slide-down {
  animation: slideDown 0.3s ease-out;
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

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

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

/* Active section indicator */
.navbar-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #1C82FF;
  border-radius: 50%;
}

/* Smooth scrolling enhancement */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Responsive design enhancements */
@media (max-width: 640px) {
  .navbar-container {
    padding: 0 0.75rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .navbar.scrolled .navbar-container {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .navbar-brand-name {
    font-size: 0.9rem;
  }
  
  .navbar-brand-subtitle {
    font-size: 0.7rem;
  }
  
  .navbar-logo {
    width: 2rem;
    height: 2rem;
  }
  
  .mobile-menu-button {
    width: 2.25rem;
    height: 2.25rem;
  }
}

/* High DPI / Retina display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .navbar-logo::before {
    transform: translateZ(0);
  }
}

/* Dark mode adjustments (if needed) */
@media (prefers-color-scheme: dark) {
  .navbar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  }
}

/* Focus improvements for keyboard navigation */
.navbar-nav-item:focus-visible,
.mobile-nav-item:focus-visible {
  outline: 2px solid #1C82FF;
  outline-offset: 2px;
  border-radius: 0.375rem;
}

.navbar-brand:focus-visible {
  outline: 2px solid #1C82FF;
  outline-offset: 4px;
  border-radius: 0.5rem;
}

/* Loading state for brand logo */
.navbar-logo.loading::after {
  content: '';
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Enhanced mobile menu animations */
@media (max-width: 768px) {
  .mobile-nav {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  
  .mobile-nav.slide-down {
    animation: mobileNavSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .mobile-nav.slide-up {
    animation: mobileNavSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@keyframes mobileNavSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: calc(100vh - 80px);
  }
}

@keyframes mobileNavSlideUp {
  from {
    opacity: 1;
    transform: translateY(0);
    max-height: calc(100vh - 80px);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .navbar,
  .navbar-nav-item,
  .navbar-cta-button,
  .mobile-nav-item,
  .hamburger span,
  .navbar-logo::before {
    transition: none !important;
    animation: none !important;
  }
  
  .slide-down,
  .slide-up {
    animation: none !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ===== HERO SECTION RESPONSIVE LAYOUT ===== */
.hero-container {
  margin-top: 0.5rem;
}

/* Mobile Layout: Photo on top, content below */
@media (max-width: 767px) {
  .hero-container {
    margin-top: 1rem;
  }
  
  .hero-photo {
    grid-area: photo;
    order: 1;
  }
  
  .hero-content {
    grid-area: content;
    order: 2;
  }
  
  .hero-photo .reveal {
    max-width: 260px;
    margin: 0 auto;
  }
  
  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-content p {
    font-size: 1rem;
    line-height: 1.6;
  }
}

/* Tablet and Desktop Layout: Side by side */
@media (min-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr auto;
    grid-template-areas: "content photo";
    gap: 3rem;
    align-items: center;
    margin-top: 1rem;
  }
  
  .hero-content {
    grid-area: content;
    order: 1;
  }
  
  .hero-photo {
    grid-area: photo;
    order: 2;
    max-width: 300px;
  }
}

/* Large Desktop Layout */
@media (min-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr 380px;
    gap: 4rem;
    margin-top: 1.5rem;
  }
  
  .hero-photo {
    max-width: 380px;
  }
}

/* Extra responsive adjustments */
@media (max-width: 480px) {
  .hero-photo .reveal {
    max-width: 220px;
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .hero-content .mt-7 {
    margin-top: 1.5rem;
  }
  
  .hero-content .gap-3 {
    gap: 0.75rem;
  }
  
  .hero-content a {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
  }
}

/* Profile photo enhancements */
.hero-photo .reveal {
  transition: transform 0.3s ease, opacity 0.7s ease;
}

.hero-photo .reveal:hover {
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .hero-photo .reveal:hover {
    transform: translateY(-4px);
  }
}

/* Profile image styling */
.hero-photo img {
  transition: transform 0.3s ease;
  filter: brightness(1.05) contrast(1.02);
}

.hero-photo:hover img {
  transform: scale(1.02);
}

/* Enhanced photo container for mobile */
@media (max-width: 767px) {
  .hero-photo .aspect-\[4\/5\] {
    aspect-ratio: 1/1;
  }
  
  .hero-photo .rounded-2xl {
    border-radius: 1.5rem;
  }
  
  .hero-container {
    margin-top: 1.5rem;
  }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
  .hero-container {
    gap: 2rem;
    margin-top: 1rem;
  }
  
  .hero-photo .reveal {
    max-width: 220px;
  }
}

/* Hero content animations */
.hero-content h1.reveal {
  animation: fadeInUp 0.8s ease-out both;
  animation-delay: 0.2s;
}

.hero-content p.reveal {
  animation: fadeInUp 0.8s ease-out both;
  animation-delay: 0.4s;
}

.hero-content .reveal.delay-2 {
  animation: fadeInUp 0.8s ease-out both;
  animation-delay: 0.6s;
}

.hero-photo .reveal {
  animation: fadeInScale 0.8s ease-out both;
  animation-delay: 0.3s;
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Mobile-first stacking animation */
@media (max-width: 767px) {
  .hero-photo {
    animation: mobilePhotoAppear 0.8s ease-out both;
    animation-delay: 0.1s;
  }
  
  .hero-content {
    animation: mobileContentAppear 0.8s ease-out both;
    animation-delay: 0.5s;
  }
}

@keyframes mobilePhotoAppear {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* Disable animations if reduced motion is preferred */
@media (prefers-reduced-motion: reduce) {
  .hero-content h1,
  .hero-content p,
  .hero-content .mt-7,
  .hero-content .mt-4,
  .hero-photo .reveal,
  .hero-photo,
  .hero-content {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Additional responsive breakpoints */
@media (max-width: 320px) {
  .hero-photo .reveal {
    max-width: 180px;
  }
  
  .hero-content h1 {
    font-size: 1.5rem;
  }
  
  .hero-container {
    gap: 1.5rem;
    margin-top: 0.5rem;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .hero-photo .reveal {
    max-width: 280px;
  }
  
  .hero-content h1 {
    font-size: 2.25rem;
  }
  
  .hero-container {
    margin-top: 1.5rem;
    gap: 2.5rem;
  }
}

@media (min-width: 1200px) {
  .hero-container {
    grid-template-columns: 1fr 420px;
    gap: 5rem;
    margin-top: 2rem;
  }
  
  .hero-photo {
    max-width: 420px;
  }
}

/* Very large screens */
@media (min-width: 1440px) {
  .hero-container {
    gap: 6rem;
    margin-top: 2.5rem;
  }
}

/* Landscape mobile orientation */
@media (max-width: 767px) and (orientation: landscape) {
  .hero-container {
    grid-template-columns: 1fr auto;
    grid-template-areas: "content photo";
    gap: 2rem;
  }
  
  .hero-photo {
    order: 2;
  }
  
  .hero-content {
    order: 1;
    text-align: left;
  }
  
  .hero-content .justify-center {
    justify-content: flex-start;
  }
  
  .hero-photo .reveal {
    max-width: 200px;
  }
}

/* Print styles */
@media print {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .hero-photo .reveal {
    max-width: 200px;
    margin: 0 auto;
  }
  
  .hero-content {
    text-align: center;
  }
}
