* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "poppins", sans-serif;
}

html {
  overflow-x: hidden;
}

body {
  background-color: #121212;
  color: #ffffff;
  overflow-x: hidden;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  background-color: #1a1a1a;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
}

.logo {
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #ffffff;
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  padding-bottom: 5px;
  position: relative;
}

nav ul li a:hover {
  color: #ffffff;
}

nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: #ffffff;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 75%;
}

/* About Me Section */
.about-section {
  display: flex;
  background-color: #121212;
  color: #fff;
  min-height: 500px;
  padding-top: 100px;
}
.photo-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background-color: #121212;
}
.photo-frame {
  width: 300px;
  height: 300px;
  border: 5px solid #fff;
  overflow: hidden;
  position: relative;
}
.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}
.about-content {
  flex: 1;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #111;
}
.title-animation {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 30px;
  position: relative;
  height: 60px;
  overflow: hidden;
}
.title-text {
  position: absolute;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s, transform 0.8s;
}
.title-text.active {
  opacity: 1;
  transform: translateY(0);
}
.about-description {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 30px;
  max-width: 600px;
  /* padding-right: 10%; */
  text-align: justify;
  text-justify: inter-word;
}

/* Skills Section */
.skills-section {
  padding: 60px 0;
  background-color: #111;
  overflow: hidden;
}

.skills-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 40px;
  color: #111;
}

.marquee-container {
  overflow: hidden;
  width: 100%;
  background-color: #fff;
  padding: 20px 0;
  white-space: nowrap;
  position: relative;
}

.marquee-content {
  display: inline-block;
  animation: marquee 120s linear infinite;
  color: #000;
  font-size: 24px;
  letter-spacing: 2px;
  font-weight: 600;
}

.skill-item {
  display: inline-block;
  margin-right: 30px;
}

@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 150px 20px 50px;
  text-align: center;
}

.main-heading {
  font-size: 64px;
  font-weight: bold;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.subtitle {
  font-size: 16px;
  color: #aaa;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.cta-button {
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 30px;
  padding: 15px 40px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  background-color: #eee;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.cta-button:active {
  transform: translateY(-1px);
}

/* Social Media Section */
.social-links {
  display: flex;
  gap: 25px;
  margin-top: 60px;
  justify-content: center;
}

.social-icon {
  font-size: 24px;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}

.social-icon:hover {
  opacity: 0.7;
}

.portfolio-section {
  padding: 110px 0;
  background-color: #0f0f0f;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container .botton {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 50px auto;
  background-color: #fff;
  color: #000;
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  max-width: 300px;
  width: 100%;
}

.container .botton:hover {
  background-color: #eee;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.section-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.section-subtitle {
  text-align: center;
  color: #aaa;
  margin-bottom: 50px;
  font-size: 16px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-10px);
}

.portfolio-img {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-info {
  text-align: center;
  padding: 20px;
}

.portfolio-info h3 {
  font-size: 22px;
  margin-bottom: 10px;
  transform: translateY(-20px);
  transition: transform 0.5s ease;
}

.portfolio-info p {
  color: #aaa;
  margin-bottom: 15px;
  transform: translateY(-20px);
  transition: transform 0.5s ease 0.1s;
}

.portfolio-link {
  display: inline-block;
  padding: 8px 20px;
  background-color: #fff;
  color: #000;
  text-decoration: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  transform: translateY(20px);
  transition: transform 0.5s ease 0.2s, background-color 0.3s ease;
}

.portfolio-link:hover {
  background-color: #eee;
}

.portfolio-item:hover .portfolio-info h3,
.portfolio-item:hover .portfolio-info p,
.portfolio-item:hover .portfolio-link {
  transform: translateY(0);
}

.portfolio-item {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.portfolio-item.show {
  opacity: 1;
  transform: translateY(0);
}

/* Contact Section */
.contact-section {
  padding: 110px 0;
  background-color: #121212;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-text {
  color: #aaa;
  margin-bottom: 40px;
  font-size: 18px;
  line-height: 1.6;
}

.contact-details {
  margin-top: 40px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 20px;
  transition: background-color 0.3s ease;
}

.contact-item:hover .contact-icon {
  background-color: rgba(255, 255, 255, 0.2);
}

.contact-item-info h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.contact-item-info p {
  color: #aaa;
}

.contact-form-container {
  background-color: #1a1a1a;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #fff;
  font-size: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  outline: none;
}

.submit-btn {
  padding: 14px 30px;
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: #eee;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

footer {
  background-color: #1a1a1a;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: #aaa;
}

/* Responsive */
@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-content {
    padding: 40px 30px;
  }

  .title-animation {
    font-size: 42px;
  }
}

@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .main-heading {
    font-size: 42px;
  }

  .section-title {
    font-size: 30px;
  }

  .skills-title {
    font-size: 32px;
  }

  .marquee-content {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .about-section {
    flex-direction: column;
  }

  .photo-frame {
    width: 300px;
    height: 450px;
  }

  .title-animation {
    font-size: 36px;
    height: 50px;
  }

  .about-description {
    font-size: 16px;
  }

  header {
    padding: 15px;
  }

  .hamburger {
    display: flex;
    z-index: 10;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: #1a1a1a;
    width: 70%;
    height: 100vh;
    transition: right 0.3s ease;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  nav ul li {
    margin: 15px 0;
  }

  .main-heading {
    font-size: 36px;
  }

  .subtitle {
    font-size: 14px;
  }

  .section-title {
    font-size: 28px;
  }

  .contact-text {
    font-size: 16px;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .portfolio-grid {
    padding: 40px 20px;
  }
}

@media (max-width: 425px) {
  .main-heading {
    font-size: 28px;
  }

  .photo-frame {
    width: 250px;
    height: 250px;
  }

  .section-title {
    font-size: 24px;
  }

  .contact-form-container {
    padding: 20px;
  }

  .submit-btn {
    width: 100%;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    padding: 30px 15px;
    gap: 20px;
  }

  .skills-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .marquee-content {
    font-size: 16px;
  }

  .skill-item {
    margin-right: 20px;
  }

  .photo-frame {
    width: 200px;
    height: 200px;
  }

  .about-content {
    padding: 40px 20px;
  }
}

/* Small devices (landscape phones, less than 400px) */
@media (max-width: 425px) {
  .main-heading {
    font-size: 24px;
  }

  .profile-photo img {
    width: 100%;
    max-width: 250px; /* atau kurang jika wajah terlalu besar */
    height: auto;
    object-fit: contain; /* atau 'cover' jika ingin penuh */
  }
  .title-animation {
    font-size: 28px;
    height: 40px;
  }

  .about-description {
    font-size: 14px;
  }

  .skills-title {
    font-size: 24px;
  }

  .marquee-content {
    font-size: 14px;
  }

  .skill-item {
    margin-right: 15px;
  }
}

/* Styling for Netlify reCAPTCHA container */
div[data-netlify-recaptcha="true"] {
  margin: 20px 0;
  padding: 10px;
  background-color: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
}

/* Ensure the iframe inside the captcha container fits nicely */
div[data-netlify-recaptcha="true"] iframe {
  border-radius: 8px;
  width: 100% !important;
  max-width: 320px;
  height: 78px !important; /* default height of reCAPTCHA */
}
