*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a1a;
  --text: #e8e8f8;
  --muted: #8888aa;
  --accent1: #a78bfa;   /* violet */
  --accent2: #38bdf8;   /* sky blue */
  --accent3: #f472b6;   /* pink */
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover: rgba(255, 255, 255, 0.09);
  --font-display: 'DM Serif Display', serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── ANIMATED GRADIENT BACKGROUND ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(167,139,250,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(244,114,182,0.15) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 60% 40%, rgba(56,189,248,0.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: bgShift 12s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0.8; transform: scale(1.05); }
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── BLOBS ── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.blob-1 { width: 700px; height: 700px; background: var(--accent1); top: -250px; right: -200px; animation-delay: 0s; }
.blob-2 { width: 500px; height: 500px; background: var(--accent3); bottom: -100px; left: -150px; animation-delay: 3s; }
.blob-3 { width: 400px; height: 400px; background: var(--accent2); top: 40%; left: 35%; animation-delay: 6s; }

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -30px) scale(1.08); }
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(10, 10, 26, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent1);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--muted); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

/* ── SECTIONS GENERAL ── */
section {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent2);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

h1.hero-name {
  font-size: clamp(3.5rem, 9vw, 7rem);
  color: var(--white);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}

h1.hero-name .accent {
  background: linear-gradient(135deg, var(--accent1), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}

.hero-title strong { color: var(--accent2); font-weight: 600; }

.hero-desc {
  max-width: 520px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 1s forwards;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent1), var(--accent3));
  color: #fff;
  box-shadow: 0 4px 20px rgba(167,139,250,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(167,139,250,0.45);
}

.btn-outline {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-outline:hover {
  background: var(--glass-hover);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* ── SOCIAL ROW ── */
.social-row {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.25s;
}
.social-link:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
  background: var(--glass-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.social-link svg { width: 16px; height: 16px; }

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ── ABOUT ── */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

#about h2 { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--white); margin-bottom: 1.5rem; }
#about p { color: var(--muted); margin-bottom: 1rem; line-height: 1.9; }

.skills-col h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  margin-top: 2rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.skill-tag {
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid;
  transition: all 0.2s;
}
.skill-tag:hover { transform: translateY(-1px); }

.tag-java  { color: var(--accent1); border-color: rgba(167,139,250,0.35); background: rgba(167,139,250,0.08); }
.tag-react { color: var(--accent2); border-color: rgba(56,189,248,0.35);  background: rgba(56,189,248,0.08);  }
.tag-misc  { color: var(--accent3); border-color: rgba(244,114,182,0.35); background: rgba(244,114,182,0.08); }

/* ── PROJECTS ── */
#projects h2 { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--white); margin-bottom: 0.75rem; }
#projects > .section-desc { color: var(--muted); margin-bottom: 3rem; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.75rem;
  text-decoration: none;
  display: block;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: scaleX(0);
  transition: transform 0.4s;
  transform-origin: left;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(167,139,250,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover {
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover::after  { opacity: 1; }

.project-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid var(--glass-border);
}

.project-link-hint {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  color: rgba(255,255,255,0.15);
  transition: color 0.2s;
  z-index: 1;
}
.project-card:hover .project-link-hint { color: var(--accent1); }

/* ── CONTACT ── */
#contact { text-align: center; }
#contact h2 { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--white); margin-bottom: 1rem; }
#contact p  { color: var(--muted); max-width: 480px; margin: 0 auto 2.5rem; }

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
footer span { color: var(--accent1); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  #about .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .social-row { flex-wrap: wrap; }
}