/* Loading Screen Styles */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loading-container {
  text-align: center;
  color: white;
  animation: fadeInUp 1s ease-out;
}

.loading-logo {
  margin-bottom: 2rem;
}

.loading-text {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  animation: logoFloat 2s ease-in-out infinite;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 2rem auto;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
  width: 90%;
  height: 90%;
  top: 5%;
  left: 5%;
  animation-delay: -0.3s;
  border-top-color: rgba(255, 255, 255, 0.6);
}

.spinner-ring:nth-child(3) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  animation-delay: -0.6s;
  border-top-color: rgba(255, 255, 255, 0.4);
}

.loading-message {
  margin: 2rem 0;
}

.loading-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.5s forwards;
}

.loading-subtitle {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.8;
  opacity: 0;
  animation: fadeIn 1s ease-out 1s forwards;
}

.loading-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 2rem auto 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  width: 0%;
  animation: progressLoad 3s ease-out forwards;
}

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

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

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

@keyframes progressLoad {
  0% {
    width: 0%;
  }
  20% {
    width: 30%;
  }
  40% {
    width: 50%;
  }
  60% {
    width: 70%;
  }
  80% {
    width: 90%;
  }
  100% {
    width: 100%;
  }
}

/* Dark theme adjustments for loading screen */
[data-theme="dark"] .loading-screen {
  background: linear-gradient(135deg, #1e293b, #334155);
}

/* Responsive loading screen */
@media (max-width: 768px) {
  .loading-text {
    font-size: 3rem;
  }

  .loading-title {
    font-size: 1.2rem;
  }

  .loading-subtitle {
    font-size: 0.9rem;
  }

  .loading-progress {
    width: 150px;
  }
}

/* Reset and Base Styles */
:root {
  /* Light theme colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --accent-primary: #667eea;
  --accent-secondary: #764ba2;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --card-bg: rgba(255, 255, 255, 0.95);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-scrolled: rgba(255, 255, 255, 0.98);
  --code-bg: #1e1e1e;
  --code-border: #2d2d2d;
  --code-text: #d4d4d4;
  --code-text-secondary: #ccc;
}

[data-theme="dark"] {
  /* Dark theme colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --accent-primary: #667eea;
  --accent-secondary: #764ba2;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --card-bg: rgba(30, 41, 59, 0.95);
  --navbar-bg: rgba(15, 23, 42, 0.95);
  --navbar-scrolled: rgba(15, 23, 42, 0.98);
  --code-bg: #0f1419;
  --code-border: #1e293b;
  --code-text: #e2e8f0;
  --code-text-secondary: #cbd5e1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--navbar-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: var(--navbar-scrolled);
  box-shadow: 0 2px 20px var(--shadow-color);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo .logo-text {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-size: 16px;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: scale(1.1);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  animation: grain 20s linear infinite;
}

@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-5%, -5%);
  }
  30% {
    transform: translate(3%, -3%);
  }
  50% {
    transform: translate(-2%, 4%);
  }
  70% {
    transform: translate(4%, 2%);
  }
  90% {
    transform: translate(-1%, -4%);
  }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.hero-text {
  color: white;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  font-size: 1.5rem;
  font-weight: 400;
  opacity: 0.9;
  transform: translateY(30px);
  animation: slideUp 0.8s ease forwards;
}

.title-name {
  display: block;
  background: linear-gradient(45deg, #fff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: translateY(30px);
  animation: slideUp 0.8s ease 0.2s forwards;
}

.title-role {
  display: block;
  font-size: 2rem;
  color: #f0f0f0;
  transform: translateY(30px);
  animation: slideUp 0.8s ease 0.4s forwards;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hero-description {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  transform: translateY(30px);
  animation: slideUp 0.8s ease 0.6s forwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  transform: translateY(30px);
  animation: slideUp 0.8s ease 0.8s forwards;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::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;
}

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

.btn-primary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: white;
  color: var(--accent-primary);
  border: 2px solid white;
}

.btn-secondary:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 60px;
  height: 60px;
  top: 20%;
  right: 20%;
  animation-delay: 2s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  bottom: 30%;
  left: 20%;
  animation-delay: 4s;
}

.shape-4 {
  width: 40px;
  height: 40px;
  bottom: 20%;
  right: 10%;
  animation-delay: 1s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.profile-card {
  width: 300px;
  height: 400px;
  perspective: 1000px;
  animation: cardFloat 4s ease-in-out infinite;
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0px) rotateY(0deg);
  }
  50% {
    transform: translateY(-10px) rotateY(5deg);
  }
}

.card-inner {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.card-inner:hover {
  transform: rotateY(10deg) rotateX(5deg);
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.profile-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.mouse-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.wheel {
  width: 3px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseWheel 2s infinite;
}

.scroll-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: fadeInOut 2s infinite;
}

@keyframes mouseWheel {
  0%,
  100% {
    opacity: 0;
    top: 8px;
  }
  50% {
    opacity: 1;
    top: 16px;
  }
}

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

/* Section Styles */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-tertiary);
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-intro {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 5px 25px var(--shadow-color);
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.code-window {
  background: var(--code-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px var(--shadow-color);
  animation: codeFloat 6s ease-in-out infinite;
}

@keyframes codeFloat {
  0%,
  100% {
    transform: translateY(0px) rotateX(0deg);
  }
  50% {
    transform: translateY(-10px) rotateX(2deg);
  }
}

.window-header {
  background: var(--code-border);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.close {
  background: #ff5f57;
}

.control.minimize {
  background: #ffbd2e;
}

.control.maximize {
  background: #28ca42;
}

.window-title {
  color: var(--code-text-secondary);
  font-size: 14px;
  margin-left: auto;
}

.code-content {
  padding: 20px;
  color: var(--code-text);
  font-family: "Fira Code", monospace;
  font-size: 14px;
  line-height: 1.6;
}

.keyword {
  color: #569cd6;
}

.variable {
  color: #9cdcfe;
}

.property {
  color: #9cdcfe;
}

.string {
  color: #ce9178;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.skill-category {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
}

.skill-category:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.5rem;
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-name {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.skill-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  border-radius: 4px;
  width: 0;
  transition: width 2s ease;
  position: relative;
}

.skill-progress::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-20px);
  }
  100% {
    transform: translateX(20px);
  }
}

/* Experience Section */
.experience {
  background: var(--bg-secondary);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 80px;
}

.timeline-dot {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  border-radius: 50%;
  border: 4px solid var(--bg-secondary);
  z-index: 2;
  animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
}

.timeline-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 25px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.timeline-content::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 30px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid var(--card-bg);
}

.timeline-content:hover {
  transform: translateX(10px) rotateY(5deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.timeline-date {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-content h4 {
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(2deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(102, 126, 234, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.project-link:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.3);
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.3s ease;
}

.tech-tag:hover {
  background: var(--accent-primary);
  color: white;
}

/* Contact Section */
.contact {
  background: var(--bg-secondary);
}

.contact-content {
  max-width: 1000px;
  margin: 0 auto;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.contact-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-color);
}

.contact-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin: 0 auto 1.5rem;
  position: relative;
}

.contact-icon::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  border-radius: 50%;
  z-index: -1;
  animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.contact-details h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.contact-details p {
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--accent-primary);
  border-radius: 25px;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
}

.contact-note {
  display: block;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-top: 0.5rem;
}

.contact-cta {
  text-align: center;
  padding: 3rem;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.contact-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  opacity: 0.05;
  z-index: 0;
}

.contact-cta h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.contact-cta p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  color: white;
  border: 2px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-3px);
}

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

.social-section h4 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  color: var(--text-primary);
  text-decoration: none;
  padding: 1rem 1.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 25px var(--shadow-color);
  transition: all 0.3s ease;
  min-width: 140px;
  justify-content: center;
}

.social-link i {
  font-size: 1.3rem;
}

.social-link span {
  font-weight: 600;
}

.social-link.linkedin:hover {
  background: #0077b5;
  color: white;
  transform: translateY(-5px);
}

.social-link.github:hover {
  background: #333;
  color: white;
  transform: translateY(-5px);
}

.social-link.whatsapp:hover {
  background: #25d366;
  color: white;
  transform: translateY(-5px);
}

/* Footer */
.footer {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-align: center;
  padding: 2rem 0;
}

.footer-content p {
  margin-bottom: 0.5rem;
}

.footer i {
  color: var(--accent-primary);
  margin: 0 5px;
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Comprehensive Responsive Design */

/* Fix container overflow */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Ensure proper mobile navigation */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-visual {
    order: -1;
  }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  /* Navigation */
  .hamburger {
    display: flex !important;
  }

  .nav-container {
    height: 60px;
    padding: 0 15px;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .theme-toggle {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 60px;
    flex-direction: column;
    background-color: var(--navbar-bg);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    width: 100%;
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: 0 10px 27px var(--shadow-color);
    padding: 2rem 0;
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 1rem 0;
  }

  .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
  }

  .nav-link:hover {
    background: var(--accent-primary);
    color: white;
  }

  /* Hamburger animation */
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Hero section */
  .hero {
    padding: 2rem 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    padding: 0 20px;
  }

  .hero-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
  }

  .title-name {
    font-size: 2.5rem;
  }

  .title-role {
    font-size: 1.8rem;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    padding: 1rem 2rem;
  }

  .profile-card {
    max-width: 280px;
    margin: 0 auto;
  }

  /* About section */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .stat-item {
    text-align: center;
    padding: 1.5rem;
  }

  .code-window {
    max-width: 100%;
    overflow-x: auto;
  }

  .code-content {
    font-size: 0.85rem;
    padding: 1rem;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .skill-category {
    padding: 1.5rem;
  }

  .category-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  /* Timeline */
  .timeline {
    padding-left: 40px;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-dot {
    left: 5px;
    width: 20px;
    height: 20px;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .timeline-content {
    padding: 1.5rem;
  }

  .timeline-date {
    font-size: 0.9rem;
  }

  .timeline-tags {
    gap: 0.5rem;
  }

  .tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    max-width: 100%;
  }

  .project-image {
    height: 200px;
  }

  .project-content {
    padding: 1.5rem;
  }

  .tech-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
  }

  /* Contact */
  .contact-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-card {
    padding: 1.5rem;
    text-align: center;
  }

  .contact-cta {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .social-links {
    flex-direction: column;
    gap: 1rem;
  }

  .social-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Modal */
  .modal-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 15px;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }

  .modal-details {
    padding: 1.5rem;
  }

  .modal-image {
    height: 200px;
  }

  .modal-features ul {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .modal-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .modal-link {
    width: 100%;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  /* Typography adjustments */
  .hero-title {
    font-size: 2.2rem;
  }

  .title-name {
    font-size: 2rem;
  }

  .title-role {
    font-size: 1.5rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  /* Navigation */
  .nav-container {
    padding: 0 15px;
    height: 60px;
  }

  .nav-menu {
    top: 60px;
  }

  .nav-logo .logo-text {
    font-size: 24px !important;
  }

  /* Profile card */
  .profile-card {
    max-width: 240px;
  }

  /* Stats */
  .about-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  /* Skills */
  .skill-category {
    padding: 1.25rem;
  }

  .skill-category h3 {
    font-size: 1.2rem;
  }

  .skill-name {
    font-size: 0.9rem;
  }

  /* Timeline */
  .timeline {
    padding-left: 30px;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline-dot {
    left: 2px;
    width: 16px;
    height: 16px;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .timeline-content {
    padding: 1.25rem;
  }

  .timeline-content h3 {
    font-size: 1.1rem;
  }

  .timeline-content h4 {
    font-size: 0.95rem;
  }

  .timeline-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Projects */
  .project-content {
    padding: 1.25rem;
  }

  .project-content h3 {
    font-size: 1.1rem;
  }

  .project-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Contact */
  .contact-card {
    padding: 1.25rem;
  }

  .contact-card h4 {
    font-size: 1.1rem;
  }

  .contact-card p {
    font-size: 0.9rem;
  }

  .contact-cta {
    padding: 1.5rem 1rem;
  }

  .contact-cta h3 {
    font-size: 1.3rem;
  }

  .contact-cta p {
    font-size: 0.9rem;
  }

  /* Modal */
  .modal-content {
    width: 98%;
    border-radius: 12px;
  }

  .modal-header {
    padding: 1.25rem;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }

  .modal-details {
    padding: 1.25rem;
  }

  .modal-details p {
    font-size: 0.9rem;
  }

  .modal-features h4,
  .modal-tech h4 {
    font-size: 1rem;
  }

  /* Loading screen */
  .loading-text {
    font-size: 2.5rem;
  }

  .loading-title {
    font-size: 1rem;
  }

  .loading-subtitle {
    font-size: 0.8rem;
  }

  .loading-progress {
    width: 120px;
  }

  .loading-spinner {
    width: 50px;
    height: 50px;
  }
}

/* Very small screens (360px and below) */
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .title-name {
    font-size: 1.6rem;
  }

  .title-role {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 1rem 0;
  }

  .hero-content {
    gap: 1.5rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .profile-card {
    max-width: 200px;
  }
}

/* Touch device improvements */
@media (hover: none) {
  .btn,
  .nav-link,
  .theme-toggle,
  .project-link,
  .contact-link,
  .social-link,
  .modal-link {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Critical responsive fixes */

/* Prevent horizontal overflow on all elements */
*,
*::before,
*::after {
  box-sizing: border-box;
  max-width: 100%;
}

/* Fix for potential overflow elements */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

/* Ensure text doesn't break layout */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  word-wrap: break-word;
}

/* Fix grid and flexbox potential overflows */
.projects-grid,
.skills-grid,
.contact-cards,
.social-links,
.hero-buttons,
.cta-buttons {
  min-width: 0;
}

/* Ensure code blocks don't overflow */
pre,
code {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-content pre {
  overflow-x: auto;
  white-space: pre;
}

/* Mobile-first approach - Base styles for mobile */
@media (max-width: 768px) {
  /* Fix any remaining overflow issues */
  body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* Ensure all sections are properly contained */
  section {
    overflow-x: hidden;
  }

  /* Fix hero section potential overflow */
  .hero-title {
    word-break: break-word;
  }

  .hero-description {
    word-break: break-word;
  }

  /* Ensure buttons don't overflow */
  .btn {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Fix tech tags overflow */
  .project-tech,
  .timeline-tags,
  .tech-stack {
    flex-wrap: wrap;
  }

  .tech-tag {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
  }
}

/* Enhanced Reset and Base Styles */
