@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;600;700&display=swap');

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  --bg-color:        #0a0d14;
  --bg-2:            #0f1320;
  --bg-3:            #141929;
  --glass:           rgba(255, 255, 255, 0.04);
  --glass-border:    rgba(255, 255, 255, 0.08);
  --main-color:      #00e5ff;
  --main-glow:       rgba(0, 229, 255, 0.35);
  --accent2:         #7c5cfc;
  --accent2-glow:    rgba(124, 92, 252, 0.35);
  --text-color:      #e8eaf0;
  --text-muted:      #8892a4;
  --border-radius:   1.6rem;
}

/* ─── Reset ─────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: 0;
  scroll-behavior: smooth;
  font-family: 'Outfit', 'Poppins', sans-serif;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(0, 229, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%,  rgba(124, 92, 252, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

section {
  min-height: 100vh;
  padding: 10rem 9% 2rem;
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--main-color); border-radius: 3px; }

/* ─── Header ────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 1.8rem 9%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(10, 13, 20, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s;
}

.logo {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: 0.05em;
}

.logo span {
  color: var(--main-color);
  text-shadow: 0 0 12px var(--main-color);
}

.navbar a {
  font-size: 1.6rem;
  margin-left: 3.5rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  position: relative;
  transition: color 0.3s;
}

.navbar a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--main-color);
  box-shadow: 0 0 8px var(--main-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--text-color);
  display: none;
  cursor: pointer;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 1.1rem 3rem;
  border-radius: 5rem;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--main-color), var(--accent2));
  color: #0a0d14;
  box-shadow: 0 0 20px var(--main-glow), 0 0 40px var(--accent2-glow);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 30px var(--main-glow), 0 0 60px var(--accent2-glow);
}

/* ─── Home Section ──────────────────────────────────────── */
.home {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
}

.home-content h3 {
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.home-content h1 {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 30%, var(--main-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  margin-bottom: 0.4rem;
}

.home-content h3:nth-of-type(2) {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 2rem;
}

.home-content h3 span,
span {
  color: var(--main-color);
  text-shadow: 0 0 10px var(--main-color);
}

.home-content p {
  font-size: 1.65rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 55rem;
  margin-bottom: 0.5rem;
}

/* Social Icons */
.social-media {
  display: flex;
  gap: 1.4rem;
  margin: 2.5rem 0;
}

.social-media a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  background: transparent;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.social-media a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--main-color);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.35s ease;
  z-index: -1;
}

.social-media a:hover {
  color: var(--bg-color);
  box-shadow: 0 0 18px var(--main-glow);
}

.social-media a:hover::before {
  transform: scale(1);
}

/* Home Image */
.home-img img {
  width: 35vw;
  height: 35vw;
  max-width: 42rem;
  max-height: 42rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--main-color);
  box-shadow: 0 0 30px var(--main-glow), 0 0 70px rgba(0, 229, 255, 0.12);
  animation: floatImage 4s ease-in-out infinite;
}

.imgkriz {
  border-radius: 50px;
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-2.4rem); }
}

/* ─── About Section ─────────────────────────────────────── */
.about {
  display: flex;
  align-items: center;
  gap: 4rem;
  justify-content: center;
  background: var(--bg-2);
}

.about-img img {
  width: 35vw;
  max-width: 40rem;
  height: auto;
  border-radius: 1.6rem;
  border: 2px solid var(--glass-border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.heading {
  text-align: center;
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.about-content h2 {
  text-align: left;
  line-height: 1.2;
}

.about-content h3 {
  font-size: 2.4rem;
  color: var(--main-color);
  margin: 1rem 0;
}

.about-content p {
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin: 1.5rem 0 3rem;
}

/* ─── Hobbies Section ───────────────────────────────────── */
.hobbies {
  background: var(--bg-color);
}

.hobbies h2 {
  margin-bottom: 5rem;
}

.hobbies-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 2.4rem;
}

.hobbies-container .hobbies-box {
  flex: 1 1 28rem;
  padding: 3.5rem 2.5rem 4rem;
  border-radius: var(--border-radius);
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.hobbies-container .hobbies-box:hover {
  border-color: var(--main-color);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 30px var(--main-glow), 0 8px 30px rgba(0,0,0,0.4);
}

.hobbies-box i {
  font-size: 6.5rem;
  color: var(--main-color);
  filter: drop-shadow(0 0 8px var(--main-color));
  margin-bottom: 0.5rem;
}

.hobbies-box h3 {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0.8rem 0;
}

.hobbies-box p {
  font-size: 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 1rem 0 2.5rem;
}

/* ─── Projects Section ──────────────────────────────────── */
.project {
  background: var(--bg-2);
}

.project h2 {
  margin-bottom: 4rem;
}

.project-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 2.5rem;
}

.project-container .project-box {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.project-box {
  aspect-ratio: 5 / 3;
  overflow: hidden;
}

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

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

.project-box .project-layer {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(rgba(0,0,0,0.1), rgba(10, 13, 20, 0.93));
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 0 3rem;
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.project-box:hover .project-layer {
  transform: translateY(0);
}

.project-layer h4 {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--main-color);
  text-shadow: 0 0 12px var(--main-color);
}

.project-layer p {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin: 0.6rem 0 1.4rem;
  line-height: 1.6;
}

.project-layer a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 5rem; height: 5rem;
  background: var(--main-color);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--main-glow);
  transition: transform 0.3s;
}

.project-layer a:hover {
  transform: scale(1.15);
}

.project-layer a i {
  font-size: 2rem;
  color: var(--bg-color);
}

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

.contact h2 {
  margin-bottom: 3rem;
}

.contact form {
  max-width: 70rem;
  margin: 1rem auto 3rem;
  text-align: center;
}

.contact form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.contact form .input-box input,
.contact form textarea {
  width: 100%;
  padding: 1.6rem;
  font-size: 1.6rem;
  color: var(--text-color);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  margin: 0.7rem 0;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 12px var(--main-glow);
}

.contact form .input-box input {
  width: 49%;
}

.contact form textarea {
  resize: none;
}

.contact form .btn {
  margin-top: 2rem;
  cursor: pointer;
}

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  background: var(--bg-2);
  border-top: 1px solid var(--glass-border);
}

.footer-text p {
  font-size: 1.6rem;
  color: var(--text-muted);
}

.footer-iconTop a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.9rem;
  background: var(--main-color);
  border-radius: 0.8rem;
  transition: all 0.4s;
  box-shadow: 0 0 12px var(--main-glow);
}

.footer-iconTop a:hover {
  box-shadow: 0 0 24px var(--main-glow);
  transform: translateY(-3px);
}

.footer-iconTop a i {
  font-size: 2.4rem;
  color: var(--bg-color);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1200px) {
  html { font-size: 55%; }
}

@media (max-width: 991px) {
  .footer, .header { padding: 2rem 3%; }
  section { padding: 10rem 3% 2rem; }
  .hobbies, .project { padding-bottom: 7rem; }
  .contact { min-height: auto; }
}

@media (max-width: 768px) {
  #menu-icon { display: block; }

  .navbar {
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    padding: 1rem 3%;
    background: rgba(10, 13, 20, 0.97);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.4);
    display: none;
  }

  .navbar.active { display: block; }
  .navbar a { display: block; font-size: 2rem; margin: 3rem 0; }

  .home { flex-direction: column; text-align: center; }
  .home-content h1 { font-size: 5rem; }
  .home-content h3 { font-size: 2.4rem; }
  .home-content p { margin: 0 auto; }
  .social-media { justify-content: center; }

  .home-img img,
  .about-img img { width: 70vw; margin-top: 4rem; }

  .about { flex-direction: column-reverse; }
  .hobbies h2, .project h2 { margin-bottom: 3rem; }
  .project-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 617px) {
  .project-container { grid-template-columns: 1fr; }
}

@media (max-width: 450px) {
  html { font-size: 50%; }
  .contact form .input-box input { width: 100%; }
}

@media (max-width: 365px) {
  .about-img img, .home-img img { width: 90vw; }
  .footer { flex-direction: column-reverse; }
  .footer p { text-align: center; margin-top: 2rem; }
}

/* ─── Floating Music Button ─────────────────────────────── */
.music-btn {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  z-index: 999;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--main-color), var(--accent2));
  box-shadow: 0 0 20px var(--main-glow), 0 0 40px var(--accent2-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
  user-select: none;
}

.music-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 0 35px var(--main-glow), 0 0 60px var(--accent2-glow);
}

.music-btn.playing {
  animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 20px var(--main-glow), 0 0 40px var(--accent2-glow); }
  50%       { box-shadow: 0 0 45px var(--main-glow), 0 0 80px var(--accent2-glow); }
}

/* Icon inside button */
.music-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-icon i {
  font-size: 2.8rem;
  color: #0a0d14;
  transition: transform 0.4s;
}

.music-btn.playing .music-icon i {
  animation: spinOnce 0.4s ease;
}

@keyframes spinOnce {
  from { transform: rotate(-180deg) scale(0.4); }
  to   { transform: rotate(0deg)    scale(1);   }
}

/* Animated equalizer bars */
.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
  margin-top: 2px;
}

.music-bars.active {
  height: 1.4rem;
}

.music-bars span {
  display: block;
  width: 4px;
  height: 4px;
  background: #0a0d14;
  border-radius: 2px;
}

.music-bars.active span:nth-child(1) { animation: bar 0.8s ease-in-out infinite alternate; }
.music-bars.active span:nth-child(2) { animation: bar 0.6s ease-in-out 0.15s infinite alternate; }
.music-bars.active span:nth-child(3) { animation: bar 1.0s ease-in-out 0.3s  infinite alternate; }
.music-bars.active span:nth-child(4) { animation: bar 0.7s ease-in-out 0.45s infinite alternate; }

@keyframes bar {
  from { height: 3px;  }
  to   { height: 14px; }
}

/* Ripple ring while playing */
.music-btn.playing::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--main-color);
  animation: rippleRing 1.6s ease-out infinite;
  pointer-events: none;
}

@keyframes rippleRing {
  0%   { transform: scale(1);    opacity: 0.9; }
  100% { transform: scale(1.55); opacity: 0;   }
}