:root {
  --bg: #0f2027;
  --text: #ffffff;
  --accent: #00ffff;
  --glass: rgba(255, 255, 255, 0.07);
  --glow: 0 0 8px #00ffff, 0 0 16px #00ffff, 0 0 32px #00ffff;
}

html.light {
  --bg: #f0f0f0;
  --text: #222;
  --accent: #0077ff;
  --glass: rgba(255, 255, 255, 0.6);
  --glow: 0 0 6px #0077ff, 0 0 12px #0077ff, 0 0 24px #0077ff;
}

* {
  user-select: none;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  text-align: center;
  transition: background 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

#themeToggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--glass);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
  z-index: 1000;
  box-shadow: var(--glow);
}

.hero {
  padding: 3rem 1rem;
  animation: fadeIn 1s ease-out;
}

.profile-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 2rem;
  display: inline-block;
  box-shadow: var(--glow);
  width: 90%;
  max-width: 480px;
  box-sizing: border-box;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin-bottom: 1rem;
  box-shadow: var(--glow);
}

h1 {
  font-size: 2.2rem;
  margin: 0.5rem 0;
}

.tagline {
  font-size: 1rem;
  opacity: 0.8;
}


.glass-section {
  margin: 2rem auto;
  padding: 1.5rem;
  width: 90%;
  max-width: 480px;
  background: var(--glass);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: var(--glow);
  box-sizing: border-box;
  animation: fadeInUp 1s ease-out;
}

.skill-bar {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  height: 12px;
  margin: 0.5rem 0 1.2rem;
}

.skill-bar .fill {
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: fillGrow 2s ease-out;
}

@keyframes fillGrow {
  from { width: 0; }
  to { width: 100%; }
}

.skill {
  margin-bottom: 1.5rem;
}

.label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.label h3 {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
}

.label .percent {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: bold;
}

.skill-bar {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  height: 12px;
}

.skill-bar .fill {
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: fillGrow 2s ease-out;
}

@keyframes fillGrow {
  from { width: 0; }
  to { width: 100%; }
}

.glass-section:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent);
  transition: all 0.3s ease;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
  text-shadow: 0 0 5px var(--accent);
}

h2::after {
  content: "";
  display: block;
  width: 0%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: underlineGrow 1.5s ease-out forwards;
}

@keyframes underlineGrow {
  to { width: 100%; }
}

.avatar::after {
  content: "";
  position: absolute;
  top: -8px; left: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulseRing 2s infinite;
  opacity: 0.4;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 0.1; }
  100% { transform: scale(1); opacity: 0.4; }
}

.contact-section {
  margin: 3rem auto;
  max-width: 480px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  text-align: left;
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  box-shadow: inset 0 0 4px rgba(0,255,255,0.2);
}

.contact-form button {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: black;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent);
  transition: transform 0.2s ease;
  align-self: center;
}

.contact-form button:hover {
  transform: scale(1.05);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  margin: 0.5rem 0;
}

#typewriter {
  font-size: 1rem;
  color: var(--text);
  border-right: 2px solid var(--accent);
  padding-right: 4px;
  white-space: normal;
  word-break: break-word;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}


body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at center, var(--accent) 0%, transparent 70%);
  animation: bgPulse 6s infinite;
  z-index: -2;
  opacity: 0.05;
}

@keyframes bgPulse {
  0%, 100% { transform: scale(1); opacity: 0.05; }
  50% { transform: scale(1.2); opacity: 0.1; }
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  border-radius: 4px;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
  color: var(--text);
  text-shadow: 0 0 5px var(--accent);
}

footer {
  margin-top: 3rem;
  font-size: 0.9rem;
  opacity: 0.5;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 400px) {
  .glass-section,
  .profile-card {
    padding: 1rem;
    font-size: 0.9rem;
    max-width: 95%;
  }

  h2 {
    font-size: 1.2rem;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }
}
