/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { height: 100%; }
body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg,#000 0%, #0b0710 50%, #0f0520 100%);
  color: #fff;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }


#bgCubes {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;              
  pointer-events: none;    
}
main, nav, header, section, footer { position: relative; z-index: 1; }


.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}


nav {
  width: 100%;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(6px);
  position: fixed;
  top: 12px;
  left: 0;
  display: flex;
  justify-content: center; 
  z-index: 5;
  padding: 10px 0;
}
nav .nav-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px;
}
.logo { font-weight: 700; color: #a020f0; }
nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  align-items: center;
}
nav a {
  color: #ddd;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background .18s, color .18s, transform .12s;
  font-weight: 600;
  font-size: 0.95rem;
}
nav a:hover { background: rgba(160,32,240,0.12); color: #fff; transform: translateY(-2px); }


header#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px; 
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  padding: 40px;
}
.hero-content {
  flex: 1 1 480px;
  text-align: left;
}
.hero-content h1 {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.05;
}
.hero-content p {
  color: #ddd;
  margin-bottom: 18px;
  max-width: 60ch;
}
.hero-actions { display:flex; gap:12px; align-items:center; }

.btn {
  background: #a020f0;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  display: inline-block;
  font-weight: 700;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-3px); background: #c04cff; color: #000; }

.hero-photo {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  border: 4px solid rgba(160,32,240,0.95);
  transition: transform .25s;
  display:block;
}
.hero-photo img:hover { transform: scale(1.05); }


@media (max-width: 880px) {
  .hero-inner { flex-direction: column-reverse; gap: 28px; padding: 24px; }
  .hero-content { text-align: center; }
  .hero-photo { margin-bottom: 6px; }
}


section {
  padding: 80px 0;
  display: block;
  width: 100%;
}
section .container { text-align: center; }

h2.section-title {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 18px;
}
p.lead { color: #ccc; margin-bottom: 28px; max-width: 70ch; margin-left:auto; margin-right:auto; }


#projects .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: stretch;
  justify-items: center;
  margin-top: 18px;
}
.card {
  width: 100%;
  max-width: 360px;
  height: 320px;
  perspective: 1000px;
  position: relative;
}
.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform .7s;
  transform-style: preserve-3d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
  border: 2px solid rgba(160,32,240,0.12);
  background: linear-gradient(180deg,#0f0f12, #111);
}
.card:hover .card-inner { transform: rotateY(180deg); }
.card-front, .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 18px;
}
.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  display: block;
  border-radius: 8px;
}
.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg,#111,#0b0b0d);
  color: #ddd;
  text-align: left;
}
.card-back h3 { color: #fff; margin-bottom: 8px; }
.card-back p { font-size: 0.95rem; color: #cfcfcf; margin-bottom: 6px; }


#resume .skills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}
.skills span {
  background: linear-gradient(90deg,#a020f0,#c04cff);
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(160,32,240,0.12);
}


#contact form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}
input, textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(160,32,240,0.25);
  background: #0b0b0d;
  color: #fff;
  resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: #a020f0; box-shadow: 0 0 0 4px rgba(160,32,240,0.06); }


.muted { color: #bdbdbd; font-size: 0.95rem; }
.center { text-align: center; }


#darkToggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 6;
}
#backToTop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  display: none;
}


section { opacity: 0; transform: translateY(18px); transition: all .6s ease; }
section.show { opacity: 1; transform: translateY(0); }


.error { animation: shake .36s; border-color: #ff6b6b !important; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}


@media (max-width: 520px) {
  .hero-content h1 { font-size: 1.6rem; }
  .hero-photo img { width: 180px; height: 180px; }
  .card { height: 260px; }
}


.profile-meta {
  margin-top: 12px;
  text-align: center;
  width: 100%;
}

.profile-name {
  font-weight: 800;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}


.socials {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-block;
  background: linear-gradient(90deg, #a020f0, #c04cff);
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s, opacity .12s;
  box-shadow: 0 6px 18px rgba(160,32,240,0.12);
  pointer-events: auto; 
}

.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(160,32,240,0.18);
  opacity: 0.98;
}


@media (max-width: 520px) {
  .profile-name { font-size: 0.85rem; }
  .social-btn { padding: 7px 10px; font-size: 0.85rem; }
}


.css-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: #a020f0;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: default;
  box-shadow: 0 4px 10px rgba(160,32,240,0.25);
  transition: transform .15s;
}
.css-badge:hover {
  transform: scale(1.05);
}
