@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&family=Poppins:wght@400;600&display=swap');

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

html, body {
  width: 100%;
  overflow-x: hidden; 
}

:root {
  --primary: #77a8ab;
  --secondary: #fff;
  --bg-dark: #16161a; 
  --text-heading: #fffffe; 
  --text-paragraph: #94a1b2; 
  --text-light: #f9f9f9;
  --bg-light: #ffffff;
}

/* General Styles */
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-dark); 
  color: var(--text-paragraph); 
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--text-heading); 
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #16161a;
  padding: 1rem 10%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  justify-content: flex-end; 
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.3s ease; 
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-heading);
  transition: all 0.3s ease; 
}

.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: none;
  position: absolute;
  top: 60px;
  right: 10%;
  background: #16161a;
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  flex-direction: column;
  gap: 10px;
  animation: slideIn 0.3s ease forwards; 
}

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

.nav-links li {
  list-style: none;
}

.navbar a {
  color: var(--text-heading);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color 0.3s;
}

.navbar a:hover {
  color: var(--primary);
}

/* Animasi untuk dropdown */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Section */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #16161a, #232946);
  color: var(--text-heading);
  text-align: center;
  flex-direction: column;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1); /* Tambahan garis pemisah */
}

header h1 {
  font-size: 3rem;
  animation: fadeInDown 1s ease forwards;
}

header p {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-paragraph);
  animation: fadeInDown 1s ease forwards;
}

@keyframes fadeInDown {
  from {opacity: 0; transform: translateY(-50px);}
  to {opacity: 1; transform: translateY(0);}
}

/* General Section Styling */
section {
  padding: 4rem 10%;
  background-color: var(--bg-dark);
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-paragraph);
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* About Section */
.about-text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.sub-heading {
  position: relative;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-heading);
  padding-left: 1rem;
}

.sub-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 60%;
  background: var(--primary);
  border-radius: 3px;
}

/* Personal Info */
.personal-info {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-bottom: 3rem; 
}

.personal-info h3 {
  color: var(--text-paragraph);
  font-size: 1.2em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.info-icon {
  font-size: 1em;
  margin-right: 8px;
  color: var(--text-paragraph);
}

.info-box {
  background: linear-gradient(10deg, #1e1e2f, #232946);
  padding: 1rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.info-box:hover {
  transform: translateY(-4px);
}

.info-box strong {
  display: block;
  color: var(--text-heading);
  margin-bottom: 0.3rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

/* Education Section */
.education-section {
  margin-top: -50px;
  text-align: center;
  padding: 0 20px;
}

.education-section h3 {
  color: #fffffe; 
  font-size: 1.5em;
  margin-bottom: 20px;
}

.timeline {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

/* Garis vertikal timeline */
.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: #ddd; 
  top: 0;
  bottom: 0;
  left: 50%;  
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between; 
  margin-bottom: 20px;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse; 
}

/* Titik di garis timeline */
.timeline-dot {
  width: 14px;     
  height: 14px;
  border: 3px solid #fffffe; 
  border-radius: 50%;      
  background-color: #16161a; 
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-content {
  width: 45%; 
  padding: 15px;
  background: linear-gradient(0deg, #1e1e2f, #232946);
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); 
  color: #555; 
}

.timeline-content h4 {
  margin: 0;
  font-size: 1.2em;
  color: #fff; 
}

.timeline-content p {
  margin: 5px 0 0;
  color: #777; 
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: 0;
  margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content,
.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: 0;
}

/* Skills Section */
#skills {
  text-align: center;
  padding: 50px 20px;
  background-color: var(--bg-dark);
}

#skills h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: var(--text-heading);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.skill-card {
  background: linear-gradient(10deg, #1e1e2f, #232946);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.skill-card span {
  color: var(--text-heading);
  font-weight: 600;
  margin-top: 10px;
}

/* Efek warna pada logo */
.skill-card i {
  font-size: 40px;
  transition: color 0.3s;
  color: var(--text-paragraph);
}

.skill-card.html i {
  color: #E44D26;
}
.skill-card.css i {
  color: #264de4;
}
.skill-card.javascript i {
  color: #f0db4f;
}
.skill-card.python i {
  color: #3776AB;
}

/* Contact Section (Footer) */
.contact-section {
  width: 100%;
  background: linear-gradient(180deg, #1e1e2f, #232946);
  color: #fff;
  text-align: center;
  padding: 50px 20px 30px;
  margin: 0;
  margin-top: 60px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
  display: grid;
  gap: 20px;
}

.footer-info h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--text-heading);
}

.footer-info p {
  margin: 6px 0;
  font-size: 1rem;
  color: var(--text-paragraph);
}

.footer-info a {
  color: var(--text-heading);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed transparent;
  transition: all 0.3s ease;
}

.footer-info a:hover {
  border-bottom: 1px dashed var(--text-heading);
  color: #fff;
}

.social-links {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 25px;
}

.social-links a {
  color: var(--text-paragraph);
  font-size: 1.6rem;
  transition: transform 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
}

.social-links a:hover {
  color: var(--text-heading);
  transform: scale(1.3);
  text-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-paragraph);
  margin-top: 30px;
  opacity: 0.8;
}

.copyright span {
  color: var(--text-heading);
  font-weight: bold;
}

/* Projects Section */
.projects-section {
  padding: 4rem 10%;
  background-color: var(--bg-dark);
}

.projects-section .section-title {
  text-align: left;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-heading);
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: linear-gradient(135deg, #16161a, #232946);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid #3a3a3a;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.project-image {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: #2e354a; /* Warna latar belakang placeholder */
  border-bottom: 2px solid #555;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-details {
  padding: 1.5rem;
}

.project-details h3 {
  color: var(--text-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-details p {
  color: var(--text-paragraph);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  background: var(--primary);
  color: var(--text-light);
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Base style */
.project-tag {
  color: #fff;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Custom colors per tag */
.project-tag.html {
  background: #e34c26; 
}

.project-tag.css {
  background: #264de4; 
}

.project-tag.js {
  background: #f0db4f; 
  color: #000; 
}
