@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  --background: 0 0% 4%;
  --foreground: 0 0% 95%;
  --card: 0 0% 7%;
  --card-foreground: 0 0% 95%;
  --primary: 0 85% 50%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 12%;
  --secondary-foreground: 0 0% 95%;
  --muted: 0 0% 12%;
  --muted-foreground: 0 0% 55%;
  --accent: 0 70% 45%;
  --accent-foreground: 0 0% 100%;
  --border: 0 0% 15%;
  --radius: 0.75rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: hsl(0 85% 50% / 0.3);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: hsl(0 0% 4%); }
::-webkit-scrollbar-thumb { background: hsl(0 85% 50% / 0.4); border-radius: 3px; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

.text-gradient-red {
  background-image: linear-gradient(135deg, hsl(0 85% 55%), hsl(15 90% 55%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-red {
  box-shadow: 0 0 30px -5px hsl(0 85% 50% / 0.3), 0 0 60px -10px hsl(0 85% 50% / 0.15);
}

.glow-red-sm {
  box-shadow: 0 0 15px -3px hsl(0 85% 50% / 0.25);
}

.glass-card {
  background: hsl(var(--card) / 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid hsl(var(--border));
}

.noise-bg {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid hsl(var(--border));
  animation: slideDown 0.6s ease-out;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.navbar-logo {
  font-size: 1.25rem;
  font-weight: 700;
}

.navbar-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.3s;
}

.navbar-links a:hover { color: hsl(var(--primary)); }

.navbar-social a {
  color: hsl(var(--muted-foreground));
  transition: color 0.3s;
}
.navbar-social a:hover { color: hsl(var(--primary)); }

/* Mobile menu */
.mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: hsl(var(--foreground));
  transition: 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: hsl(var(--background) / 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid hsl(var(--border));
  padding: 1.5rem;
  z-index: 49;
}
.mobile-menu.active { display: flex; flex-direction: column; gap: 1rem; }
.mobile-menu a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 0;
  transition: color 0.3s;
}
.mobile-menu a:hover { color: hsl(var(--primary)); }

@media (min-width: 768px) {
  .navbar-links { display: flex; }
  .mobile-toggle { display: none; }
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.3;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, hsl(var(--background) / 0.5), hsl(var(--background) / 0.8), hsl(var(--background)));
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  padding-top: 5rem;
}

.hero-text {
  text-align: center;
  animation: fadeInLeft 0.8s ease-out 0.3s both;
}

.hero-text .subtitle {
  color: hsl(var(--primary));
  font-size: 0.875rem;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-text h1 .role {
  display: block;
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  font-weight: 300;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
}

.hero-text p {
  color: hsl(var(--muted-foreground));
  font-size: 1.125rem;
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: var(--radius);
  font-weight: 500;
  transition: opacity 0.3s;
}
.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: 1px solid hsl(var(--primary) / 0.3);
  color: hsl(var(--primary));
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.3s;
}
.btn-outline:hover { background: hsl(var(--primary) / 0.1); }

.hero-image {
  flex-shrink: 0;
  animation: fadeInScale 0.8s ease-out 0.5s both;
}

.hero-image-wrapper {
  position: relative;
  width: 16rem; height: 16rem;
}

.hero-image-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.2);
  filter: blur(48px);
  animation: pulseGlow 3s ease-in-out infinite;
}

.hero-image-wrapper img {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid hsl(var(--primary) / 0.3);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: hsl(var(--primary) / 0.5);
  animation: bounce 2s infinite;
}

@media (min-width: 1024px) {
  .hero-content {
    flex-direction: row;
    padding-top: 5rem;
  }
  .hero-text {
    flex: 1;
    text-align: left;
  }
  .hero-text p { margin: 0 0 2rem; }
  .hero-buttons { justify-content: flex-start; }
  .hero-image-wrapper { width: 20rem; height: 20rem; }
}

/* ── SECTIONS ── */
.section { padding: 6rem 0; }
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-bar {
  width: 4rem; height: 0.25rem;
  background: hsl(var(--primary));
  border-radius: 2px;
  margin-bottom: 2.5rem;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  gap: 3rem;
}
.about-text {
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
}
.about-text p + p { margin-top: 1rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.3s;
}
.stat-card:hover { border-color: hsl(var(--primary) / 0.3); }
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--primary));
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

.skill-card {
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.3s;
}
.skill-card:hover { border-color: hsl(var(--primary) / 0.3); }

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.skill-name { font-weight: 500; font-size: 0.875rem; }
.skill-percent { color: hsl(var(--primary)); font-size: 0.875rem; }

.skill-bar {
  height: 0.5rem;
  background: hsl(var(--secondary));
  border-radius: 9999px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(to right, hsl(var(--accent)), hsl(var(--primary)));
  width: 0;
  transition: width 1.2s ease-out;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
}

.project-card {
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.5s;
}
.project-card:hover {
  border-color: hsl(var(--primary) / 0.3);
  box-shadow: 0 0 15px -3px hsl(0 85% 50% / 0.25);
}
.project-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  transition: color 0.3s;
}
.project-card:hover h3 { color: hsl(var(--primary)); }
.project-card p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 9999px;
  border: 1px solid hsl(var(--primary) / 0.2);
}

/* ── CONTACT ── */
.contact-wrapper {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}
.contact-wrapper .section-bar { margin-left: auto; margin-right: auto; }
.contact-wrapper p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1.125rem;
  transition: opacity 0.3s;
}
.btn-contact:hover { opacity: 0.9; }

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.social-icon {
  width: 3rem; height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
  transition: all 0.3s;
}
.social-icon:hover {
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.3);
}
.social-icon svg { width: 20px; height: 20px; }

/* ── FOOTER ── */
.footer {
  border-top: 1px solid hsl(var(--border));
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.footer span { color: hsl(var(--primary)); }

/* ── ANIMATIONS ── */
@keyframes slideDown {
  from { transform: translateY(-80px); }
  to { transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
