/* ================= ROOT VARIABLES & RESET ================= */
:root {
  --bg-dark: #160b10;
  --bg-card: rgba(39, 16, 24, 0.76);
  --bg-card-hover: rgba(62, 22, 35, 0.88);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(229, 43, 80, 0.55);
  --primary: #e52b50;
  --primary-gradient: linear-gradient(135deg, #9f2b68 0%, #e52b50 52%, #f19cbb 100%);
  --accent-cyan: #ff9db8;
  --text-main: #fff5f7;
  --text-muted: #c9a5ae;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Fira Code', monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

body.motion-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

body.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.motion-ready .hero-text,
body.motion-ready .code-card {
  animation: hero-enter 0.75s ease both;
}

body.motion-ready .code-card {
  animation-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ambient Background Glows */
.glow-bg {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
}
.glow-1 { top: -100px; left: -100px; background: #9f2b68; }
.glow-2 { top: 50%; right: -150px; background: #e52b50; }
.glow-3 { bottom: -100px; left: 30%; background: #f19cbb; }

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: inline-block;
  position: relative;
}

.section-title h2 .gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title p {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 1.05rem;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(229, 43, 80, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(229, 43, 80, 0.5);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ================= NAVBAR ================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 14px 0;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.nav-logo span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
    background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ================= HERO SECTION ================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: center;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(229, 43, 80, 0.12);
  border: 1px solid rgba(229, 43, 80, 0.3);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffc2d0;
  margin-bottom: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
}

.hero-text h1 {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-text .dynamic-role {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  display: block;
  margin-bottom: 20px;
  min-height: 34px;
}

.hero-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-socials {
  display: flex;
  gap: 16px;
  margin-top: 36px;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-icon:hover {
  color: #fff;
  background: rgba(229, 43, 80, 0.2);
  border-color: var(--primary);
  transform: translateY(-3px);
}

/* Hero Code Card */
.code-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  position: relative;
}

.code-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.code-content {
  font-size: 0.9rem;
  line-height: 1.7;
}
.code-key { color: #ff9db8; }
.code-val { color: #f19cbb; }
.code-str { color: #ffd7e0; }
.code-comment { color: #64748b; }

/* ================= ABOUT SECTION ================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
  backdrop-filter: blur(10px);
}

.about-card p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.highlight-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}

.highlight-box:hover {
  border-color: var(--border-glow);
  background: rgba(229, 43, 80, 0.05);
  transform: translateY(-3px);
}

.highlight-box h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.highlight-box span {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ================= SKILLS SECTION ================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.skill-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-5px);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.skill-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(229, 43, 80, 0.1);
  border: 1px solid rgba(229, 43, 80, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.3rem;
}

.skill-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-badge {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.skill-badge:hover {
  background: rgba(229, 43, 80, 0.15);
  color: #fff;
  border-color: var(--primary);
}

/* ================= PROJECTS SECTION ================= */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.project-header-bar {
  height: 6px;
  background: var(--primary-gradient);
}

.project-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 8px;
}

.project-body h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tech-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 3px 10px;
  background: rgba(229, 43, 80, 0.1);
  color: #ffd7e0;
  border-radius: 6px;
  border: 1px solid rgba(229, 43, 80, 0.2);
}

.project-links {
  display: flex;
  gap: 16px;
}

.project-link {
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: var(--transition);
}

.project-link:hover {
  color: var(--primary);
}

/* ================= TIMELINE / EDUCATION SECTION ================= */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--border-color);
  top: 0;
  bottom: 0;
  left: 20px;
}

.timeline-item {
  position: relative;
  padding-left: 55px;
  margin-bottom: 40px;
}

.timeline-dot {
  position: absolute;
  left: 13px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-dark);
  z-index: 1;
  box-shadow: 0 0 10px var(--primary);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-glow);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
  display: block;
}

.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ================= CONTACT SECTION ================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: flex-start;
}

.contact-info {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
}

.contact-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 1rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(229, 43, 80, 0.1);
  border: 1px solid rgba(229, 43, 80, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
}

.contact-item h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-item a,
.contact-item span {
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--primary);
}

/* Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(229, 43, 80, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

/* ================= FOOTER ================= */
footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer p {
  margin-bottom: 10px;
}

/* ================= TOAST NOTIFICATION ================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: 2000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: #b4233b;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-text h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: #0f1422;
    flex-direction: column;
    justify-content: center;
    transition: 0.4s ease;
    border-left: 1px solid var(--border-color);
  }
  .nav-links.active {
    right: 0;
  }
  .nav-toggle {
    display: block;
    z-index: 1001;
  }
  .hero-text h1 {
    font-size: 2.3rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
