/* =====================================================
   PORTFOLIO WEBSITE
   Author : Kholifah Nur Asyikha
   Version : 2.0
===================================================== */

/* =====================================================
   GOOGLE FONT
===================================================== */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap");

/* =====================================================
   RESET
===================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  background: #ffffff;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button,
input,
textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
}

section {
  padding: 110px 0;
  scroll-margin-top: 95px;
}

/* =====================================================
   VARIABLES
===================================================== */

:root {
  --primary: #1a2744;
  --secondary: #2f436a;

  --gold: #c9a84c;
  --gold-light: #e8d48b;

  --white: #ffffff;
  --light: #f8f9fc;
  --gray: #6b7280;
  --text: #444444;

  --border: #ececec;

  --radius: 18px;

  --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);

  --shadow: 0 15px 40px rgba(0, 0, 0, 0.08);

  --transition: 0.35s ease;
}

/* =====================================================
   GLOBAL
===================================================== */

.container {
  width: min(92%, 1200px);
  margin: auto;
}

.section-title {
  text-align: center;
  margin-bottom: 70px;
}

.section-title p {
  color: var(--gold);

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 3px;

  font-size: 14px;

  margin-bottom: 12px;
}

.section-title h2 {
  font-size: clamp(32px, 5vw, 48px);

  color: var(--primary);

  font-family: "Playfair Display", serif;

  line-height: 1.2;
}

.section {
  position: relative;
}

/* =====================================================
   BUTTON
===================================================== */

.btn-primary {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 16px 38px;

  background: var(--primary);

  color: #fff;

  border-radius: 50px;

  font-weight: 700;

  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-4px);

  background: var(--secondary);

  box-shadow: var(--shadow);
}

.btn-secondary {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 16px 38px;

  border-radius: 50px;

  border: 2px solid var(--primary);

  color: var(--primary);

  font-weight: 700;

  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--primary);

  color: #fff;
}

/* =====================================================
   HEADER
===================================================== */

header {
  position: fixed;

  top: 0;

  left: 0;

  width: 100%;

  z-index: 9999;

  transition: 0.35s;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.94);

  backdrop-filter: blur(14px);

  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
}

.navbar {
  height: 85px;
}

.navbar .container {
  display: flex;

  justify-content: space-between;

  align-items: center;

  height: 100%;
}

.navbar-right {
  display: flex;

  align-items: center;
}

.logo {
  font-size: 34px;

  font-weight: 700;

  color: var(--primary);

  font-family: "Playfair Display", serif;
}

.logo span {
  color: var(--gold);
}

.nav-menu {
  display: flex;

  align-items: center;

  gap: 35px;
}

.nav-menu a {
  position: relative;

  font-weight: 600;

  color: var(--primary);

  transition: var(--transition);
}

.nav-menu a::after {
  content: "";

  position: absolute;

  left: 0;

  bottom: -8px;

  width: 0;

  height: 2px;

  background: var(--gold);

  transition: 0.35s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--gold);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* ==========================
   MOBILE MENU
========================== */

.menu-toggle {
  display: none;

  width: 35px;

  cursor: pointer;
}

.menu-toggle span {
  display: block;

  height: 3px;

  margin: 6px 0;

  background: var(--primary);

  transition: 0.3s;
}

/* =====================================================
   HERO
===================================================== */

.hero {
  min-height: 100vh;

  display: flex;

  align-items: center;

  background: #fff;

  overflow: hidden;
}

.hero-wrapper {
  display: grid;

  grid-template-columns: 430px 1fr;

  align-items: center;

  gap: 90px;
}

.hero-image {
  display: flex;

  justify-content: center;
}

.hero-image img {
  width: 420px;

  height: 420px;

  object-fit: cover;

  border-radius: 50%;

  border: 8px solid var(--gold);

  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

/* ==========================
   HERO CONTENT
========================== */

.hero-content {
  display: flex;

  flex-direction: column;

  gap: 14px;
}

.subtitle {
  color: var(--gold);

  font-weight: 700;

  font-size: 18px;
}

.hero-content h1 {
  font-size: clamp(46px, 6vw, 64px);

  font-family: "Playfair Display", serif;

  color: var(--primary);

  line-height: 1.1;
}

.hero-content h2 {
  font-size: 24px;

  font-weight: 600;

  color: var(--gold);
}

.hero-content p:not(.subtitle) {
  max-width: 620px;

  color: var(--gray);

  font-size: 17px;

  line-height: 1.9;

  margin-top: 8px;
}

.hero-button {
  display: flex;

  flex-wrap: wrap;

  gap: 18px;

  margin-top: 15px;
}

/* =====================================================
   TYPING EFFECT
===================================================== */

#typing-text {
  min-height: 32px;
}

#typing-text::after {
  content: "|";

  animation: blink 0.8s infinite;

  margin-left: 3px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* =====================================================
   HERO DECORATION
===================================================== */

.hero::before {
  content: "";

  position: absolute;

  right: -150px;

  top: -100px;

  width: 420px;

  height: 420px;

  border-radius: 50%;

  background: rgba(201, 168, 76, 0.08);

  z-index: -1;
}

.hero::after {
  content: "";

  position: absolute;

  left: -180px;

  bottom: -180px;

  width: 350px;

  height: 350px;

  border-radius: 50%;

  background: rgba(26, 39, 68, 0.05);

  z-index: -1;
}

/* =====================================================
   ABOUT SECTION
===================================================== */

.about {
  background: var(--white);
}

.about-wrapper {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 70px;
  align-items: center;
}

.about-image {
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 360px;
  height: 460px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.about-image img:hover {
  transform: translateY(-8px);
}

.about-content h3 {
  font-size: 34px;
  color: var(--primary);
  font-family: "Playfair Display", serif;
  margin-bottom: 22px;
}

.about-content p {
  color: var(--gray);
  margin-bottom: 18px;
  line-height: 1.9;
}

.about-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 35px;
}

.about-info div {
  background: var(--light);
  padding: 20px;
  border-radius: 16px;
  transition: var(--transition);
}

.about-info div:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.about-info strong {
  display: block;
  color: var(--primary);
  margin-bottom: 6px;
}

.about-info span {
  color: var(--gray);
}

/* =====================================================
   COUNTER
===================================================== */

.counter {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 35px;
}

.counter-item {
  text-align: center;
}

.counter-item h2 {
  font-size: clamp(38px, 5vw, 52px);
  color: var(--gold-light);
  margin-bottom: 10px;
}

.counter-item p {
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
}

/* =====================================================
   SKILLS
===================================================== */

.skills {
  background: var(--light);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.skill-card {
  background: white;
  padding: 28px;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.skill-card h3 {
  color: var(--primary);
  margin-bottom: 14px;
}

.progress {
  width: 100%;
  height: 10px;
  background: #ececec;
  border-radius: 30px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 30px;
}

.skill-card span {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  color: var(--gold);
}

/* =====================================================
   EXPERIENCE
===================================================== */

.experience {
  background: white;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: auto;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--gold);
}

.timeline-item {
  position: relative;
  margin-bottom: 55px;
}

.timeline-dot {
  position: absolute;
  left: -2px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  border: 5px solid white;
  box-shadow: var(--shadow-sm);
}

.timeline-content {
  background: white;
  padding: 28px;
  border-radius: 18px;
  margin-left: 40px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);

  /* tambahan */
  text-align: left;
}

.timeline-content:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

/* POSITION */
.experience-position {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 5px;
  font-weight: 700;
}

/* COMPANY */
.experience-company {
  color: var(--gray);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 15px;
}

/* DATE */
.timeline-date {
  display: inline-block;

  margin-bottom: 15px;

  font-size: 14px;

  font-weight: 700;

  color: var(--gold);

  /* hapus uppercase */
  text-transform: none;
}

/* DESCRIPTION */
.experience-description {
  color: var(--gray);

  line-height: 1.8;

  font-size: 16px;

  text-transform: none;
}

.timeline-content h3 {
  color: var(--primary);
}

.timeline-content h4 {
  color: var(--gray);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 992px) {
  .about-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .about-image {
    order: -1;
  }

  .about-image img {
    max-width: 320px;
    height: 400px;
  }

  .about-info {
    grid-template-columns: 1fr;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .timeline {
    padding-left: 20px;
  }

  .timeline-content {
    margin-left: 25px;
    padding: 22px;
  }
}

@media (max-width: 576px) {
  .counter-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-content h3 {
    font-size: 28px;
  }

  .timeline-dot {
    width: 18px;
    height: 18px;
  }
}

/* =====================================================
   CERTIFICATE SECTION
===================================================== */

.certificate {
  background: var(--light);
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.certificate-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.certificate-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.certificate-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.certificate-body {
  padding: 22px;
}

.certificate-body h3 {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 8px;
}

.certificate-body p {
  color: var(--gray);
  font-size: 15px;
}

/* =====================================================
   PORTFOLIO
===================================================== */

.portfolio {
  background: white;
}

.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 50px;
}

.portfolio-filter button {
  padding: 12px 24px;
  border-radius: 40px;
  background: var(--light);
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.portfolio-filter button.active,
.portfolio-filter button:hover {
  background: var(--primary);
  color: white;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.portfolio-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: 0.6s;
}

.portfolio-card:hover img {
  transform: scale(1.08);
}

.portfolio-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 39, 68, 0.95),
    rgba(26, 39, 68, 0.15)
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 35px;
  color: white;
  opacity: 0;
  transition: 0.4s;
}

.portfolio-card:hover .portfolio-content {
  opacity: 1;
}

.portfolio-content h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.portfolio-content p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
}

.portfolio-content a {
  display: inline-flex;
  width: fit-content;
  padding: 12px 26px;
  border-radius: 30px;
  background: var(--gold);
  color: white;
  font-weight: 600;
  transition: var(--transition);
}

.portfolio-content a:hover {
  background: white;
  color: var(--primary);
}

.featured-badge {
  display: inline-block;
  background: #ff8906;
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* =====================================================
   BLOG
===================================================== */

.blog {
  background: var(--light);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.blog-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.blog-content {
  padding: 24px;
}

.blog-category {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.blog-content h3 {
  color: var(--primary);
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 15px;
}

.blog-content p {
  color: var(--gray);
  margin-bottom: 22px;
  line-height: 1.8;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  transition: var(--transition);
}

.read-more:hover {
  color: var(--gold);
  transform: translateX(5px);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 992px) {
  .certificate-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .certificate-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-content {
    padding: 25px;
  }

  .portfolio-content h3 {
    font-size: 22px;
  }
}

@media (max-width: 576px) {
  .portfolio-filter {
    gap: 10px;
  }

  .portfolio-filter button {
    width: 100%;
  }
}

/* =====================================================
   CONTACT SECTION
===================================================== */

.contact {
  background: var(--light);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 50px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  background: var(--white);
  padding: 24px;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.contact-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.contact-item h3 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 18px;
}

.contact-item p {
  color: var(--gray);
  word-break: break-word;
}

/* ==========================
   CONTACT FORM
========================== */

.contact-form {
  background: var(--white);
  padding: 35px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  font-size: 15px;
  transition: var(--transition);
  resize: none;
  background: white;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.15);
}

.contact-form button {
  width: 100%;
  padding: 17px;
  background: var(--primary);
  color: white;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  transition: var(--transition);
}

.contact-form button:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

.alert {
  padding: 16px 20px;
  margin-bottom: 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

/* =====================================================
   FOOTER
===================================================== */

footer {
  background: var(--primary);
  color: white;
  padding: 70px 0 25px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
}

.footer-logo h2 {
  font-size: 34px;
  font-family: "Playfair Display", serif;
  margin-bottom: 10px;
}

.footer-logo span {
  color: var(--gold);
}

.footer-logo p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.footer-menu,
.footer-social {
  display: flex;
  flex-direction: column;
}

.footer-menu h3,
.footer-social h3 {
  margin-bottom: 18px;
  font-size: 20px;
}

.footer-menu a,
.footer-social a {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-menu a:hover,
.footer-social a:hover {
  color: var(--gold-light);
  padding-left: 8px;
}

footer hr {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 45px 0 25px;
}

.copyright {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

/* =====================================================
   BACK TO TOP
===================================================== */

#backToTop {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: white;
  font-size: 20px;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  z-index: 999;
}

#backToTop:hover {
  transform: translateY(-6px);
  background: var(--primary);
}

/* =====================================================
   GLOBAL ANIMATION
===================================================== */

img,
button,
.card,
.skill-card,
.blog-card,
.certificate-card,
.portfolio-card,
.contact-item {
  transition: var(--transition);
}

::selection {
  background: var(--gold);
  color: white;
}

/* =====================================================
   SCROLLBAR
===================================================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f3f3f3;
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 30px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1200px) {
  .container {
    width: 92%;
  }
}

@media (max-width: 992px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  section {
    padding: 90px 0;
  }

  .navbar {
    height: 75px;
  }

  .nav-menu {
    position: fixed;
    top: 75px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 75px);
    background: white;
    flex-direction: column;
    justify-content: start;
    padding-top: 40px;
    gap: 28px;
    transition: 0.35s;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.08);
  }

  .nav-menu.active {
    right: 0;
  }

  .menu-toggle {
    display: block;
  }

  .hero-wrapper,
  .about-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    width: 320px;
    height: 320px;
  }

  .hero-button {
    justify-content: center;
  }

  .portfolio-grid,
  .blog-grid,
  .certificate-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .section-title h2 {
    font-size: 34px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-content h2 {
    font-size: 20px;
  }

  .hero-image img {
    width: 260px;
    height: 260px;
  }

  .about-image img {
    width: 260px;
    height: 320px;
  }

  .counter-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-button {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* =====================================================
   DARK MODE VARIABLES
===================================================== */

body.dark-mode {
  --primary: #f5f5f5;

  --secondary: #e6e6e6;

  --gold: #d8b85b;

  --gold-light: #e7cb84;

  --white: #171717;

  --light: #111111;

  --text: #ececec;

  --gray: #b8b8b8;

  --border: #2b2b2b;

  --shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.35);

  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);

  background: #111111;

  color: var(--text);
}

/* =====================================================
   BODY
===================================================== */

body.dark-mode {
  background: #111111;

  color: var(--text);
}

/* =====================================================
   GLOBAL
===================================================== */

body.dark-mode section {
  background: var(--white);
}

body.dark-mode p {
  color: var(--gray);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode strong {
  color: var(--primary);
}

/* =====================================================
   NAVBAR
===================================================== */

body.dark-mode header {
  background: rgba(17, 17, 17, 0.92);

  backdrop-filter: blur(18px);
}

body.dark-mode header.scrolled {
  background: rgba(17, 17, 17, 0.96);
}

body.dark-mode .nav-menu {
  background: #171717;
}

body.dark-mode .nav-menu a {
  color: var(--primary);
}

body.dark-mode .logo {
  color: var(--primary);
}

body.dark-mode .menu-toggle span {
  background: white;
}

/* =====================================================
   HERO
===================================================== */

body.dark-mode .hero {
  background: #111111;
}

body.dark-mode .hero-content p {
  color: var(--gray);
}

body.dark-mode .hero::before {
  background: rgba(216, 184, 91, 0.08);
}

body.dark-mode .hero::after {
  background: rgba(255, 255, 255, 0.03);
}

/* =====================================================
   CARD
===================================================== */

body.dark-mode .skill-card,
body.dark-mode .certificate-card,
body.dark-mode .blog-card,
body.dark-mode .contact-item,
body.dark-mode .contact-form,
body.dark-mode .timeline-content,
body.dark-mode .about-info div {
  background: #1b1b1b;

  border: 1px solid #2b2b2b;
}

/* =====================================================
   INPUT
===================================================== */

body.dark-mode input,
body.dark-mode textarea {
  background: #222222;

  border: 1px solid #333333;

  color: white;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #888888;
}

/* =====================================================
   BUTTON
===================================================== */

body.dark-mode .btn-primary {
  background: var(--gold);

  color: #111111;
}

body.dark-mode .btn-primary:hover {
  background: var(--gold-light);
}

body.dark-mode .btn-secondary {
  border-color: var(--gold);

  color: var(--gold);
}

body.dark-mode .btn-secondary:hover {
  background: var(--gold);

  color: #111111;
}

/* =====================================================
   PORTFOLIO FILTER
===================================================== */

body.dark-mode .portfolio-filter button {
  background: #1f1f1f;

  color: white;
}

body.dark-mode .portfolio-filter button.active {
  background: var(--gold);

  color: #111111;
}

/* =====================================================
   FORM CONTACT
===================================================== */
body.dark-mode .alert-success {
  background: #153b2d;
  border-color: #22c55e;
  color: #a7f3d0;
}

/* =====================================================
   FOOTER
===================================================== */

body.dark-mode footer {
  background: #090909;
}

body.dark-mode footer a {
  color: #dddddd;
}

body.dark-mode footer a:hover {
  color: var(--gold);
}

/* =====================================================
   BACK TO TOP
===================================================== */

body.dark-mode #backToTop {
  background: var(--gold);

  color: #111111;
}

/* =====================================================
   SCROLLBAR
===================================================== */

body.dark-mode ::-webkit-scrollbar-track {
  background: #151515;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: var(--gold);
}

/* =====================================================
   TOGGLE BUTTON
===================================================== */

#theme-toggle {
  width: 48px;

  height: 48px;

  border-radius: 50%;

  background: var(--light);

  color: var(--primary);

  display: flex;

  justify-content: center;

  align-items: center;

  cursor: pointer;

  transition: 0.35s;

  margin-left: 20px;

  box-shadow: var(--shadow-sm);
}

#theme-toggle:hover {
  transform: rotate(180deg);
}

body.dark-mode #theme-toggle {
  background: #222222;

  color: var(--gold);
}

/* =====================================================
   FADE TRANSITION
===================================================== */

body,
header,
section,
.card,
.skill-card,
.portfolio-card,
.blog-card,
.contact-item,
.contact-form,
footer {
  transition:
    background 0.35s ease,
    color 0.35s ease,
    border 0.35s ease;
}

button,
.btn-primary,
.btn-secondary {
  position: relative;

  overflow: hidden;
}

.ripple {
  position: absolute;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.35);

  transform: scale(0);

  animation: ripple 0.6s linear;

  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);

    opacity: 0;
  }
}

#loader {
  position: fixed;

  inset: 0;

  background: white;

  display: flex;

  justify-content: center;

  align-items: center;

  z-index: 99999;

  transition: 0.5s;
}

.loader-circle {
  width: 70px;

  height: 70px;

  border: 6px solid #ececec;

  border-top: 6px solid var(--gold);

  border-radius: 50%;

  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

body.dark-mode #loader {
  background: #111;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);

  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;

    transition: none !important;

    scroll-behavior: auto !important;
  }
}

@media print {
  header,
  footer,
  #backToTop,
  .menu-toggle,
  #theme-toggle {
    display: none !important;
  }

  section {
    padding: 30px 0;
  }

  body {
    background: white;

    color: black;
  }
}

.article-content {
  font-size: 18px;

  line-height: 1.8;

  color: #333;
}

.article-content h2 {
  margin-top: 30px;

  margin-bottom: 15px;
}

.article-content img {
  max-width: 100%;

  height: auto;

  border-radius: 10px;
}

.article-content ul {
  padding-left: 25px;
}

.blog-detail-image {
  width: 100%;

  max-height: 500px;

  object-fit: cover;

  border-radius: 15px;

  margin-bottom: 30px;
}

.blog-meta {
  display: flex;

  gap: 20px;

  color: #777;

  margin-bottom: 30px;
}

/* =====================================================
   COUNTER
===================================================== */
body.dark-mode .counter {
  background: linear-gradient(135deg, black);
}

body.dark-mode .counter-item h2 {
  color: var(--gold);
}

body.dark-mode .counter-item p {
  color: rgba(255, 255, 255, 0.85);
}
