:root {
  --color-primary: #2b2d42;
  --color-secondary: #4f539c;
  --color-accent: #8d99ae;
  --color-background: #ffffff;
  --color-surface: #edf2f4;
  --color-text-primary: #2b2d42;
  --color-text-secondary: #5a5a5a;
  --color-white: #ffffff;
  --color-gold: #ffd700;
  --color-footer-bg1: #2b2d42;
  --color-footer-bg2: #4f539c;
  --color-footer-text: rgba(255, 255, 255, 0.8);
  --color-footer-line: rgba(255, 255, 255, 0.2);
  --color-hover-bg: rgba(255, 255, 255, 0.1);
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 8px 25px rgba(43, 45, 66, 0.1);
  --shadow-hover: 0 15px 35px rgba(79, 83, 156, 0.25);
  --gradient-main: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --transition-smooth: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  --safe-area-top: env(safe-area-inset-top, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  background: var(--color-background);
  color: var(--color-text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  padding-top: var(--safe-area-top);
}

body.menu-active {
  overflow: hidden;
}

::selection {
  background-color: var(--color-secondary);
  color: white;
}

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

section {
  padding: 80px 0;
  overflow: hidden;
}

.bg-abu {
  background-color: var(--color-surface);
}

@keyframes floatImage {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 4rem;
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-white);
  width: 45px;
  height: 45px;
  border-radius: 10px;
  background: var(--gradient-main);
  box-shadow: 0 4px 10px rgba(79, 83, 156, 0.3);
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 600;
  color: var(--color-primary);
}

.navigation-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-white);
  z-index: 1000;
  padding: calc(12px + var(--safe-area-top)) 0 12px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navigation-bar .inner-width {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 0.5px;
}

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

.toggle-button {
  cursor: pointer;
  font-size: 1.8rem;
  color: var(--color-white);
  z-index: 1200;
  padding: 5px;
}

.main-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--gradient-main);
  color: var(--color-white);
  z-index: 1100;
  overflow-y: auto;
  padding: calc(80px + var(--safe-area-top)) 10px 20px 10px;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  list-style: none;
}

.main-menu.active {
  transform: translateX(0);
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
}

a.menu-item {
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
  border-radius: 8px;
  text-decoration: none;
}

a.menu-item i {
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

a.menu-item:hover {
  background-color: var(--color-hover-bg);
}

.menu-item-desktop {
  display: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.lang-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.hero {
  padding-top: calc(120px + var(--safe-area-top));
  padding-bottom: 8rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  text-align: center;
}

.hero-content .hero-sub {
  font-size: 1.2rem;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}

.hero-content .hero-title {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 1.5rem 0;
  line-height: 1.2;
  background: var(--gradient-main);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content .hero-desc {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
  line-height: 1.8;
}

.hero-desc strong {
  color: var(--color-secondary);
  font-weight: 600;
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.hero-socials a {
  color: var(--color-accent);
  font-size: 1.8rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-socials a:hover {
  color: var(--color-secondary);
  transform: translateY(-5px) scale(1.1);
}

.hero-image-container {
  position: relative;
  max-width: 280px;
  margin: 0 auto;
  animation: floatImage 6s ease-in-out infinite;
}

.hero-image-bg {
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 100%;
  height: 100%;
  background: var(--gradient-main);
  border-radius: 20px;
  z-index: 1;
  opacity: 0.8;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 20px;
  position: relative;
  z-index: 2;
  border: 5px solid var(--color-background);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.about-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.about-content p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 800px;
  line-height: 1.8;
}

.about-content p:not(:last-child) {
  margin-bottom: 2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  background: var(--color-white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(79, 83, 156, 0.1);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.folder-icon {
  font-size: 3rem;
  color: var(--color-secondary);
  transition: transform 0.3s ease;
}

.project-card:hover .folder-icon {
  transform: scale(1.1);
}

.project-links-top {
  display: flex;
  gap: 1.5rem;
}

.project-links-top a {
  font-size: 1.5rem;
  color: var(--color-accent);
  transition: all 0.3s ease;
}

.project-links-top a:hover {
  color: var(--color-secondary);
  transform: translateY(-3px);
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-primary);
  transition: color 0.3s ease;
}

.project-card:hover .project-title {
  color: var(--color-secondary);
}

.project-desc {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
}

.project-tags span {
  font-size: 0.85rem;
  color: var(--color-secondary);
  background: rgba(79, 83, 156, 0.08);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-family: 'Consolas', monospace;
  transition: background 0.3s ease;
}

.project-card:hover .project-tags span {
  background: rgba(79, 83, 156, 0.15);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

.skills-bars h3,
.skills-tech h3 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.skill-bar-con {
  margin-bottom: 2rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 500;
}

.skill-bar {
  background: #e0e0e0;
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
}

.skill-fill {
  background: var(--gradient-main);
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tech-grid span {
  background: var(--color-background);
  color: var(--color-primary);
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  cursor: default;
}

.tech-grid span:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  color: var(--color-secondary);
}

.timeline {
  position: relative;
  margin: 0 auto;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background-color: var(--color-surface);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  background: var(--color-white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-medium);
  transition: var(--transition-smooth);
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 28px;
  left: -37px;
  width: 15px;
  height: 15px;
  background: var(--color-secondary);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  z-index: 1;
  box-sizing: content-box;
  transition: transform 0.3s ease;
}

.timeline-item:hover::before {
  transform: scale(1.3);
  background: var(--color-primary);
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  display: inline-block;
  background: rgba(79, 83, 156, 0.08);
  padding: 0.4rem 1rem;
  border-radius: 6px;
}

.timeline-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-card {
  background: var(--color-background);
  padding: 3rem 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
  text-decoration: none;
  color: var(--color-primary);
  border: 1px solid transparent;
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(79, 83, 156, 0.2);
}

.contact-card i {
  font-size: 2.5rem;
  color: var(--color-white);
  background: var(--gradient-main);
  width: 60px;
  height: 60px;
  line-height: 60px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.contact-card:hover i {
  transform: rotateY(180deg);
}

.contact-card h4 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.contact-card p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  word-break: break-all;
}

footer {
  padding: 40px 0 20px 0;
  background: linear-gradient(135deg, var(--color-footer-bg1) 0%, var(--color-footer-bg2) 100%);
  text-align: center;
}

.footer-text-head h3 {
  color: var(--color-white);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-text-head p {
  color: var(--color-footer-text);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.footer-icon-con {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.footer-icon {
  color: var(--color-footer-text);
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.footer-icon:hover {
  color: var(--color-white);
  transform: translateY(-3px);
}

.footer-text-body h2 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.footer-body {
  color: var(--color-footer-text);
  display: block;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-body:hover {
  color: var(--color-white);
  padding-left: 5px;
}

.garis-footer {
  background-color: var(--color-footer-line);
  height: 1px;
  margin: 20px 0;
}

.footer-copyright {
  color: var(--color-footer-text);
  font-size: 0.85rem;
}

@media (min-width: 600px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-card:last-child {
    grid-column: span 2;
  }
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .contact-card:last-child {
    grid-column: auto;
  }
}

@media (min-width: 1024px) {
  html {
    font-size: 105%;
  }

  .inner-width {
    padding: 0 40px;
  }

  .navigation-bar {
    padding: 15px 0;
  }

  .navigation-bar .toggle-button {
    display: none;
  }

  .main-menu {
    position: static;
    transform: translateX(0);
    display: flex;
    flex-direction: row;
    align-items: center;
    background: transparent;
    height: auto;
    width: auto;
    box-shadow: none;
    padding: 0;
    overflow: visible;
    gap: 0.5rem;
  }

  a.menu-item {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    gap: 0.8rem;
  }

  .menu-item-desktop {
    display: list-item;
  }

  .btn-nav-contact {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    color: var(--color-primary);
    background-color: var(--color-white);
    border-radius: 8px;
    margin-left: 1rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
  }

  .btn-nav-contact:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .hero {
    padding-top: calc(160px + var(--safe-area-top));
    padding-bottom: 15rem;
  }

  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
    text-align: left;
    gap: 8rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-image-container {
    order: 2;
    max-width: 400px;
  }

  .hero-socials {
    justify-content: flex-start;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
    align-items: flex-start;
    gap: 8rem;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-item {
    width: calc(50% - 40px);
    margin-bottom: 4rem;
  }

  .timeline-item:nth-child(even) {
    margin-left: calc(50% + 40px);
  }

  .timeline-item:nth-child(even)::before {
    left: -50.5px;
  }

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

  .timeline-item:nth-child(odd)::before {
    left: calc(100% + 29.5px);
  }

  footer {
    text-align: left;
    padding: 60px 0 30px 0;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 5rem;
    align-items: start;
  }

  .footer-text-head,
  .footer-text-body {
    margin: 0;
  }

  .footer-icon-con {
    justify-content: flex-start;
  }

  .footer-copyright {
    text-align: center;
  }
}
