/* ===== BASIC STYLE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #0f172a;
  background-color: #ffffff;
}

/* ===== NAVBAR ===== */
/* Header dan Navbar */
header {
  background-color: transparent;
  position: fixed;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 1000;
  padding: 0;
  margin: 0;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #555;
  margin-top: 10px;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

/* Animation for the spinner */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.navbar {
  background-color: transparent;
  padding: 10px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  width: 100%;
  font-size: 18px;
  box-sizing: border-box;
  transition: ALL 0.3s ease;
}

.nav-right {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-right a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.nav-right a:hover {
  background-color: #38bdf8;
  color: #ffffff;
}

.nav-right a.active {
  background-color: #38bdf8;
  color: #ffffff;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-left img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-left span {
  color: #38bdf8;
  font-weight: 700;
  font-size: 26px;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 25px;
  height: 20px;
  position: relative;
}

.hamburger.active {
  gap: 0;
}

.hamburger .bar {
  width: 100%;
  height: 2px;
  background-color: white;
  border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
  visibility: hidden;
}

.hamburger.active .bar:nth-child(3) {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 70%;
  transform: translate(-50%, 50%) rotate(-45deg);
}

/* Efek sticky saat discroll */
header.scrolled .navbar {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
}

/* Media query untuk tampilan mobile */
@media (max-width: 768px) {
  .nav-right {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    background-color: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: absolute;
    top: 65px;
    left: 0;
  }

  .nav-right.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

/* ===== HERO SECTION ===== */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0b1223;
  text-align: center;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 2.8rem;
  color: #E2E8FF;
  margin-bottom: 20px;
}

.hero-content span {
  color: #38bdf8;
}

.subtitle {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.subtitle p {
  font-size: 1.5rem;
  margin: 5px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Subtitle rolling animation: two lines alternate vertically */
.subtitle {
  position: relative;
  height: 5rem;
  /* reserve space for one line */
  overflow: hidden;
}

.subtitle p {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  margin: 0;
  font-size: 1.5rem;
  color: #d87474;
  text-align: center;
  will-change: transform, opacity;
}

@keyframes roleCycle {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  42.857% {
    transform: translateY(0);
    opacity: 1;
  }

  50% {
    transform: translateY(-100%);
    opacity: 0;
  }

  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes statusCycle {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }

  50% {
    transform: translateY(100%);
    opacity: 0;
  }

  57.143% {
    transform: translateY(0);
    opacity: 1;
  }

  92.857% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

.subtitle .role {
  animation: roleCycle 7s ease-in-out infinite;
}

.subtitle .status {
  animation: statusCycle 7s ease-in-out infinite;
}

.hero-content p {
  margin: 10px 0 20px;
  color: #475569;
}

.hero-description p {
  color: #e2e8ffc9;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 600px;
  text-align: center;
  margin-bottom: 20px;
  padding: 0 15px;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-icons img {
  width: 30px;
  height: 30px;
  filter: brightness(0.9);
  transition: transform 0.2s, filter 0.2s;
}

.social-icons img:hover {
  transform: scale(1.1);
  filter: brightness(1.3);
}

@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 3rem;
  }

  .subtitle p {
    font-size: 1.8rem;
  }
}

@media (max-width: 767px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .subtitle p {
    font-size: 1.3rem;
  }

  .hero-description p {
    font-size: 1rem;
    padding: 0 10px;
  }

  .social-icons {
    gap: 15px;
  }

  .social-icons img {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 0 15px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .subtitle p {
    font-size: 1.1rem;
  }

  .hero-description p {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .button {
    padding: 12px 22px;
    font-size: 14px;
  }
}

.hero-content.active .role,
.hero-content.active .status {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  :root {
    --mouse-x: 50%;
    --mouse-y: 50%;
  }

  .cursor-spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y),
        #111f428d 0%,
        transparent 35%);
    mix-blend-mode: screen;
    transition: background 120ms linear, opacity 180ms ease;
    opacity: 1;
  }
}

/* ===== ABOUT SECTION ===== */
.about {
  background-color: #101f38;
  color: #E2E8FF;
  padding: 85px 10%;
  display: flex;
  justify-content: center;
}

.about-container {
  max-width: 1300px;
  width: 100%;
}

.about-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
  color: #E2E8FF;
  position: relative;
}

.about-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 50px;
}

.about-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.about-photo {
  text-align: center;
  position: relative;
  display: inline-block;
  border-radius: 20px;
}

.about-photo::after {
  content: "";
  position: absolute;
  top: -7px;
  left: -7px;
  right: -7px;
  bottom: -7px;
  border-radius: 27px;
  border: 2px solid #274881;
  z-index: 0;
}

.about-photo::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 25px;
  background: linear-gradient(135deg, #274881 0%, #06080f 100%);
  z-index: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.about-photo img {
  width: 480px;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  border: 5px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.about-photo img:hover {
  transform: scale(1.05);
}

.about-intro {
  color: #e2e8ffc9;
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: justify;
  padding: 0 10px;
}

.about-description {
  flex: 1.5;
  color: #e2e8ffc9;
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
}

/* ===== ABOUT SKILLS SECTION ===== */
.about-skills {
  margin-top: 25px;
  margin-bottom: 20px;
}

.skills-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #E2E8FF;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}

.skills-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 70px;
  height: 4px;
  background: linear-gradient(90deg, #38bdf8, #274881);
  border-radius: 2px;
}

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

.skill-category {
  background: linear-gradient(145deg, rgba(39, 72, 129, 0.15), rgba(11, 18, 35, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 16px;
  padding: 18px;
  transition: all 0.3s ease;
}

.skill-category:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(145deg, rgba(39, 72, 129, 0.2), rgba(11, 18, 35, 0.35));
}

.category-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(56, 189, 248, 0.2);
  display: inline-block;
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  padding: 0;
  gap: 15px;
  justify-items: center;
}

.skills-list li {
  color: #ffffff;
  width: 100px;
  height: 100px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: linear-gradient(145deg, rgba(39, 72, 129, 0.3), rgba(11, 18, 35, 0.5));
  border: 1px solid rgba(56, 189, 248, 0.2);
  position: relative;
  overflow: hidden;
}

.skills-list li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skills-list li:hover {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.25), rgba(39, 72, 129, 0.4));
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 12px 24px rgba(56, 189, 248, 0.2), 0 0 16px rgba(56, 189, 248, 0.1);
}

.skills-list li:hover::before {
  opacity: 1;
}

.skills-list img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.skills-list li:hover img {
  transform: scale(1.1);
}

/* Skills section responsive */
@media (max-width: 768px) {
  .skills-categories {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .skill-category {
    padding: 15px;
  }

  .category-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .skills-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .skills-list li {
    width: 85px;
    height: 90px;
    font-size: 0.8rem;
  }

  .skills-list img {
    width: 36px;
    height: 36px;
  }

  .skills-title::after {
    width: 50px;
  }
}

@media (max-width: 480px) {
  .skills-categories {
    gap: 12px;
  }

  .skill-category {
    padding: 12px;
  }

  .category-title {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  .skills-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .skills-list li {
    width: 80px;
    height: 85px;
    font-size: 0.75rem;
  }

  .skills-list img {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 1024px) {
  .about-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .about-left {
    align-items: center;
  }

  .about-photo img {
    width: 350px;
    height: auto;
  }

  .about-intro {
    max-width: 600px;
  }

  .about-description {
    font-size: 1rem;
    text-align: center;
    width: 100%;
  }

  .about-contact-me {
    display: flex;
    justify-content: center;
  }
}

/* ===== PROJECTS SECTION ===== */
.projects {
  padding: 85px 50px;
  text-align: center;
  background-color: #0b1223;
}

.projects h1 {
  color: #E2E8FF;
  margin-bottom: 80px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  justify-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.project-card {
  background: linear-gradient(145deg, rgba(39, 72, 129, 0.2), rgba(11, 18, 35, 0.4));
  color: #E2E8FF;
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 520px;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 24px rgba(56, 189, 248, 0.15), 0 0 16px rgba(56, 189, 248, 0.1);
}

.project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card h2 {
  text-align: center;
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #38bdf8;
}

.project-card p {
  color: #e2e8ffc9;
  margin-bottom: 20px;
  text-align: left;
  line-height: 1.6;
  flex-grow: 1;
  font-size: 0.95rem;
}

.project-links {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.project-links .button {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.9rem;
  text-align: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .projects {
    padding: 85px 20px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
    gap: 25px;
  }

  .project-card {
    width: 100%;
    max-width: 100%;
    min-height: auto;
  }

  .project-card img {
    height: 200px;
  }

  .project-card h2 {
    font-size: 1.3rem;
  }

  .project-card p {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .projects {
    padding: 60px 15px;
  }

  .projects h1 {
    font-size: 2rem;
    margin-bottom: 50px;
  }

  .project-card {
    padding: 12px;
  }

  .project-card img {
    height: 180px;
  }

  .project-card h2 {
    font-size: 1.2rem;
  }

  .project-card p {
    font-size: 0.9rem;
  }

  .project-card a {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* ===== CONTACT SECTION ===== */
.contact {
  padding: 100px 25px;
  text-align: center;
  background: linear-gradient(135deg, #0b1223 0%, #101f38 50%, #0b1223 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.contact-content {
  width: 100%;
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.contact h1 {
  color: #E2E8FF;
  margin-bottom: 40px;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.contact-form {
  background: linear-gradient(145deg, rgba(39, 72, 129, 0.2), rgba(11, 18, 35, 0.4));
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  width: 100%;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 16px rgba(56, 189, 248, 0.1);
  gap: 25px;
}

.contact-form .input-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

form {
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  background: linear-gradient(145deg, rgba(16, 31, 56, 0.8), rgba(11, 18, 35, 0.9));
  color: #E2E8FF;
  padding: 18px 20px;
  font-size: 16px;
  border-radius: 12px;
  border: 2px solid rgba(56, 189, 248, 0.2);
  width: 100%;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1), 0 0 16px rgba(56, 189, 248, 0.15);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(226, 232, 255, 0.5);
}

.contact-form textarea {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: 150px;
  max-height: 500px;
  height: 180px;
  resize: vertical;
}

.button-submit {
  display: flex;
  justify-content: center;
  width: 100%;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  color: #38bdf8;
  font-size: 16px;
  font-weight: 500;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #38bdf8;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(16, 31, 56, 0.9) 0%, rgba(11, 18, 35, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.10),
    0 0 16px rgba(56, 189, 248, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.18),
    0 0 24px rgba(56, 189, 248, 0.22);
}

.button:active {
  transform: translateY(0px);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.12),
    0 0 14px rgba(56, 189, 248, 0.18);
}

.button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.22),
    0 0 24px rgba(56, 189, 248, 0.22);
}

@media (max-width: 768px) {
  .contact {
    padding: 80px 20px;
  }

  .contact h1 {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .contact h1::after {
    width: 60px;
    bottom: -10px;
  }

  .contact-form {
    padding: 25px;
    gap: 20px;
  }

  .contact-form .input-container {
    flex-direction: column;
    gap: 15px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 14px 16px;
    font-size: 15px;
    margin-bottom: 15px;
  }

  .contact-form textarea {
    height: 150px;
  }

  .button-submit {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .contact {
    padding: 60px 15px;
  }

  .contact h1 {
    font-size: 1.8rem;
    margin-bottom: 25px;
  }

  .contact h1::after {
    width: 50px;
  }

  .contact-form {
    padding: 20px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 12px 14px;
    font-size: 14px;
  }

  .contact-form textarea {
    height: 120px;
  }
}