/* ===== Theme Variables ===== */
:root {
  --bg: #0e0f12;
  --text: #e9eef2;
  --muted: #a3b0bb;

  /* luxe cherry gradient */
  --grad-1: #180605;
  --grad-2: #710A14;
  --grad-3: #8F3C45;

  --accent: #B18582;     /* dusty rose */
  --accent-2: #8F3C45;   /* rustic red */

  --card: #14161a;
  --border: #2a2e35;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* ===== Reset / Base ===== */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 16px/1.6 "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 120% -10%, rgba(143,60,69,.25), transparent 60%),
    radial-gradient(900px 400px at -20% 20%, rgba(24,6,5,.35), transparent 60%),
    linear-gradient(180deg, #0b0c0f, #0e0f12);
}

/* ===== Header / Navbar ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px min(8vw, 80px);
  background: linear-gradient(90deg, var(--grad-1), var(--grad-2), var(--grad-3));
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  backdrop-filter: saturate(150%) blur(8px);
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
}
.logo span {
  color: var(--accent);
}
.menu-btn {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.menu-line {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
}
.navbar {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.nav-link {
  color: #fff;
  opacity: .9;
  position: relative;
  padding: .35rem .15rem;
  text-decoration: none;
  transition: 0.3s ease;
}
.nav-link:hover {
  opacity: 1;
}
.nav-link.active::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #fff);
  border-radius: 2px;
}
.btn {
  border-radius: 10px;
  padding: .65rem 1rem;
  font-weight: 600;
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .3s ease, background .3s ease, color .3s ease;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: #0f0f10;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  color: #000;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: #fff;
}

/* ===== Sections ===== */
.section {
  padding: clamp(72px, 12vw, 120px) min(8vw, 80px);
}
.section-title {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.25rem);
  margin: 0 0 24px;
  color: #fff;
}

/* ===== Home ===== */
.home {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.home .eyebrow {
  color: var(--accent);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
}
.home h1 {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  margin: .25rem 0 .25rem;
}
.home .lead {
  color: var(--muted);
  max-width: 60ch;
}
.img-box {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 10px rgba(113, 10, 20, 0.4);
}
.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== About ===== */
.about {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.about-img img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.stat {
  background: linear-gradient(180deg, #121419, #0f1115);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.stat-label {
  color: var(--muted);
  font-size: .9rem;
}

/* ===== Projects ===== */
.projects .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}
.card-media {
  aspect-ratio: 60/10;
  background-size: cover;
  background-position: left;
  filter: saturate(.95) contrast(1.05);
  transition: transform .4s ease, filter .3s ease;
}
.card-body {
  padding: 16px 16px 18px;
}
.card h3 {
  margin: 0 0 6px;
  color: #fff;
}
.card p {
  margin: 0 0 10px;
  color: var(--muted);
}
.card-link {
  color: var(--accent);
}
.card:hover .card-media {
  transform: scale(1.05);
  filter: saturate(1.05);
}

/* ===== Certificates ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cert-card {
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}

.cert-card:hover {
  transform: translateY(-6px);
}

.cert-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #0f1115;
}

.cert-info {
  padding: 10px 10px 40px;
  text-align: center;
}

.cert-info h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 1.05rem;
}

.cert-info .meta {
  font-size: .9rem;
  color: var(--muted);
}

/* ===== Contact ===== */
.contact-form {
  max-width: 860px;
  margin-inline: auto;
  display: grid;
  gap: 14px;
}
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
input, textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f1216;
  color: var(--text);
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(177, 133, 130, .15);
}

/* ===== Footer ===== */
.footer {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

/* ===== Back to Top ===== */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #0f0f10;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
  font-size: 1.15rem;
  font-weight: 800;
}
.to-top.show {
  display: grid;
  place-items: center;
}

/* ===== Animations / Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.typing::after {
  content: "";
  display: inline-block;
  width: 1ch;
  margin-left: 2px;
  height: 1.1em;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .projects .grid { grid-template-columns: repeat(2, 1fr); }
  .about, .home { grid-template-columns: 1fr; text-align: center; }
  .img-box { order: -1; margin-inline: auto; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .menu-btn { display: block; }
  .navbar {
    position: fixed;
    inset: 64px 0 auto 0;
    background: #111318;
    border-top: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform .35s ease;
    padding: 14px min(8vw, 80px);
    display: grid;
    gap: 10px;
  }
  .navbar.open { transform: translateY(0); }
  .projects .grid { grid-template-columns: 1fr; }
  .input-row { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .cert-grid { grid-template-columns: 1fr; }
}

/* ===== Neon Red Glow Effects ===== */

.card,
.cert-card,
.stat,
.contact-form,
.img-box,
.about-img img,
input,
textarea {
  border-color: rgba(255, 30, 50, 0.65);
  box-shadow:
    0 0 5px rgba(255, 30, 50, 0.35),
    0 0 15px rgba(255, 30, 50, 0.15);
}

/* Neon hover effect for cards */
.card:hover,
.cert-card:hover,
.stat:hover {
  border-color: #ff1e32;
  box-shadow:
    0 0 8px rgba(255, 30, 50, 0.8),
    0 0 20px rgba(255, 30, 50, 0.55),
    0 0 40px rgba(255, 30, 50, 0.25);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

/* Hover effect for the profile image */
.img-box:hover {
  border-color: #ff1e32;
  box-shadow:
    0 0 10px rgba(255, 30, 50, 0.9),
    0 0 25px rgba(255, 30, 50, 0.6),
    0 0 50px rgba(255, 30, 50, 0.3);
}

/* Input glow when selected */
input:focus,
textarea:focus {
  border-color: #ff1e32;
  box-shadow:
    0 0 8px rgba(255, 30, 50, 0.8),
    0 0 18px rgba(255, 30, 50, 0.35);
}

/* Contact form hover */
.contact-form:hover {
  border-color: rgba(255, 30, 50, 0.9);
  box-shadow:
    0 0 10px rgba(255, 30, 50, 0.45),
    0 0 30px rgba(255, 30, 50, 0.2);
}

/* Buttons glow on hover */
.btn-primary:hover {
  box-shadow:
    0 0 8px rgba(255, 30, 50, 0.8),
    0 0 20px rgba(255, 30, 50, 0.5);
}

.btn-ghost:hover {
  border-color: #ff1e32;
  box-shadow:
    0 0 8px rgba(255, 30, 50, 0.7),
    0 0 18px rgba(255, 30, 50, 0.3);
}