:root {
  --bg: #0b0f14;
  --panel: rgba(18, 24, 33, 0.85);
  --cyan: #00e5ff;
  --muted: #9aa4ad;
  --glass: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #e6e6e6;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; }

.container {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  min-height: 90vh;
}

.terminal {
  background: #020617;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 14px;
  padding: 25px;
  font-family: 'Fira Code', monospace;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.15);
  animation: fadeIn 1.2s ease forwards;
  overflow-x: auto;
}

.terminal span.username { color: var(--cyan); }
.terminal span.command { color: #ffffff; }
.terminal p.output { color: #ffffff; }

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.2rem;
  background: var(--cyan);
  animation: blink 1s infinite;
  vertical-align: middle;
}

@keyframes blink { 50% { opacity: 0; } }

.profile { text-align: center; }
.profile h1 { position: relative; font-family: 'Fira Code', monospace; color: var(--cyan); font-size: 2.5rem; }
.profile h1:hover { animation: glitch 0.35s infinite; }

@keyframes glitch {
  0% { text-shadow: 2px 0 #00e5ff, -2px 0 #ff004c; }
  20% { text-shadow: -2px 0 #00e5ff, 2px 0 #ff004c; }
  40% { text-shadow: 2px 2px #00e5ff, -2px -2px #ff004c; }
  60% { text-shadow: -1px 1px #00e5ff, 1px -1px #ff004c; }
  100% { text-shadow: none; }
}

.profile img {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  border: 3px solid var(--cyan);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.6);
  margin-bottom: 5px;
}

.profile h2 { font-size: 1.1rem; color: var(--muted); margin-top: 5px; }

section {
  margin-top: 60px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

section.summary { margin-top: 30px; }
section.visible { opacity: 1; transform: translateY(0); }

section h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--cyan);
  padding-bottom: 6px;
}

.card {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 25px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 229, 255, 0.15);
}

.skills, .courses { display: flex; flex-wrap: wrap; gap: 12px; }
.skill, .course-card {
  background: var(--glass);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: 0.3s;
  text-align: center;
}
.course-card { border-radius: 25px; color: var(--cyan); }
.skill:hover, .course-card:hover { background: var(--cyan); color: #000; transform: scale(1.05); }

.experience-item { background: var(--panel); padding: 25px; border-radius: 12px; margin-bottom: 25px; border: 1px solid rgba(0, 229, 255, 0.15); }
.exp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.exp-header h4 { color: var(--cyan); font-size: 1.2rem; }
.exp-header span { font-size: 0.95rem; color: var(--muted); }

.org-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-top: 20px; }
.org-tile {
  background: #0f141d; border: 2px solid var(--cyan); border-radius: 12px;
  padding: 15px 10px; height: 70px; display: flex; align-items: center; justify-content: center;
  color: var(--cyan); font-weight: 700; font-size: 0.85rem; text-align: center;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  perspective: 600px;
  cursor: pointer;
}
.org-tile:hover { transform: rotateY(180deg) scale(1.15); }

.cert-trigger {
  color: #00ffff; 
  transition: all 0.3s ease;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  cursor: pointer;
  position: relative;
}

.cert-trigger:hover {
  color: #ffffff !important; 
  background: rgba(0, 255, 255, 0.15); 
  text-shadow: 0 0 10px #00ffff; 
  transform: translateX(10px); 
  text-decoration: none !important;
}

.cert-trigger:hover::before {
  content: '>';
  position: absolute;
  left: -12px;
  color: #00ffff;
  font-weight: bold;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

#image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#image-overlay.show {
  opacity: 1;
  visibility: visible;
}

#org-hover-img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  pointer-events: auto;
}

#image-overlay.show #org-hover-img {
  transform: scale(1);
}

#close-btn {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 3rem;
  color: var(--cyan);
  cursor: pointer;
  line-height: 1;
  z-index: 10001;
  transition: 0.3s;
}

#close-btn:hover {
  color: #fff;
  transform: scale(1.2);
}

.achievements-header { font-weight: 700; color: var(--cyan); margin: 20px 0 10px 0; font-size: 1rem; }
.achievements { padding-left: 20px; list-style: none; }
.achievements li { margin-bottom: 10px; font-size: 0.95rem; position: relative; }
.achievements li::before { content: '•'; position: absolute; left: 0; color: var(--cyan); }

.volunteer-bullets { list-style: none; padding-left: 0; margin-top: 15px; }
.volunteer-bullets li { margin-bottom: 10px; padding-left: 25px; position: relative; }
.volunteer-bullets li::before { content: '•'; position: absolute; left: 0; color: var(--cyan); }

.education-item { background: var(--panel); padding: 25px; border-radius: 12px; margin-bottom: 15px; border: 1px solid rgba(0, 229, 255, 0.15); }

.language { margin-bottom: 15px; }
.language-name { font-weight: 600; margin-bottom: 5px; }
.bar-bg { width: 100%; height: 15px; background: #1a2330; border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 8px; background: var(--cyan); width: 100%; }

.writeups, .profiles { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; }
.writeup-card, .profile-card {
  background: #0f141d; border: 2px solid var(--cyan); border-radius: 12px; padding: 15px 20px;
  flex: 1 1 300px; color: var(--cyan); text-decoration: none; display: flex; flex-direction: column; transition: 0.3s;
}
.writeup-card:hover, .profile-card:hover { background: var(--cyan); color: #000; transform: scale(1.05); }
.writeup-title, .profile-title { font-weight: 700; font-size: 1rem; margin-bottom: 5px; }
.writeup-link, .profile-link { font-size: 0.85rem; color: var(--muted); }

footer { text-align: center; margin-top: 60px; font-size: 0.9rem; color: #6f7a85; padding-bottom: 40px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 30px; min-height: auto; }
  .profile img { width: 120px; height: 120px; }
  .profile h1 { font-size: 1.8rem; }
  .skills, .courses, .writeups, .profiles { justify-content: center; }
  .skill, .course-card { flex: 1 1 45%; }
  .writeup-card, .profile-card { flex: 1 1 90%; }
  section { margin-top: 40px; }
  .exp-header { flex-direction: column; gap: 5px; align-items: flex-start; }
  .org-tile { height: 60px; font-size: 0.8rem; }
  #close-btn { top: 20px; right: 20px; font-size: 2.5rem; }
}

@media (hover: none) {
  .org-tile:hover { transform: none; }
  .skill:hover, .course-card:hover, .writeup-card:hover, .profile-card:hover { transform: none; background: var(--glass); color: var(--cyan); }
}