/* --- Theme --- */
:root {
  --bg: #070a12;
  --bg-elev: #0b0f1a;
  --panel: rgba(14, 20, 33, 0.6);
  --glass: rgba(160, 233, 255, 0.08);
  --fg: #e6f1ff;
  --muted: #9fb3c8;
  --accent: #7df9ff;
  --accent-2: #8a7dff;
  --accent-3: #ff7de9;
  --card-border: rgba(125, 249, 255, 0.35);
  --grid: rgba(125, 249, 255, 0.08);
  --shadow: 0 10px 30px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.02) inset;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding-top: 5rem;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--fg);
  background: radial-gradient(1200px 800px at 70% -10%, #0a1023 0%, #070a12 60%),
              radial-gradient(800px 600px at -10% 10%, #101c2f 0%, transparent 60%),
              radial-gradient(600px 500px at 50% 50%, rgba(125,249,255,.03) 0%, transparent 50%),
              radial-gradient(400px 400px at 90% 80%, rgba(138,125,255,.02) 0%, transparent 50%),
              #070a12;
  overflow-x: hidden;
}

/* --- Background Starfield Canvas --- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
}

/* --- Cosmic grid overlay --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,0.08), transparent 20%),
    radial-gradient(circle at 80% 20%, rgba(125,249,255,0.12), transparent 25%),
    radial-gradient(circle at 30% 70%, rgba(138,125,255,0.08), transparent 20%),
    radial-gradient(circle at 90% 90%, rgba(255,125,233,0.06), transparent 15%),
    repeating-linear-gradient(90deg, transparent 0 98px, var(--grid) 98px 99px, transparent 99px 199px),
    repeating-linear-gradient(0deg, transparent 0 98px, var(--grid) 98px 99px, transparent 99px 199px);
  pointer-events: none;
  z-index: -1;
  animation: grid-shift 30s linear infinite;
}
@keyframes grid-shift {
  0% { opacity: .7; }
  50% { opacity: 1; }
  100% { opacity: .7; }
}

.container { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; }

/* --- Header --- */
.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) perspective(1000px) rotateX(2deg);
  width: calc(100% - 4rem);
  max-width: 1400px;
  backdrop-filter: saturate(1.4) blur(20px);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  background: linear-gradient(180deg, rgba(7,10,18,0.85), rgba(7,10,18,0.6));
  border: 1px solid rgba(125,249,255,0.25);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0,0,0,.4),
    0 0 0 1px rgba(125,249,255,.1) inset,
    0 20px 60px rgba(125,249,255,.05);
  padding: 1rem 2rem;
  z-index: 100;
  transition: all .3s ease;
  transform-style: preserve-3d;
}
.site-header.scrolled {
  background: linear-gradient(180deg, rgba(7,10,18,0.65), rgba(7,10,18,0.4));
  backdrop-filter: saturate(1.2) blur(15px);
  -webkit-backdrop-filter: saturate(1.2) blur(15px);
  border-color: rgba(125,249,255,0.15);
  box-shadow: 
    0 6px 24px rgba(0,0,0,.3),
    0 0 0 1px rgba(125,249,255,.08) inset,
    0 15px 45px rgba(125,249,255,.03);
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(125,249,255,.08), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.site-header:hover {
  transform: translateX(-50%) perspective(1000px) rotateX(0deg) translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0,0,0,.5),
    0 0 0 1px rgba(125,249,255,.2) inset,
    0 25px 70px rgba(125,249,255,.08);
}
.site-header:hover::before { opacity: 1; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: .6rem 1.2rem;
  border-radius: 12px;
  transition: all .3s;
  position: relative;
  font-weight: 500;
  font-size: .95rem;
  overflow: hidden;
}
.nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(125,249,255,.12), rgba(138,125,255,.08));
  opacity: 0;
  transition: opacity .3s;
  z-index: -1;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width .3s;
}
.nav a:hover::before { opacity: 1; }
.nav a:hover::after { width: 80%; }
.nav a:hover {
  color: var(--fg);
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(125,249,255,.3);
}
@media (max-width: 900px) {
  .site-header { 
    padding: .6rem .8rem;
    width: calc(100% - 1.6rem);
    transform: translateX(-50%) perspective(1000px) rotateX(1deg);
  }
  .site-header:hover {
    transform: translateX(-50%) perspective(1000px) rotateX(0deg) translateY(-1px);
  }
  .nav { gap: .2rem; flex-wrap: nowrap; justify-content: space-between; width: 100%; }
  .nav a { padding: .35rem .5rem; font-size: .75rem; white-space: nowrap; }
}
@media (max-width: 600px) {
  nav { gap: .15rem; }
  nav a { padding: .3rem .4rem; font-size: .7rem; }
  
  .hero { padding: 6rem 0 4rem; }
  .atom { width: 240px; }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .btn, .btn-sec { 
    font-size: .9rem; 
    padding: .65rem 1.2rem; 
  }
  
  .hero-inner { gap: 2rem; }
  .actions { justify-content: center; }
  .socials { gap: .75rem; justify-content: center; }
  .socials img { width: 30px; height: 30px; }
  
  .cards .card-body { padding: 1.2rem; }
  .cards h3 { font-size: 1.1rem; }
  .tags span { font-size: .75rem; padding: .2rem .4rem; }
  
  .t-content { padding: 1.2rem; }
  .t-content h3 { font-size: 1.1rem; }
  
  .tech-icon { font-size: 2rem; }
  .tech-card { padding: 1.5rem 1.25rem; min-height: 160px; }
  
  .modal-content { 
    width: 96%; 
    height: 88vh;
    padding: 0.5rem;
  }
  .modal-close { 
    font-size: 2rem; 
    top: 0.5rem; 
    right: 1rem; 
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .site-footer { padding: 2rem 0 1rem; }
}

/* --- Hero --- */
.hero { padding: 8rem 0 6rem; }
.hero-inner { display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; align-items: center; width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
@media (max-width: 900px) { 
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .intro { display: flex; flex-direction: column; align-items: center; }
  .blurb { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .socials { justify-content: center; }
}

.atom { position: relative; width: 320px; aspect-ratio: 1; margin-inline: auto; border-radius: 50%; background: radial-gradient(circle at 50% 50%, rgba(125,249,255,.15), rgba(138,125,255,.12) 45%, transparent 60%); box-shadow: 0 0 0 1px rgba(125,249,255,.2) inset, 0 20px 60px rgba(0,0,0,.4), 0 0 80px rgba(125,249,255,.15); animation: pulse 4s ease-in-out infinite; }
/* allow orbits to extend beyond the atom */
.atom { overflow: visible; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(125,249,255,.2) inset, 0 20px 60px rgba(0,0,0,.4), 0 0 80px rgba(125,249,255,.15); } 50% { box-shadow: 0 0 0 1px rgba(125,249,255,.35) inset, 0 20px 60px rgba(0,0,0,.4), 0 0 120px rgba(125,249,255,.25); } }
.atom-core { width: 76%; aspect-ratio: 1; border-radius: 50%; position: absolute; inset: 0; margin: auto; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 40% 30%, rgba(125,249,255,.35), rgba(138,125,255,.25)); border: 2px solid rgba(160,233,255,.4); box-shadow: 0 0 40px rgba(125,249,255,.3) inset, 0 10px 30px rgba(0,0,0,.6); z-index: 2; }

/* --- Solar system / orbital rings --- */
.orbit-system { position: absolute; inset: 0; display: block; pointer-events: none; z-index: -1; }
.orbit { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.orbit::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(125,249,255,0.04); box-shadow: 0 0 24px rgba(125,249,255,0.02) inset; }
.orbit .planet { position: absolute; right: -6px; top: 50%; transform: translate(0, -50%); border-radius: 50%; box-shadow: 0 8px 18px rgba(0,0,0,0.4); }

/* Orbit sizes and speeds */
.orbit-1 { width: 160%; height: 160%; animation: spin 6s linear infinite; }
.orbit-2 { width: 240%; height: 240%; animation: spin 9.5s linear infinite reverse; }
.orbit-3 { width: 320%; height: 320%; animation: spin 13s linear infinite; }
.orbit-4 { width: 400%; height: 400%; animation: spin 18s linear infinite reverse; }
.orbit-5 { width: 480%; height: 480%; animation: spin 26s linear infinite; }
.orbit-6 { width: 560%; height: 560%; animation: spin 34s linear infinite reverse; }
.orbit-7 { width: 640%; height: 640%; animation: spin 46s linear infinite; }
.orbit-8 { width: 740%; height: 740%; animation: spin 60s linear infinite reverse; }

/* Planet visuals */
.p1 { width: 6px; height: 6px; background: linear-gradient(135deg,#ffd27a,#ffb86b); }
.p2 { width: 7px; height: 7px; background: linear-gradient(135deg,#e6d7ff,#cbb8ff); }
.p3 { width: 9px; height: 9px; background: linear-gradient(135deg,#9be6ff,#66c2ff); }
.p4 { width: 10px; height: 10px; background: linear-gradient(135deg,#a7ffb1,#7fe58f); }
.p5 { width: 12px; height: 12px; background: linear-gradient(135deg,#ffd8b8,#ffb86b); }
.p6 { width: 11px; height: 11px; background: linear-gradient(135deg,#ffeaa7,#ffd46a); }
.p7 { width: 7px; height: 7px; background: linear-gradient(135deg,#d7f0ff,#bfe7ff); }
.p8 { width: 13px; height: 13px; background: linear-gradient(135deg,#cda7ff,#9b7bff); }

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .orbit-1, .orbit-2, .orbit-3, .orbit-4 { animation: none !important; }
}

/* Mobile adjustments: fewer/lighter rings */
@media (max-width: 900px) {
  /* scale down orbits on smaller screens while keeping them outside the core */
  .orbit-1 { width: 140%; height: 140%; }
  .orbit-2 { width: 200%; height: 200%; }
  .orbit-3 { width: 260%; height: 260%; }
  .orbit-4 { width: 320%; height: 320%; }
  .orbit-5 { width: 380%; height: 380%; }
  .orbit-6, .orbit-7, .orbit-8 { display: none; }
}

.core-symbol { font-size: 5rem; font-weight: 300; color: rgba(255,255,255,.95); text-shadow: 0 0 20px rgba(125,249,255,.8), 0 0 40px rgba(125,249,255,.4); }
/* core symbolic styling (keeps the center visual) */
.core-symbol { font-size: 5rem; font-weight: 300; color: rgba(255,255,255,.95); text-shadow: 0 0 20px rgba(125,249,255,.8), 0 0 40px rgba(125,249,255,.4); }

.intro h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 .4rem; letter-spacing: .02em; }
.tag { color: var(--accent); font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0 0 1rem; }
.blurb { color: var(--muted); max-width: 60ch; }
.actions { display: flex; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.socials { display: flex; gap: .6rem; margin-top: 1.2rem; }
.icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; color: var(--fg); background: rgba(160,233,255,0.08); border: 1px solid rgba(160,233,255,0.18); }
.icon:hover { background: rgba(160,233,255,0.18); }
/* Ensure the SVG glyphs fit comfortably inside the square button */
.icon svg { width: 22px; height: 22px; }

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border-radius: 12px; border: 1px solid var(--card-border); color: var(--fg); text-decoration: none; background: linear-gradient(180deg, rgba(160,233,255,0.06), rgba(160,233,255,0.02)); box-shadow: var(--shadow); transition: all .3s cubic-bezier(.4,0,.2,1); position: relative; overflow: hidden; }
.btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(125,249,255,.1), transparent); opacity: 0; transition: opacity .3s; }
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-2px); background: linear-gradient(180deg, rgba(160,233,255,0.12), rgba(160,233,255,0.06)); box-shadow: 0 8px 24px rgba(125,249,255,.15), var(--shadow); }
.btn.primary { border-color: rgba(125,249,255,0.7); background: linear-gradient(180deg, rgba(125,249,255,0.28), rgba(125,249,255,0.12)); box-shadow: 0 0 28px rgba(125,249,255,0.3), 0 8px 16px rgba(0,0,0,.3); color: var(--fg); }
.btn.primary:hover { background: linear-gradient(180deg, rgba(125,249,255,0.4), rgba(125,249,255,0.22)); box-shadow: 0 0 40px rgba(125,249,255,0.5), 0 12px 24px rgba(0,0,0,.4); transform: translateY(-3px); }
.btn.ghost { background: transparent; }

/* --- Sections --- */
.section { padding: 4.5rem 0; position: relative; }
.section h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 1.25rem; }
.section p { color: var(--muted); }

.skills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.skills span { border: 1px solid rgba(160,233,255,0.2); background: rgba(160,233,255,0.06); padding: .45rem .6rem; border-radius: 999px; font-size: .9rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; grid-auto-rows: 1fr; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { position: relative; padding: 0; background: linear-gradient(135deg, rgba(125,249,255,.08) 0%, rgba(138,125,255,.06) 100%); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(125,249,255,.25); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: all .5s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity .5s; z-index: 1; }
.card:hover::before { opacity: 1; }
.card:hover { background: linear-gradient(135deg, rgba(125,249,255,.15) 0%, rgba(138,125,255,.12) 100%); border-color: var(--accent); transform: translateY(-8px) scale(1.02); box-shadow: 0 25px 60px rgba(125,249,255,.2), 0 0 0 1px rgba(125,249,255,.3) inset; }
.card-media { height: 200px; border-bottom: 1px solid rgba(125,249,255,0.2); position: relative; overflow: hidden; }
.card-media::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(7,10,18,.5) 100%); }
.gradient { background: conic-gradient(from 180deg at 50% 50%, rgba(125,249,255,0.2), rgba(138,125,255,0.2), rgba(255,125,233,0.2), rgba(125,249,255,0.2)); filter: saturate(1.4) contrast(1.1); }
.gradient.g1 { background: radial-gradient(circle at 20% 30%, rgba(125,249,255,0.6), transparent 30%), radial-gradient(circle at 70% 60%, rgba(138,125,255,0.5), transparent 35%), radial-gradient(circle at 40% 70%, rgba(255,125,233,0.45), transparent 35%); }
.gradient.g2 { background: radial-gradient(circle at 30% 40%, rgba(125,249,255,0.5), transparent 30%), radial-gradient(circle at 60% 30%, rgba(255,125,233,0.5), transparent 35%), radial-gradient(circle at 60% 80%, rgba(138,125,255,0.5), transparent 35%); }
.gradient.g3 { background: radial-gradient(circle at 25% 50%, rgba(138,125,255,0.5), transparent 35%), radial-gradient(circle at 65% 40%, rgba(125,249,255,0.5), transparent 30%), radial-gradient(circle at 55% 70%, rgba(255,125,233,0.5), transparent 30%); }
.card-body { 
  padding: 1rem; 
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card h3 { margin: 0 0 .4rem; }
.card-body p {
  flex-grow: 1;
  margin-bottom: 0.7rem;
}
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0 .9rem; }
.tags span { font-size: .8rem; color: var(--fg); border: 1px dashed rgba(160,233,255,0.35); border-radius: 999px; padding: .25rem .5rem; background: rgba(160,233,255,0.06); }
.links { display: flex; gap: .5rem; margin-top: auto; }

/* --- Experience Cards --- */
.experience-cards {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 900px) { 
  .experience-cards { grid-template-columns: 1fr; } 
}
.experience-cards .card-body {
  padding: 1.5rem;
}
.experience-cards h3 {
  font-size: 1.3rem;
  margin: 0 0 0.3rem;
  background: linear-gradient(135deg, var(--accent), rgba(138,125,255,1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.exp-org {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin: 0 0 0.5rem;
}
.exp-date {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--accent);
  padding: 0.25rem 0.6rem;
  background: rgba(125,249,255,0.1);
  border: 1px solid rgba(125,249,255,0.3);
  border-radius: 6px;
  margin-bottom: 1rem;
}
.experience-cards p {
  margin-top: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}

/* --- Timeline --- */
.timeline { position: relative; margin-left: .8rem; padding-left: 1.2rem; }
.timeline::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 2px; background: linear-gradient(180deg, rgba(125,249,255,0), rgba(125,249,255,.7), rgba(125,249,255,0)); filter: drop-shadow(0 0 8px rgba(125,249,255,.7)); }
.t-item { position: relative; padding: .6rem 0 1.2rem 0; }
.t-dot { position: absolute; left: -7px; top: .7rem; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 16px rgba(125,249,255,1), 0 0 8px rgba(125,249,255,.6) inset; animation: pulse-dot 3s ease-in-out infinite; z-index: 2; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 16px rgba(125,249,255,1), 0 0 8px rgba(125,249,255,.6) inset; transform: scale(1); } 50% { box-shadow: 0 0 24px rgba(125,249,255,1), 0 0 12px rgba(125,249,255,.8) inset; transform: scale(1.1); } }
.t-content { 
  border: 1px solid rgba(125,249,255,.25); 
  background: linear-gradient(135deg, rgba(125,249,255,.08) 0%, rgba(138,125,255,.06) 100%); 
  backdrop-filter: blur(20px) saturate(180%); 
  -webkit-backdrop-filter: blur(20px) saturate(180%); 
  border-radius: 18px; 
  padding: .9rem 1rem; 
  transition: all .5s cubic-bezier(.4,0,.2,1); 
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.t-content::before { 
  content: ''; 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  height: 3px; 
  background: linear-gradient(90deg, transparent, var(--accent), transparent); 
  opacity: 0; 
  transition: opacity .5s; 
}
.t-item:hover .t-content { 
  background: linear-gradient(135deg, rgba(125,249,255,.15) 0%, rgba(138,125,255,.12) 100%); 
  border-color: var(--accent); 
  transform: translateX(5px); 
  box-shadow: 0 25px 60px rgba(125,249,255,.2), 0 0 0 1px rgba(125,249,255,.3) inset; 
}
.t-item:hover .t-content::before { opacity: 1; }
.t-date { color: var(--muted); font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* --- Technologies --- */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; margin-top: 2rem; }
@media (max-width: 900px) { .tech-grid { grid-template-columns: 1fr; } }
.tech-card { position: relative; padding: 2rem 1.75rem; background: linear-gradient(135deg, rgba(125,249,255,.08) 0%, rgba(138,125,255,.06) 100%); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(125,249,255,.25); border-radius: 18px; transition: all .5s cubic-bezier(.4,0,.2,1); overflow: hidden; box-shadow: var(--shadow); min-height: 200px; display: flex; flex-direction: column; }
.tech-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity .5s; }
.tech-card:hover::before { opacity: 1; }
.tech-card:hover { background: linear-gradient(135deg, rgba(125,249,255,.15) 0%, rgba(138,125,255,.12) 100%); border-color: var(--accent); transform: translateY(-8px) scale(1.02); box-shadow: 0 25px 60px rgba(125,249,255,.2), 0 0 0 1px rgba(125,249,255,.3) inset; }
.tech-icon { font-size: 2.5rem; margin-bottom: 1rem; filter: drop-shadow(0 4px 12px rgba(125,249,255,.4)); animation: float 3s ease-in-out infinite; display: inline-block; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.tech-card:nth-child(2) .tech-icon { animation-delay: .5s; }
.tech-card:nth-child(3) .tech-icon { animation-delay: 1s; }
.tech-card:nth-child(4) .tech-icon { animation-delay: 1.5s; }
.tech-card:nth-child(5) .tech-icon { animation-delay: 2s; }
.tech-card:nth-child(6) .tech-icon { animation-delay: 2.5s; }
.tech-card h4 { font-size: 1.3rem; margin-bottom: .75rem; background: linear-gradient(135deg, var(--accent), rgba(138,125,255,1)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 600; }
.tech-card p { color: rgba(255,255,255,.8); font-size: .95rem; line-height: 1.6; margin: 0; }

/* --- Resume Modal --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7,10,18,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal.show { display: block; }
.modal-content {
  position: relative;
  margin: 2% auto;
  width: 90%;
  max-width: 1200px;
  height: 90vh;
  background: linear-gradient(135deg, rgba(125,249,255,.08), rgba(138,125,255,.06));
  border: 1px solid rgba(125,249,255,.3);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 25px 80px rgba(125,249,255,.3);
  animation: slideIn 0.3s ease;
}
@media (max-width: 900px) {
  .modal-content {
    margin: 1% auto;
    width: 95%;
    height: 92vh;
    padding: 0.75rem;
    border-radius: 12px;
  }
}
@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: var(--accent);
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: all .3s;
  line-height: 1;
}
.modal-close:hover {
  color: #fff;
  transform: rotate(90deg);
  text-shadow: 0 0 20px rgba(125,249,255,.8);
}
#resumeFrame {
  width: 100%;
  height: calc(100% - 2rem);
  border: none;
  border-radius: 12px;
  background: #fff;
}

/* --- Contact --- */
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 900px) { .contact-cards { grid-template-columns: 1fr; } }
.c-card { display: flex; gap: .8rem; align-items: center; border: 1px solid var(--card-border); padding: 1rem; border-radius: 14px; text-decoration: none; color: var(--fg); background: var(--glass); box-shadow: var(--shadow); transition: all .3s cubic-bezier(.4,0,.2,1); }
.c-card:hover { background: rgba(125,249,255,0.12); border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 36px rgba(125,249,255,.2), var(--shadow); }
.c-icon { font-size: 1.5rem; filter: drop-shadow(0 0 10px rgba(125,249,255,.4)); transition: filter .3s; }
.c-card:hover .c-icon { filter: drop-shadow(0 0 16px rgba(125,249,255,.7)); }

/* --- Footer --- */
.site-footer { 
  border-top: 1px solid rgba(125,249,255,0.2); 
  background: linear-gradient(0deg, rgba(7,10,18,0.95), rgba(7,10,18,0.7)); 
  padding: 3rem 0 1.5rem; 
  margin-top: 4rem; 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(125,249,255,0.15);
}
.footer-left h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), rgba(138,125,255,1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-left p {
  color: var(--muted);
  margin: 0.25rem 0;
  font-size: 0.95rem;
}
.footer-tagline {
  margin-top: 0.75rem !important;
  color: rgba(255,255,255,0.7) !important;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-section h4 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.footer-section a {
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  transition: all 0.3s;
}
.footer-section a:hover {
  color: var(--accent);
  transform: translateX(3px);
  text-shadow: 0 0 8px rgba(125,249,255,0.4);
}
.footer-resume-btn {
  background: linear-gradient(135deg, rgba(125,249,255,.15), rgba(138,125,255,.1));
  border: 1px solid rgba(125,249,255,0.3);
  color: var(--accent);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.footer-resume-btn:hover {
  background: linear-gradient(135deg, rgba(125,249,255,.25), rgba(138,125,255,.2));
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(125,249,255,0.2);
}
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
}
.footer-bottom p { 
  color: var(--muted); 
  margin: 0; 
  font-size: 0.9rem;
}
@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* --- Effects --- */
.tilt { transform-style: preserve-3d; will-change: transform; }
.reveal { opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* --- Touch optimizations --- */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover animations on touch devices */
  .card:hover, .tech-card:hover, .t-item:hover .t-content {
    transform: none;
  }
  /* Make buttons easier to tap */
  .btn, .btn-sec, nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(125,249,255,0.25); border-radius: 999px; }
::-webkit-scrollbar-track { background: rgba(160,233,255,0.04); }
