/* ===== Base / theme ===== */
:root {
  --bg-dark: #1a0e22;
  --bg-darker: #120a18;
  --pink: #ff5ec4;
  --pink-light: #ffa8e0;
  --purple: #3d1f52;
  --purple-light: #6b3f8c;
  --text-light: #f5e8ff;
  --text-muted: #c9a9dd;
  --accent-glow: 0 0 12px rgba(255, 94, 196, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ===== Starfield canvas ===== */
#star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Sticky nav ===== */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 10, 24, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 94, 196, 0.2);
}

#navbar ul {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  list-style: none;
  padding: 1rem;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--pink-light);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--pink);
  box-shadow: var(--accent-glow);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem 6%;
  background: rgba(18, 10, 24, 0.85);
}

.hero-text {
  z-index: 2;
  margin-right: auto;
}

.hero-title {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: 1;
  letter-spacing: 3px;
  color: var(--text-light);
  text-shadow: 0 0 20px rgba(255, 168, 224, 0.8), 0 0 40px rgba(255, 94, 196, 0.5);
}

.sparkle {
  display: inline-block;
  color: #fff6c9;
  animation: twinkle 1.8s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.badge-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  background: #fff;
  color: #1a0e22;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Character illustration — replace the <img> src with your art */
.hero-character {
  position: absolute;
  right: -2%;
  bottom: 0;
  width: min(720px, 50vw);
  z-index: 1;
}

.hero-character img {
  width: 100%;
  height: auto;
  display: block;
}

.floating {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* blink class toggled by JS every ~3s for the eye-blink frame swap */
.blink img {
  animation: blink-flash 0.18s steps(1);
}

@keyframes blink-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ===== About ===== */
.about {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  padding: 4rem 6%;
  background: linear-gradient(180deg, var(--purple) 0%, var(--bg-darker) 100%);
}

.about-pic img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: transparent;
}

.greeting {
  font-size: 2rem;
  font-weight: 700;
}

.highlight {
  color: var(--pink-light);
}

.role {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.about-text h3 {
  margin-bottom: 0.5rem;
  color: var(--pink-light);
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  max-width: 60ch;
}

/* ===== Section titles ===== */
.section-title {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  text-align: center;
  padding-top: 3rem;
  text-shadow: 0 0 16px rgba(255, 168, 224, 0.7);
}

.sub-section-title {
  color: var(--pink-light);
  font-size: 1.2rem;
  margin: 2.5rem 6% 1rem;
}

/* ===== Projects ===== */
.projects {
  position: relative;
  z-index: 1;
  background: var(--bg-darker);
  padding-bottom: 3rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 1.5rem 6%;
}

.project-card.reverse {
  direction: rtl;
}
.project-card.reverse > * {
  direction: ltr;
}

.project-card img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
}

.project-info h4 {
  color: var(--text-light);
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.6rem;
  max-width: 55ch;
}

.tech {
  font-style: italic;
  opacity: 0.8;
}

/* ===== Graphic design ===== */
.graphic-design {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, var(--bg-darker) 0%, var(--purple) 100%);
  padding-bottom: 4rem;
}

.design-group {
  padding: 1rem 6%;
}

.design-group h4 {
  color: var(--pink-light);
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.8rem;
}

.design-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.design-grid img:hover {
  transform: scale(1.04);
  box-shadow: var(--accent-glow);
}

/* ===== Contact ===== */
.contact {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 6%;
  background: var(--bg-darker);
}

.contact p {
  color: var(--text-muted);
  margin: 1rem 0 1.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-links a {
  background: var(--purple-light);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.2s ease;
}

.contact-links a:hover {
  background: var(--pink);
  box-shadow: var(--accent-glow);
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  background: var(--bg-darker);
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .about,
  .project-card,
  .project-card.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .hero-character {
    position: static;
    width: 100%;
    max-width: 560px;
    margin: 2rem auto 0;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  #navbar ul {
    gap: 1.2rem;
    font-size: 0.85rem;
  }
}