/* Modern Base Styles */
* {
  box-sizing: border-box;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #3cc2ff;
  color: #000;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  font-weight: bold;
}

.skip-link:focus {
  top: 6px;
}

body {
  background: #10142a;
  color: #e2f2fd;
  font-family: 'Roboto', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  letter-spacing: 0.01em;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Dynamic Header */
header {
  text-align: center;
  padding: clamp(0.75rem, 2vw, 1.5rem) 0 clamp(0.25rem, 1vw, 0.75rem) 0;
  background: 
    linear-gradient(rgba(16, 20, 42, 0.7), rgba(16, 20, 42, 0.7)),
    url(baground.png) center/cover !important;
  color: #fff;
  border-bottom: 3px solid #1976d2;
  box-shadow: 0 6px 24px #040c22cc;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  transform-origin: top;
  will-change: transform;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.avatar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 17px;
  transition: all 0.3s ease;
}


.avatar-container:hover {
  transform: scale(1.05);
}

.avatar-bg {
  background: linear-gradient(135deg, #113969 70%, #1976d2 100%);
  border-radius: 50%;
  padding: 18px;
  box-shadow: 0 6px 32px #0c162980;
  display: inline-block;
}

.avatar {
  width: clamp(80px, 20vw, 160px);
  height: clamp(80px, 20vw, 160px);
  object-fit: cover;
  border-radius: 50%;
  border: 3.5px solid #163462;
  box-shadow: 0 0 22px #12144888;
  transition: all 0.3s ease;
}



.avatar-container:hover .avatar {
  box-shadow: 0 0 36px #3cc2ff;
  transform: scale(1.05);
}

header h1 {
  margin: clamp(0.5rem, 2vw, 1rem) 0;
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: clamp(1px, 0.5vw, 2px);
  transition: all 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}



.cyber-glow {
  color: #3cc2ff;
  text-shadow: 0 0 6px #54c3ff, 0 0 15px #2a60a9a0;
  font-family: 'Roboto Mono', monospace;
  font-size: 1.09em;
  letter-spacing: 1.5px;
}

/* Modern Navigation */
nav {
  position: relative;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: linear-gradient(145deg, #c0c0c0, #808080);
  border: 1px solid #999;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  margin: 1rem auto;
  box-shadow: 
    inset 2px 2px 5px rgba(255,255,255,0.3),
    inset -2px -2px 5px rgba(0,0,0,0.3),
    2px 2px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  align-items: center;
  justify-content: space-between;
  width: 70px;
  height: 50px;
}

.mobile-menu-toggle:hover {
  background: linear-gradient(145deg, #d0d0d0, #909090);
  transform: translateY(-1px);
}

.mobile-menu-toggle:active {
  box-shadow: 
    inset -2px -2px 5px rgba(255,255,255,0.3),
    inset 2px 2px 5px rgba(0,0,0,0.3);
  transform: translateY(1px);
}

.mobile-menu-toggle span:not(.menu-text) {
  width: 20px;
  height: 2px;
  background: #3cc2ff;
  transition: 0.3s;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2rem);
  padding: 0;
  margin: 0;
  transition: all 0.3s ease;
}



nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  letter-spacing: 1px;
  transition: all 0.3s ease;
  display: block;
  padding: clamp(0.5rem, 2vw, 1rem);
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}



nav ul li a:hover {
  background: rgba(60, 194, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(60, 194, 255, 0.3);
}

/* Modern Sections */
section {
  max-width: 1000px;
  margin: clamp(1rem, 4vw, 2rem) auto;
  padding: clamp(1.5rem, 4vw, 2rem);
  background: rgba(21, 25, 46, 0.8);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

section h2 {
  color: #43c3ff;
  margin-bottom: 16px;
  font-size: 1.23rem;
  border-left: 5px solid #3cc2ff;
  padding-left: 11px;
  font-family: 'Roboto Mono', monospace;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Resume card */
.resume-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #13244a 0%, #223c57 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(44, 95, 145, 0.3);
  padding: clamp(1rem, 4vw, 2rem);
  margin: 0 auto;
  max-width: 500px;
  gap: clamp(1rem, 3vw, 2rem);
  flex-direction: column;
  text-align: center;
}

@media (min-width: 600px) {
  .resume-card {
    flex-direction: row;
    text-align: left;
  }
}

.resume-icon {
  background: #1976d2;
  color: #ec0c0c;
  font-size: 2.7rem;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 13px #16264b90;
}

.resume-link {
  color: #0efb94;
  background: #181b3a;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 16px;
  margin-top: 10px;
  border-radius: 6px;
  box-shadow: 0 1px 10px #30adff33;
  display: inline-block;
  transition: background 0.18s;
  font-family: 'Roboto Mono', monospace;
  font-size: 1.01em;
}

.resume-link:hover {
  background: #236e57;
  color: #fff;
}

.resume-card h3 {
  color: #ffe066;
  font-size: 1.09em;
  margin: 0 0 6px 0;
}

/* Modern Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
  align-items: start;
}

.project-tile {
  background: linear-gradient(135deg, #182145 0%, #223050 100%);
  border: 1px solid rgba(25, 118, 210, 0.3);
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  word-break: break-word;
}

.project-tile:hover:not(.add-new) {
  transform: scale(1.025) translateY(-2px);
  box-shadow: 0 8px 18px #1976d282;
  z-index: 2;
}

.project-tile h3 {
  font-weight: 700;
  color: #3cc2ff;
  font-family: 'Roboto Mono', monospace;
  font-size: 1.14rem;
  margin-bottom: 8px;
  margin-top: 0;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.25;
}

.project-tile .desc {
  display: block;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #e2f2fd;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 7px;
  overflow: hidden;
}

.project-tile .click-hint {
  font-size: 0.8rem;
  color: #3cc2ff;
  text-align: center;
  margin-top: auto;
  padding: 4px;
  opacity: 0.7;
  font-style: italic;
}

.tile-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.project-tile .edit-btn,
.project-tile .delete-btn {
  pointer-events: auto;
  cursor: pointer;
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.85em;
  transition: all 0.2s ease;
  flex: 1;
}

.project-tile .edit-btn {
  background: #1976d2;
  color: #fff;
}

.project-tile .edit-btn:hover {
  background: #0efb94;
  color: #222;
  transform: translateY(-1px);
}

.project-tile .delete-btn {
  background: #ff4444;
  color: #fff;
}

.project-tile .delete-btn:hover {
  background: #ff6666;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.project-tile.add-new {
  min-height: 58px;
  align-items: center;
  justify-content: center;
  background: #101b22;
  border: 2px dashed #43c3ff;
  color: #43c3ff;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s;
  max-width: 350px;
  margin-bottom: 13px;
}

.project-tile.add-new span {
  font-size: 2.15rem;
  font-weight: 700;
}

.project-tile.add-new:hover {
  background: #16264b;
}

/* Fullscreen Project Detail Modal - Single Page App Style */
.fullscreen-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(135deg, #0a0e1a 0%, #10142a 50%, #1a1f35 100%);
  display: none;
  z-index: 5000;
  overflow-y: auto;
  animation: slideInFromRight 0.4s ease-out;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fullscreen-modal-content {
  min-height: 100vh;
  width: 100%;
  padding: 0;
  color: #e3f2fd;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Project Detail Header */
.project-detail-header {
  background: linear-gradient(135deg, #1a2040 0%, #2a3555 100%);
  padding: clamp(1rem, 3vw, 1.5rem);
  border-bottom: 3px solid #1976d2;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.back-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Roboto Mono', monospace;
}

.back-btn:hover {
  background: #0efb94;
  color: #222;
  transform: translateX(-3px);
}

.project-detail-title {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin: 0;
  color: #3cc2ff;
  font-family: 'Roboto Mono', monospace;
  text-shadow: 0 0 10px #3cc2ff40;
  text-align: center;
}

/* Project Detail Body */
.project-detail-body {
  flex: 1;
  padding: clamp(1rem, 4vw, 2.5rem);
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.project-description {
  background: #15192e;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: 15px;
  border-left: 5px solid #3cc2ff;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  margin-bottom: 30px;
}

.project-description h3 {
  color: #43c3ff;
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 20px;
  font-family: 'Roboto Mono', monospace;
}

.project-description p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.8;
  white-space: pre-wrap;
  color: #dbeeff;
  margin: 0;
}

/* Close button - now integrated into header */
.close-btn {
  background: #ff4444;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #ff6666;
  transform: rotate(90deg);
}

/* Modern Skills Grid */
.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: clamp(0.5rem, 2vw, 1rem);
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.skills-list li {
  background: #40ffd920;
  color: #0efb94;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: clamp(0.85rem, 2.5vw, 1.08rem);
  font-family: 'Roboto Mono', monospace;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  box-shadow: 0 2px 8px #0efb9440;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  word-break: break-word;
  min-height: 36px;
  box-sizing: border-box;
}

.skills-list li:hover {
  background: #0efb94;
  color: #222;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.skill-text {
  flex: 1;
}

.skill-delete-btn {
  background: rgba(255, 68, 68, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0;
  transform: scale(0.8);
  margin-left: 6px;
  flex-shrink: 0;
}

.skill-item:hover .skill-delete-btn {
  opacity: 1;
  transform: scale(1);
}

.skill-delete-btn:hover {
  background: #ff4444;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

#skillsList.compact li {
  display: none;
}

#skillsList.compact::after {
  content: attr(data-summary);
  color: #0efb94;
  font-weight: bold;
  font-family: 'Roboto Mono', monospace;
  display: inline-block;
  padding: 8px 17px;
  background: #101b22;
  border-radius: 16px;
  cursor: pointer;
}

#skillsList.expanded li {
  display: inline-block;
  cursor: default;
}

.edit-btn.skill-edit-btn {
  margin-left: 10px !important;
}

/* Modals for Add/Edit */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: rgba(25, 118, 210, 0.41);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.modal-content {
  background: #161821;
  color: #fff;
  padding: 27px 31px;
  border-radius: 14px;
  width: 97vw;
  max-width: 445px;
  box-shadow: 0 0 25px #0efb9420;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  margin-top: 6px;
  border-radius: 6px;
  border: 1.7px solid #1976d2;
  padding: 9px 10px;
  font-size: 1rem;
  color: #111a39;
  background: #e3f2fd;
  transition: border 0.21s;
  font-family: 'Roboto', sans-serif;
}

.modal-content input:focus,
.modal-content textarea:focus {
  border: 2px solid #0efb94;
  outline: none;
}

/* Footer */
footer {
  text-align: center;
  color: #40ffd9;
  background: #000;
  padding: 20px 0 10px 0;
  margin-top: 39px;
  font-size: 1.04rem;
  border-top: 2px solid #1976d2;
}

.linkedin-link {
  color: #40ffd9;
  font-weight: bold;
  text-decoration: none;
}
.linkedin-link:hover {
  text-decoration: underline;
}

.write-with-me {
  text-align: center;
  padding: 15px;
  background: #1976d2;
  color: #fff;
  font-weight: bold;
  font-size: 1.10rem;
}

/* Production Mode */
.production-mode .edit-btn,
.production-mode .add-new {
  display: none !important;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #3cc2ff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

/* Improved focus indicators */
button:focus,
input:focus,
textarea:focus,
a:focus {
  outline: 2px solid #3cc2ff;
  outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Utilities Container */
.utilities-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

/* Futuristic Utilities Button */
.utilities-btn {
  background: linear-gradient(135deg, rgba(15, 25, 45, 0.95) 0%, rgba(25, 35, 65, 0.98) 100%);
  backdrop-filter: blur(15px);
  border-radius: 25px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(60, 194, 255, 0.8);
  box-shadow: 
    0 0 15px rgba(60, 194, 255, 0.4),
    0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 120px;
  position: relative;
}

.utilities-btn::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  background: linear-gradient(90deg, #3cc2ff, #1976d2, #3cc2ff);
  border-radius: 25px;
  z-index: -1;
  animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.utilities-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(60, 194, 255, 1);
  box-shadow: 
    0 0 20px rgba(60, 194, 255, 0.6),
    0 8px 25px rgba(60, 194, 255, 0.2);
}

.utilities-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: rgba(21, 25, 46, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(60, 194, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 8px;
  min-width: 160px;
}

.utility-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.utility-item:last-child {
  border-bottom: none;
}

.utility-item:hover {
  background: rgba(60, 194, 255, 0.1);
}

.utility-icon {
  font-size: 1.2rem;
}

.utility-text {
  color: #e2f2fd;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
}



/* Tool Icon */
.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.utilities-btn .tool-icon {
  background: linear-gradient(135deg, #3cc2ff 0%, #1976d2 100%);
  box-shadow: 0 0 8px rgba(60, 194, 255, 0.4);
}

.utilities-btn .tool-title {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(60, 194, 255, 0.3);
  font-weight: 600;
}

/* Tool Content */
.tool-content {
  flex: 1;
  min-width: 0;
}

.tool-title {
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.tool-description {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.3;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .utilities-container {
    bottom: 15px;
    right: 15px;
  }
  
  .utilities-btn {
    min-width: 120px;
    padding: 12px 16px;
  }
  
  .utilities-menu {
    min-width: 140px;
  }
  
  .utility-item {
    padding: 10px 12px;
  }
  
  .utility-text {
    font-size: 0.8rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .utilities-btn {
    min-width: 100px;
    padding: 10px 12px;
  }
  
  .utilities-menu {
    min-width: 120px;
  }
}

/* Landscape Mobile */


/* Camera Interface Styles */
.camera-video {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  aspect-ratio: 16/9;
  object-fit: cover;
}

.camera-canvas {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
}

.camera-controls {
  display: flex;
  gap: clamp(5px, 2vw, 10px);
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.captured-images {
  margin: 20px 0;
  max-height: 300px;
  overflow-y: auto;
}

.captured-image {
  display: flex;
  align-items: center;
  margin: 10px 0;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  cursor: grab;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.captured-image:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.captured-image.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.captured-image.drag-over {
  border-color: #3cc2ff;
  background: rgba(60, 194, 255, 0.2);
}

/* Production optimizations */
.camera-section {
  text-align: center;
}

.camera-scanner-container,
.pdf-scanner-container,
.pdf-merge-container {
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Improved button spacing */
.merge-btn {
  min-width: 120px;
  white-space: nowrap;
}

/* Enhanced file input styling */
.file-input {
  transition: all 0.3s ease;
}

.file-input:hover {
  border-color: #0efb94;
  background: rgba(14, 251, 148, 0.1);
}

.file-input:focus {
  outline: 2px solid #3cc2ff;
  outline-offset: 2px;
}

/* Camera Controls Mobile Optimization */
@media (max-width: 768px) {
  .camera-controls {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .camera-video {
    max-width: 100%;
  }
  
  .captured-images {
    max-height: 200px;
  }
  
  .merge-btn {
    min-width: 100px;
    padding: 12px 16px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .cyber-glow {
    text-shadow: none;
    color: #ffffff;
  }
  
  .project-tile {
    border: 2px solid #ffffff;
  }
  
  button {
    border: 2px solid #ffffff;
  }
  
  .pdf-merge-fab {
    border: 2px solid #ffffff;
  }
}

/* Production Performance Optimizations */
.project-tile,
.skills-list li,
button,
.pdf-tool-card {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Intersection Observer for lazy loading */
.lazy-load {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.lazy-load.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Comprehensive Responsive Design */

/* Extra Small Devices (320px - 480px) */
@media (max-width: 480px) {
  body {
    font-size: clamp(0.8rem, 3vw, 0.9rem);
  }
  
  header {
    padding: 0.5rem 0 0.25rem 0;
  }
  
  .avatar {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
  }
  
  .avatar-bg {
    padding: 12px;
  }
  
  header h1 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    margin: 0.5rem 0;
  }
  
  section {
    margin: 0.75rem auto;
    padding: 1rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .project-tile {
    padding: 1rem;
  }
  
  .skills-list {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.4rem;
  }
  
  .skills-list li {
    padding: 5px 6px;
    font-size: 0.75rem;
    border-radius: 10px;
    min-height: 28px;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.2;
  }
  
  .skill-delete-btn {
    width: 14px;
    height: 14px;
    font-size: 9px;
    margin-left: 3px;
  }
  
  .modal-content {
    padding: 1rem;
    width: 95vw;
  }
  
  .resume-card {
    padding: 1rem;
    gap: 1rem;
  }
  
  .project-detail-body {
    padding: 1rem;
  }
  
  .back-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* Small Devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .skills-list {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
  }
  
  .skills-list li {
    font-size: 0.85rem;
    padding: 6px 8px;
    word-break: break-word;
    hyphens: auto;
  }
  
  .resume-card {
    max-width: 600px;
  }
}

/* Mobile Navigation (up to 768px) */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .menu-text {
    font-size: 0.7rem;
    color: #333;
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    margin: 0;
    line-height: 1;
  }
  
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 20, 42, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
    z-index: 1000;
  }
  
  nav ul.show {
    display: flex;
  }
  
  nav ul li a {
    padding: 0.75rem 1rem;
    text-align: center;
    width: 100%;
  }
  
  .project-nav {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .project-detail-title {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
  }
}

/* Medium Devices (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  section {
    max-width: 900px;
  }
  
  .skills-list {
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 0.7rem;
  }
}

/* Large Devices (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

/* Extra Large Devices (1441px+) */
@media (min-width: 1441px) {
  .container {
    max-width: 1600px;
  }
  
  section {
    max-width: 1400px;
  }
  
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  }
}

/* Touch-friendly interactions */
@media (hover: none) {
  .project-tile:active {
    transform: scale(0.98);
  }
  
  nav ul li a:active {
    background: rgba(60, 194, 255, 0.3);
  }
  
  .mobile-menu-toggle:active {
    transform: scale(0.95);
  }
  
  button:active {
    transform: scale(0.98);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .avatar {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Landscape Orientation on Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  header {
    padding: 0.5rem 0 0.25rem 0;
  }
  
  .avatar-container {
    margin-bottom: 8px;
  }
  
  .avatar {
    width: clamp(50px, 12vw, 70px);
    height: clamp(50px, 12vw, 70px);
  }
  
  header h1 {
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin: 0.25rem 0;
  }
  
  section {
    margin: 0.5rem auto;
  }
}

/* Print Styles */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .mobile-menu-toggle,
  .edit-btn,
  .add-new,
  nav,
  footer,
  .pdf-tools-container {
    display: none !important;
  }
  
  section {
    break-inside: avoid;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #ccc;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .project-tile {
    border: 1px solid #333;
    margin-bottom: 1rem;
  }
}

/* PDF Merge Styles */
.pdf-merge-container {
  max-width: 600px;
  margin: 0 auto;
}

.upload-section {
  background: #15192e;
  padding: 30px;
  border-radius: 15px;
  border-left: 5px solid #3cc2ff;
  margin-bottom: 20px;
}

.upload-section h3 {
  color: #43c3ff;
  margin-top: 0;
  font-family: 'Roboto Mono', monospace;
}

.file-input {
  width: 100%;
  padding: 15px;
  border: 2px dashed #3cc2ff;
  border-radius: 8px;
  background: rgba(60, 194, 255, 0.1);
  color: #e2f2fd;
  font-family: 'Roboto Mono', monospace;
  cursor: pointer;
}

.file-list {
  margin-top: 15px;
}

.file-item {
  background: rgba(255,255,255,0.1);
  padding: 10px;
  margin: 5px 0;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  flex-wrap: wrap;
  gap: 8px;
}

.file-item:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.file-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.file-item.drag-over {
  border-color: #3cc2ff;
  background: rgba(60, 194, 255, 0.2);
}

.drag-handle {
  color: #3cc2ff;
  margin-right: 10px;
  cursor: grab;
}

.merge-section {
  text-align: center;
}

.merge-btn {
  background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  transition: all 0.3s ease;
}

.merge-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(25, 118, 210, 0.4);
}

.merge-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.merge-status {
  margin-top: 15px;
  font-family: 'Roboto Mono', monospace;
  color: #43c3ff;
}

/* PDF Reducer Specific Styles */
.pdf-reducer-container {
  max-width: 600px;
  margin: 0 auto;
}

.file-info {
  margin-top: 15px;
  padding: 15px;
  background: rgba(60, 194, 255, 0.1);
  border-radius: 8px;
  border-left: 4px solid #3cc2ff;
}

.file-details {
  font-family: 'Roboto Mono', monospace;
}

.file-name {
  font-weight: 600;
  color: #43c3ff;
  margin-bottom: 5px;
  word-break: break-all;
}

.file-size {
  color: #e2f2fd;
  font-size: 0.9rem;
}

.size-preview {
  margin-top: 10px;
}

.size-estimate {
  background: rgba(255, 193, 7, 0.1);
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid #ffc107;
}

.estimate-title {
  font-weight: 600;
  color: #ffc107;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.estimate-details {
  font-size: 0.85rem;
  color: #e2f2fd;
}

.estimate-details div {
  margin: 2px 0;
}

.compression-options {
  background: #15192e;
  padding: 20px;
  border-radius: 15px;
  margin: 20px 0;
  border-left: 5px solid #ff5722;
}

.compression-options h4 {
  color: #ff5722;
  margin-top: 0;
  margin-bottom: 15px;
  font-family: 'Roboto Mono', monospace;
}

.compression-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compression-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s ease;
  font-family: 'Roboto Mono', monospace;
}

.compression-controls label:hover {
  background: rgba(255, 87, 34, 0.1);
}

.compression-controls input[type="radio"] {
  accent-color: #ff5722;
  width: 16px;
  height: 16px;
}

.reduce-section {
  text-align: center;
}

.compression-result {
  background: rgba(76, 175, 80, 0.2);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
  font-family: 'Roboto Mono', monospace;
}

.compression-result div {
  margin: 5px 0;
}

.compression-result div:first-child {
  font-weight: 600;
  color: #4caf50;
}

@media (max-width: 768px) {
  .compression-controls {
    gap: 8px;
  }
  
  .compression-controls label {
    padding: 6px 8px;
    font-size: 0.9rem;
  }
  
  .file-info {
    padding: 10px;
  }
  
  .compression-options {
    padding: 15px;
  }
  
  .file-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px;
  }
  
  .file-item > div:first-child {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .file-item button {
    align-self: flex-end;
    padding: 4px 8px;
    font-size: 0.8rem;
  }
  
  .preview-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 8px !important;
  }
  
  .preview-item > span:first-child {
    align-self: flex-start;
    margin-bottom: 8px;
  }
  
  .preview-item > img {
    margin: 0 0 8px 0 !important;
  }
  
  .preview-item > button {
    align-self: flex-end;
    padding: 4px 8px;
    font-size: 0.8rem;
  }
  
  .captured-image {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 8px !important;
  }
}

/* Critical CSS Loading */
@media (max-width: 768px) {
  .pdf-tools-container {
    transform: translateZ(0);
    will-change: transform;
  }
}

/* Prefers reduced data */
@media (prefers-reduced-data: reduce) {
  .avatar {
    background: #3cc2ff;
  }
  
  .project-tile {
    background: #182145;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .fullscreen-modal {
    animation: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
  body {
    background: #f5f7fa;
    color: #2c3e50;
  }
  
  section {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
  }
  
  .cyber-glow {
    color: #1976d2;
  }
}

/* Focus Management for Accessibility */
@media (max-width: 768px) {
  .mobile-menu-toggle:focus {
    outline: 2px solid #3cc2ff;
    outline-offset: 2px;
  }
  
  nav ul li a:focus {
    outline: 2px solid #3cc2ff;
    outline-offset: 2px;
  }
}

/* Meeting Section */
.meeting-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1a2040 0%, #2a3555 100%);
  border-radius: 12px;
  border-left: 4px solid #3cc2ff;
}

.meeting-section h3 {
  color: #3cc2ff;
  margin-top: 0;
  font-family: 'Roboto Mono', monospace;
}

.meeting-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.meeting-btn {
  background: linear-gradient(135deg, #1976d2 0%, #3cc2ff 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-width: 140px;
  justify-content: center;
}

.meeting-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(60, 194, 255, 0.4);
}

.meeting-icon {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .meeting-options {
    flex-direction: column;
  }
  
  .meeting-btn {
    width: 100%;
  }
}
/* Prevent white flash on load */
html {
  background: #10142a;
}

body {
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.loaded {
  opacity: 1;
}
