:root {
  --primary: #ffffff;
  --bg-dark: #000000;
  --nav-bg: #1a0a33;
  --card-bg: #121212;
  --accent-red: #FF3C00;
  --accent-purple: #6E1FFF;
  --accent-orange: #FFA500;
  --shadow: 0 4px 20px rgba(255, 60, 0, 0.15), 0 8px 40px rgba(110, 31, 255, 0.1);
  --shadow-soft: 0 4px 16px rgba(255, 165, 0, 0.1);
  --shadow-strong: 0 8px 32px rgba(255, 60, 0, 0.25);
  --glow: 0 0 16px rgba(255, 60, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-family: 'Khula', 'Courier New', sans-serif;
  background: var(--bg-dark);
  color: var(--primary);
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(255, 60, 0, 0.03) 0%, transparent 70%);
  z-index: -1;
}

body.page-loaded {
  opacity: 1;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader[hidden] {
  opacity: 0;
  visibility: hidden;
}

.loader::after {
  content: '';
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 60, 0, 0.2);
  border-top: 4px solid var(--accent-red);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  box-shadow: var(--glow);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.futuristic-nav {
  width: 100%;
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-soft);
  transform: translateY(-100%);
  animation: navSlideDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
  will-change: transform;
}

@keyframes navSlideDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(0); }
}

.futuristic-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 1rem 0;
  gap: 1.5rem;
  margin: 0;
}

.futuristic-nav ul li a {
  text-decoration: none;
  color: var(--primary);
  padding: 0.75rem 1rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  letter-spacing: 0.5px;
  will-change: transform, box-shadow;
}

.futuristic-nav ul li a:hover,
.futuristic-nav ul li a.active,
.futuristic-nav ul li a:focus {
  background: rgba(255, 60, 0, 0.15);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.futuristic-nav ul li a:focus {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

.futuristic-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-orange);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-50%);
  border-radius: 2px;
}

.futuristic-nav ul li a:hover::after,
.futuristic-nav ul li a.active::after,
.futuristic-nav ul li a:focus::after {
  width: 80%;
}

header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(110, 31, 255, 0.05) 0%, transparent 70%);
  z-index: -1;
}

.about-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
  opacity: 0;
  transform: translateY(20px);
}

.matrix-container {
  position: relative;
  margin: 1rem 0;
}

.matrix-text {
  color: var(--accent-orange);
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-family: 'Khula', 'Courier New', monospace;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(255, 60, 0, 0.8);
  animation: textGlow 1.5s ease-in-out infinite alternate;
  will-change: text-shadow, transform;
  position: relative;
  display: inline-block;
}

@keyframes textGlow {
  0% { 
    text-shadow: 0 0 8px rgba(255, 60, 0, 0.6), 0 0 16px rgba(255, 165, 0, 0.4);
    transform: skewX(0deg);
  }
  100% { 
    text-shadow: 0 0 16px rgba(255, 60, 0, 1), 0 0 32px rgba(110, 31, 255, 0.6);
    transform: skewX(-2deg);
  }
}

.matrix-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: glitchText 1.8s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  transform: translate(-3px, -3px);
  color: var(--accent-red);
  text-shadow: 0 0 8px rgba(255, 60, 0, 1);
  opacity: 0.8;
  z-index: -1;
  font-weight: 800;
}

.matrix-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: glitchText2 2.2s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  transform: translate(3px, 3px);
  color: var(--accent-purple);
  text-shadow: 0 0 8px rgba(110, 31, 255, 0.8);
  opacity: 0.7;
  z-index: -1;
  font-weight: 800;
}

@keyframes glitchText {
  0%, 100% { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); transform: translate(0, 0); }
  25% { clip-path: polygon(0 0, 100% 0, 100% 15%, 0 15%); transform: translate(-5px, 2px); }
  50% { clip-path: polygon(0 30%, 100% 30%, 100% 45%, 0 45%); transform: translate(5px, -2px); }
  75% { clip-path: polygon(0 0, 100% 0, 100% 25%, 0 25%); transform: translate(2px, 5px); }
}

@keyframes glitchText2 {
  0%, 100% { clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); transform: translate(0, 0); }
  30% { clip-path: polygon(0 70%, 100% 70%, 100% 100%, 0 100%); transform: translate(5px, -3px); }
  60% { clip-path: polygon(0 85%, 100% 85%, 100% 100%, 0 100%); transform: translate(-3px, 5px); }
  80% { clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%); transform: translate(-5px, -2px); }
}

.rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg, transparent 0px, rgba(255, 60, 0, 0.05) 1px, transparent 2px);
  background-size: 100% 200%;
  animation: rainMove 10s linear infinite;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
}

@keyframes rainMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 100%; }
}

.profile-glitch {
  text-align: center;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
  opacity: 0;
  transform: translateY(20px);
}

.glitch-container {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card-bg) url('https://via.placeholder.com/120/1a0a33/FFFFFF?text=YOU') center/cover no-repeat;
  border: 2px solid rgba(255, 60, 0, 0.3);
  position: relative;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, box-shadow;
  isolation: isolate;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.glitch-container:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: var(--shadow-strong);
}

.glitch-base,
.glitch {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
}

.glitch-base {
  z-index: 1;
}

.glitch {
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.6;
  filter: hue-rotate(90deg) brightness(1.2);
}

.glitch-top {
  clip-path: inset(0 0 70% 0);
  animation: glitchTop 2s infinite;
}

.glitch-bottom {
  clip-path: inset(70% 0 0 0);
  animation: glitchBottom 2.5s infinite;
}

@keyframes glitchTop {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-3px, 2px, 0); }
  50% { transform: translate3d(2px, -3px, 0); }
  75% { transform: translate3d(-2px, 3px, 0); }
}

@keyframes glitchBottom {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(3px, -2px, 0); }
  50% { transform: translate3d(-3px, 2px, 0); }
  75% { transform: translate3d(2px, -3px, 0); }
}

.job-title {
  font-size: 1.1rem;
  color: #cccccc;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.75rem;
  animation: fadeIn 1s ease-out 1s forwards;
  opacity: 0;
  text-shadow: 0 0 6px rgba(255, 165, 0, 0.5);
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

main {
  padding: 2.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 60, 0, 0.2), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.projects-section h2 {
  text-align: center;
  margin: 0 0 2.5rem;
  font-size: 1.8rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  letter-spacing: 1.5px;
  color: var(--primary);
  text-shadow: 0 0 8px rgba(255, 60, 0, 0.6);
  position: relative;
  animation: titleGlow 2s cubic-bezier(0.3, 0.9, 0.4, 1) infinite alternate;
}

.projects-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-purple);
  transform: scaleX(0);
  transform-origin: left;
  animation: lineGrow 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

@keyframes lineGrow {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@keyframes titleGlow {
  0% { text-shadow: 0 0 8px rgba(255, 60, 0, 0.6); }
  100% { text-shadow: 0 0 16px rgba(255, 165, 0, 0.8); }
}

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

.project-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 60, 0, 0.15);
  padding: 1.5rem;
  border-radius: 10px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  box-shadow: var(--shadow-soft);
  transform: translateY(40px);
  opacity: 0;
  animation: cardFloat 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, box-shadow;
}

.project-card:nth-child(1) { animation-delay: 0.2s; }
.project-card:nth-child(2) { animation-delay: 0.4s; }

@keyframes cardFloat {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: rgba(255, 60, 0, 0.3);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 60, 0, 0.1), transparent);
  transition: left 0.6s;
  z-index: 1;
}

.project-card:hover::before {
  left: 100%;
}

.project-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 6px rgba(255, 60, 0, 0.5);
  letter-spacing: 1px;
}

.project-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #cccccc;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.project-card:hover p {
  color: var(--accent-orange);
}

.projects-grid a {
  color: var(--primary);
  text-decoration: none;
  display: block;
}

.projects-grid a:hover .project-card,
.projects-grid a:focus .project-card {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: rgba(255, 60, 0, 0.3);
}

.projects-grid a:hover .project-card::before,
.projects-grid a:focus .project-card::before {
  left: 100%;
}

.certificates-section {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.certificates-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1.8rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  color: var(--primary);
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(110, 31, 255, 0.6);
  position: relative;
  animation: titleGlow 2s cubic-bezier(0.3, 0.9, 0.4, 1) infinite alternate;
}

.certificates-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-orange);
  transform: scaleX(0);
  transform-origin: left;
  animation: lineGrow 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

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

.cert-item {
  background: var(--card-bg);
  border: 1px solid rgba(255, 60, 0, 0.15);
  border-radius: 10px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transform: translateY(40px);
  opacity: 0;
  animation: cardFloat 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, box-shadow;
}

.cert-item:nth-child(1) { animation-delay: 0.2s; }
.cert-item:nth-child(2) { animation-delay: 0.4s; }
.cert-item:nth-child(3) { animation-delay: 0.6s; }
.cert-item:nth-child(4) { animation-delay: 0.8s; }

.cert-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: rgba(255, 60, 0, 0.3);
}

.cert-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 60, 0, 0.1), transparent);
  transition: left 0.6s;
  z-index: 1;
}

.cert-item:hover::before {
  left: 100%;
}

.cert-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cert-item:hover img {
  transform: scale(1.03);
  filter: brightness(1.1) drop-shadow(0 0 12px rgba(255, 60, 0, 0.3));
}

.about-section {
  padding: 3rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(255, 60, 0, 0.03) 0%, transparent 70%);
  z-index: -1;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  animation: fadeIn 1s ease-out 0.5s forwards;
  opacity: 0;
}

.section-title {
  font-size: 1.8rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(255, 60, 0, 0.6);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-red);
  transform: scaleX(0);
  transform-origin: left;
  animation: lineGrow 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.role {
  font-size: 1.2rem;
  color: #cccccc;
  text-align: center;
  margin: 1rem 0 1.5rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255, 60, 0, 0.5);
  animation: glowPulse 2s cubic-bezier(0.3, 0.9, 0.4, 1) infinite alternate;
}

@keyframes glowPulse {
  0% { text-shadow: 0 0 6px rgba(255, 60, 0, 0.5); }
  100% { text-shadow: 0 0 12px rgba(255, 165, 0, 0.8); }
}

.typewriter-container {
  text-align: center;
  margin: 0 auto 1.5rem;
  font-family: 'Khula', 'Courier New', monospace;
  animation: fadeIn 1s ease-out 1.1s forwards;
  opacity: 0;
}

.typewriter-animation {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid rgba(255, 60, 0, 0.8);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 700;
  max-width: calc(var(--chars, 20) * 0.6ch + 2ch);
  animation:
    typewriter 3s steps(var(--chars, 20)) 1s 1 normal both,
    blinkingCursor 0.8s step-end infinite;
  color: var(--accent-orange);
  text-shadow: 0 0 6px rgba(255, 60, 0, 0.6);
}

@keyframes typewriter {
  from { width: 0; }
  to { width: calc(var(--chars, 20) * 0.6ch + 2ch); }
}

@keyframes blinkingCursor {
  from, to { border-color: transparent; }
  50% { border-color: rgba(255, 60, 0, 0.8); }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  animation: fadeIn 1s ease-out 1.3s forwards;
  opacity: 0;
}

.info-item {
  background: var(--card-bg);
  border: 1px solid rgba(255, 60, 0, 0.15);
  padding: 1.2rem;
  border-radius: 10px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.info-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: rgba(255, 60, 0, 0.3);
}

.info-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 60, 0, 0.1), transparent);
  transition: left 0.6s;
  z-index: 1;
}

.info-item:hover::before {
  left: 100%;
}

.label {
  display: block;
  font-size: 0.85rem;
  color: #888888;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

.value {
  font-size: 1.1rem;
  color: var(--accent-purple);
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(110, 31, 255, 0.5);
}

.value a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.3s ease;
}

.value a:hover,
.value a:focus {
  color: var(--accent-red);
  text-decoration: underline;
}

.story {
  margin: 2.5rem 0;
  line-height: 1.7;
  font-size: 1rem;
  animation: fadeIn 1s ease-out 1.5s forwards;
  opacity: 0;
}

.story p {
  margin-bottom: 1.2rem;
  position: relative;
  padding-left: 1.2rem;
}

.story p a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.3s ease;
}

.story p a:hover,
.story p a:focus {
  color: var(--accent-red);
  text-decoration: underline;
}

.story p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  background: var(--accent-red);
  border-radius: 50%;
  opacity: 0;
  animation: dotAppear 0.3s ease-out forwards;
}

.story p:nth-child(1)::before { animation-delay: 1.6s; }
.story p:nth-child(2)::before { animation-delay: 1.7s; }
.story p:nth-child(3)::before { animation-delay: 1.8s; }
.story p:nth-child(4)::before { animation-delay: 1.9s; }

@keyframes dotAppear {
  0% { opacity: 0; transform: scale(0); }
  100% { opacity: 1; transform: scale(1); }
}

.story strong {
  color: var(--accent-orange);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(255, 165, 0, 0.5);
}

.story em {
  color: #dddddd;
  font-style: italic;
}

.philosophy {
  text-align: center;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-left: 3px solid var(--accent-purple);
  background: rgba(18, 18, 18, 0.7);
  border-radius: 0 10px 10px 0;
  animation: fadeIn 1s ease-out 2s forwards;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.philosophy blockquote {
  font-size: 1.2rem;
  color: var(--primary);
  line-height: 1.5;
  font-weight: 500;
  padding: 0.8rem;
}

.philosophy blockquote a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.3s ease;
}

.philosophy blockquote a:hover,
.philosophy blockquote a:focus {
  color: var(--accent-red);
  text-decoration: underline;
}

a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover,
a:focus {
  color: var(--accent-red);
  text-decoration: underline;
}

@media (max-width: 768px) {
  html { font-size: 14px; }

  .futuristic-nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.8rem 0;
  }

  .futuristic-nav ul li a {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  header {
    padding: 2.5rem 1rem 1.5rem;
  }

  .about-container {
    gap: 1.2rem;
  }

  .glitch-container {
    width: 100px;
    height: 100px;
  }

  .matrix-text {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
  }

  .job-title {
    font-size: 0.95rem;
  }

  main, .certificates-section, .about-section {
    padding: 2rem 1rem;
  }

  .projects-section h2, .certificates-section h2, .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .projects-grid, .certificates-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .project-card, .cert-item {
    padding: 1.2rem;
  }

  .profile-glitch .glitch-container {
    width: 120px;
    height: 120px;
  }

  .typewriter-animation {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .story p {
    padding-left: 1rem;
  }
}

@media (max-width: 480px) {
  html { font-size: 12px; }

  .futuristic-nav ul {
    gap: 0.5rem;
    padding: 0.6rem 0;
  }

  .futuristic-nav ul li a {
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
  }

  header {
    padding: 2rem 1rem 1rem;
  }

  .glitch-container {
    width: 80px;
    height: 80px;
  }

  .matrix-text {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  .job-title {
    font-size: 0.85rem;
    letter-spacing: 1.5px;
  }

  main, .certificates-section, .about-section {
    padding: 1.5rem 1rem;
  }

  .projects-section h2, .certificates-section h2, .section-title {
    font-size: 1.3rem;
  }

  .project-card, .cert-item {
    padding: 1rem;
  }

  .profile-glitch .glitch-container {
    width: 100px;
    height: 100px;
  }

  .typewriter-animation {
    font-size: clamp(1.1rem, 5vw, 1.6rem);
  }

  .info-item {
    padding: 1rem;
  }

  .label {
    font-size: 0.75rem;
  }

  .value {
    font-size: 1rem;
  }

  .story {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .philosophy {
    padding: 1.2rem;
    margin-top: 2rem;
  }

  .philosophy blockquote {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.project-card,
.cert-item,
.info-item,
.glitch-container,
.futuristic-nav {
  will-change: transform, box-shadow, opacity;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

@supports not (mix-blend-mode: screen) {
  .glitch { opacity: 0.4; }
  .glitch-container { border: 1px solid rgba(255, 60, 0, 0.1); background: rgba(255, 60, 0, 0.05); }
}