* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --text: #ffffff;
  --muted: #e5e7eb;
  --card: #0f172a;
  --card-soft: #111827;
  --primary: #ffffff;
  --primary-dark: #e5e7eb;
  --secondary: #ffffff;
  --border: #1e293b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 16px 40px rgba(255, 255, 255, 0.08);
}

body.dark {
  --bg: #f8fbff;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --card-soft: #eef4ff;
  --primary: #0f172a;
  --primary-dark: #1e293b;
  --secondary: #0f172a;
  --border: #dbe7ff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 16px 40px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 25%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.03), transparent 25%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
}

section {
  scroll-margin-top: 110px;
}

.container {
  width: 90%;
  max-width: 1150px;
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

body.dark .header {
  background: rgba(248, 251, 255, 0.9);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  gap: 20px;
  position: relative;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo {
  font-size: 2.2rem;
  color: #ffffff;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
}

.role {
  margin-top: 4px;
  font-size: 1rem;
  color: #ffffff;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-links a:hover {
  opacity: 0.75;
}

.theme-btn,
.menu-toggle {
  border: none;
  background: linear-gradient(135deg, #ffffff, #e5e7eb);
  color: #020617;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

.theme-btn:hover,
.menu-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.menu-toggle {
  display: none;
}

/* =========================
   HERO
========================= */

.hero {
  padding: 90px 0 70px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 50px;
  align-items: center;
}

.hero-text h2 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -1px;
  color: #ffffff;
}

.hero-text h2 span {
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-text p {
  margin-bottom: 16px;
  font-size: 1.08rem;
  color: #ffffff;
  max-width: 700px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 320px;
  border-radius: 24px;
  border: 4px solid var(--border);
  box-shadow: var(--shadow-hover);
  background: var(--card);
}

/* =========================
   BUTTONS
========================= */

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.25s ease;
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, #ffffff, #e5e7eb);
  color: #020617;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn.secondary {
  background: var(--card);
  color: #ffffff;
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* =========================
   SECTIONS
========================= */

.section {
  padding: 80px 0;
}

.alt-bg {
  background: linear-gradient(to bottom, var(--card-soft), var(--bg));
}

.section-title {
  font-size: 2.4rem;
  margin-bottom: 24px;
  color: #ffffff;
  letter-spacing: -0.7px;
}

/* =========================
   GRIDS
========================= */

.skills-grid,
.projects-grid,
.certifications-grid,
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

/* =========================
   CARDS
========================= */

.skill-card,
.project-card,
.cert-card,
.feedback-card,
.contact-box {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

.skill-card:hover,
.project-card:hover,
.cert-card:hover,
.feedback-card:hover,
.contact-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.skill-card h3,
.project-card h3,
.cert-card h3,
.feedback-card h3 {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 1.15rem;
}

.skill-card p,
.project-card p,
.cert-card p,
.feedback-card p,
.contact-box p {
  color: #ffffff;
}

.project-card p {
  margin-bottom: 12px;
}

.project-card a,
.cert-card a,
.contact-box a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.project-card a:hover,
.cert-card a:hover,
.contact-box a:hover {
  text-decoration: underline;
}

/* =========================
   PROJECTS
========================= */

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

#projectSearch {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 300px;
  max-width: 100%;
  background: var(--card);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
}

#projectSearch:focus {
  border-color: #ffffff;
}

/* =========================
   FORMS / FEEDBACK
========================= */

.feedback-intro {
  max-width: 850px;
  color: #ffffff;
  margin-bottom: 18px;
}

.comment-form {
  margin: 24px 0 34px;
}

.comment-form div {
  margin-bottom: 14px;
}

.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #ffffff;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  max-width: 760px;
  padding: 16px 18px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: #ffffff;
  outline: none;
  box-shadow: var(--shadow);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: #ffffff;
}

.comment-form textarea {
  min-height: 220px;
  resize: vertical;
}

#submitComment {
  background: linear-gradient(135deg, #ffffff, #e5e7eb);
  color: #020617;
  border: none;
  padding: 16px 26px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

#submitComment:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* =========================
   CONTACT
========================= */

.contact-box {
  max-width: 760px;
}

.contact-box p {
  margin-bottom: 14px;
}

/* =========================
   ADMIN
========================= */

.admin-main {
  padding-top: 32px;
  padding-bottom: 40px;
}

.admin-container {
  max-width: 900px;
}

.admin-header-block {
  margin-bottom: 20px;
}

.admin-form-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-section {
  padding: 18px 16px;
  border-radius: 16px;
  margin-bottom: 0;
}

.admin-section .section-title {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.admin-actions {
  margin-top: 12px;
}

.admin-feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-feedback-header .section-title {
  margin-bottom: 0;
}

.admin-feedback-container {
  margin-top: 14px;
}

.admin-badge {
  pointer-events: none;
}

.admin-message {
  margin-top: 14px;
  font-weight: 700;
}

.admin-submit-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.admin-item {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 14px;
}

.admin-field {
  margin-bottom: 10px;
}

.admin-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.admin-item input,
.admin-item textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: #ffffff;
  outline: none;
  font-size: 0.95rem;
}

.admin-item textarea {
  min-height: 90px;
  resize: vertical;
}

.admin-page .section-title {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.admin-page .section {
  padding: 40px 0;
}

.admin-page .project-card,
.admin-page .admin-item {
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.admin-page .admin-field label {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.admin-page .admin-item input,
.admin-page .admin-item textarea {
  padding: 10px 12px;
  font-size: 0.95rem;
}

.admin-page .btn {
  padding: 10px 16px;
  font-size: 0.92rem;
}

.admin-page .feedback-intro {
  font-size: 0.95rem;
}

.admin-page #feedbackBadge {
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* =========================
   FOOTER
========================= */

.footer {
  text-align: center;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: #ffffff;
  margin-top: 10px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-text h2 {
    font-size: 2.2rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: var(--card);
    position: absolute;
    top: 78px;
    right: 5%;
    width: 240px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-hover);
    z-index: 1001;
  }

  .nav-links.show {
    display: flex;
  }

  .section-title {
    font-size: 2rem;
  }

  .logo {
    font-size: 1.8rem;
  }

  .role {
    font-size: 0.95rem;
  }

  .admin-container {
    max-width: 100%;
  }

  .admin-section {
    padding: 14px 12px;
  }

  .admin-item {
    padding: 12px;
  }

  .admin-item input,
  .admin-item textarea {
    font-size: 0.92rem;
    padding: 9px 10px;
  }
}