/* ---------------------------
   Base  
---------------------------- */

:root {
  --bg: #ffffff;
  --text: #101828;
  --muted: #667085;
  --card: #f8fafc;
  --border: #e4e7ec;
  --shadow: 0 10px 25px rgba(16, 24, 40, 0.08);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);

  --radius: 18px;
  --container: 1100px;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #9aa4b2;
  --card: #111b2f;
  --border: #22304d;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.14);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

#galaxy-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: transparent;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ---------------------------
   Helpers
---------------------------- */
.container {
  width: min(var(--container), 92%);
  margin: 0 auto;
}

.section {
  padding: 50px 0;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--muted);
  margin-top: 6px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.accent {
  color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* ---------------------------
   Buttons
---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 11px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  user-select: none;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.btn.outline {
  background: transparent;
  color: var(--text);
}

.btn.small {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

/* ---------------------------
   Header / Nav
---------------------------- */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

[data-theme="dark"] .header {
  background: rgba(11, 18, 32, 0.65);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-icon {
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: rgb(255, 255, 255);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 0 0 2px #FFD700;
  transition: transform 0.5s ease;
}

.profile-icon:hover {
  animation: rotateOnce 0.5s ease;
}

@keyframes rotateOnce {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__link {
  color: var(--muted);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  transition: 0.2s;
}

.nav__link:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 9px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.admin-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-soft);
}

.admin-btn__text {
  font-size: 0.9rem;
}

.theme-toggle-circular {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text);
}

.theme-toggle-circular:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: rotate(15deg);
  box-shadow: 0 4px 12px var(--shadow);
}

.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

/* ---------------------------
   Hero
---------------------------- */
.hero {
  padding: 60px 0 30px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.hero__title {
  font-size: 2.6rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero__subtitle {
  margin-top: 12px;
  color: var(--muted);
  max-width: 52ch;
}

.hero__cta {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__meta {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.meta-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: transparent;
}

.meta-title {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.meta-value {
  margin-top: 4px;
  font-weight: 800;
}

.profile-card {
  display: flex;
  gap: 14px;
  align-items: center;
}

.profile-img {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    overflow 0s 0.4s;
  position: relative;
  z-index: 1;
}

.profile-img:hover {
  overflow: visible;
  transform: scale(1.15);
  z-index: 10;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    overflow 0s 0s;
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.profile-img:hover img {
  transform: scale(1.08);
}

.profile-img:hover .profile-placeholder {
  display: none;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent);
}

.profile-info h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.profile-info p {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.profile-links {
  margin-top: 6px;
  display: flex;
  gap: 12px;
}

.profile-links a {
  font-weight: 700;
  color: var(--accent);
}

.note-card {
  margin-top: 14px;
}

.note-card h4 {
  margin-bottom: 8px;
}

.note-card ul {
  padding-left: 18px;
  color: var(--muted);
}

.card p {
  text-align: justify;
}



/* ---------------------------
   Skills
---------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

#skills {
  padding-bottom: 0;
}

.certifications-section {
  width: 100%;
  padding: 50px 0 0;
}

.projects-section {
  width: 100%;
  padding: 50px 0;
}

.certifications-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px 0;
}

.cert-card {
  position: relative;
  flex: 1 1 240px;
  max-width: 300px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.4s ease;
  cursor: pointer;
}

.cert-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert-title {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 14px;
}

.certifications-container:hover .cert-card {
  transform: scale(0.9);
  opacity: 0.6;
}

.certifications-container .cert-card:hover {
  transform: scale(1.15);
  opacity: 1;
  z-index: 2;
}

/* Certificate Modal */
.cert-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.cert-modal-content {
  display: block;
  margin: 60px auto 0;
  max-width: 900px;
  width: 90%;
  max-height: 80vh;
  object-fit: contain;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
}

.cert-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}



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

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-done {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.status-done::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-green 2s infinite;
}

.status-process {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.status-process::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: pulse-orange 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-orange {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.project-desc {
  margin-top: 8px;
  color: var(--muted);
}

.project-tech {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.project-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------------------------
   Resume
---------------------------- */
.resume-section {
  width: 100%;
  padding: 50px 0;
}

.resume-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 20px;
}

.resume-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------------------------
   Contact
----------------------------- */
.contact-section {
  width: 100%;
  padding: 50px 0;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: 0.25s ease;
}

.contact-icon:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow);
}

.icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}


/* ---------------------------
   Forms
---------------------------- */
.form {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  gap: 6px;
}

label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
textarea {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  outline: none;
  width: 100%;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------------------------
   Footer
---------------------------- */
.footer {
  padding: 22px 0 40px 0;
  text-align: center;
}

/* ---------------------------
   Responsive — Tablet / Small Laptop (≤ 900px)
---------------------------- */
@media (max-width: 900px) {

  /* — Nav toggle — */
  .nav__toggle {
    display: block;
    font-size: 1.3rem;
  }

  .nav__links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 5%;
    gap: 6px;
    box-shadow: var(--shadow);
  }

  .nav__links.show {
    display: flex;
  }

  .nav {
    position: relative;
  }

  /* — Hero — */
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__meta {
    grid-template-columns: 1fr 1fr;
  }

  /* — Grids — */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* — Sections — */
  .section {
    padding: 36px 0;
  }

  .projects-section,
  .contact-section,
  .resume-section,
  .certifications-section {
    padding: 36px 0;
  }

  /* — Cert cards — */
  .cert-card {
    flex: 1 1 200px;
    max-width: 100%;
  }

  .certifications-container:hover .cert-card {
    transform: none;
    opacity: 1;
  }

  .certifications-container .cert-card:hover {
    transform: scale(1.03);
  }
}

/* ---------------------------
   Responsive — Mobile (≤ 600px)
---------------------------- */
@media (max-width: 600px) {

  /* — Typography — */
  .hero__title {
    font-size: 1.8rem;
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .section-head h2 {
    font-size: 1.4rem;
  }

  /* — Hero — */
  .hero {
    padding: 30px 0 20px;
  }

  .hero__meta {
    grid-template-columns: 1fr;
  }

  /* — Grids — */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* — Sections — */
  .section {
    padding: 28px 0;
  }

  .projects-section,
  .contact-section,
  .resume-section,
  .certifications-section {
    padding: 28px 0;
  }

  /* — Cert cards — */
  .cert-card {
    flex: 1 1 100%;
    max-width: 100%;
    height: 160px;
  }

  /* — Cert modal — */
  .cert-modal-content {
    width: 95%;
    margin-top: 20px;
    max-height: 85vh;
  }

  .cert-close {
    top: 10px;
    right: 16px;
    font-size: 32px;
  }

  /* — Buttons — */
  .btn {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .btn.small {
    padding: 7px 9px;
    font-size: 0.85rem;
  }

  /* — Profile card — */
  .profile-card {
    flex-direction: column;
    text-align: center;
  }

  /* — Contact icons — */
  .contact-links {
    justify-content: center;
  }

  /* — Footer — */
  .footer {
    padding: 16px 0 30px;
  }
}