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

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Poppins', sans-serif;
      background-color: #fafafa;
      color: #1a1a1a;
      line-height: 1.5;
      cursor: default;
      overflow-x: hidden;
    }

    /* Custom cursor glow effect */
    .cursor-glow {
      position: fixed;
      width: 300px;
      height: 300px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(245, 197, 66, 0.08) 0%, transparent 70%);
      pointer-events: none;
      z-index: 9999;
      transform: translate(-50%, -50%);
      transition: opacity 0.3s;
    }

    /* subtle engineering background texture */
    .engineering-bg {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" opacity="0.06"><path d="M20 50 L60 50 L80 30 L110 30 L130 70 L160 70 L180 50" stroke="%23000" fill="none" stroke-width="1.2"/><path d="M30 120 L70 120 L90 90 L120 90 L140 140 L170 140" stroke="%23000" fill="none" stroke-width="1.2"/><circle cx="45" cy="75" r="3" fill="%23000" opacity="0.3"/><circle cx="145" cy="105" r="4" fill="%23000" opacity="0.25"/><path d="M10 150 L50 150 L70 130 L100 130 L120 170 L150 170 L180 150" stroke="%23000" fill="none" stroke-width="1"/><path d="M60 10 L60 30 L80 50 L110 50 L130 20 L160 20" stroke="%23000" fill="none" stroke-width="1.2"/></svg>');
      background-size: 280px 280px;
      pointer-events: none;
      z-index: 0;
      animation: bgDrift 30s linear infinite;
    }

    @keyframes bgDrift {
      0% { background-position: 0 0; }
      100% { background-position: 280px 280px; }
    }

    .container {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 2rem;
      position: relative;
      z-index: 2;
    }

    /* typography */
    h1, h2, h3 {
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    h2 {
      font-size: 2.5rem;
      margin-bottom: 2.5rem;
      position: relative;
      display: inline-block;
    }

    h2:after {
      content: '';
      position: absolute;
      left: 0;
      bottom: -10px;
      width: 60px;
      height: 4px;
      background: #f5c542;
      border-radius: 4px;
      transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    }

    h2:hover:after {
      width: 100%;
    }

    /* cards & shadows with smooth animation */
    .card {
      background: #ffffff;
      border-radius: 28px;
      padding: 2rem;
      box-shadow: 0 20px 35px -8px rgba(0,0,0,0.08), 0 8px 18px -6px rgba(0,0,0,0.02);
      transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
      border: 1px solid rgba(0,0,0,0.02);
      position: relative;
      overflow: hidden;
    }

    .card::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(245, 197, 66, 0.05), transparent);
      transition: left 0.6s ease;
    }

    .card:hover::before {
      left: 100%;
    }

    .card:hover {
      transform: translateY(-8px);
      box-shadow: 0 32px 48px -12px rgba(0,0,0,0.18), 0 12px 24px -8px rgba(0,0,0,0.06);
    }

    /* buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 0.9rem 2.2rem;
      border-radius: 60px;
      font-weight: 600;
      letter-spacing: 0.3px;
      transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
      text-decoration: none;
      font-size: 1rem;
      cursor: pointer;
      border: none;
      background: white;
      color: #111;
      box-shadow: 0 8px 18px rgba(0,0,0,0.06);
      position: relative;
      overflow: hidden;
    }

    .btn::after {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      background: rgba(245, 197, 66, 0.3);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      transition: width 0.6s, height 0.6s;
    }

    .btn:active::after {
      width: 300px;
      height: 300px;
    }

    .btn-primary {
      background: #0f0f0f;
      color: white;
      box-shadow: 0 12px 22px -8px rgba(0,0,0,0.25);
    }

    .btn-primary:hover {
      background: #2b2b2b;
      transform: translateY(-4px) scale(1.03);
      box-shadow: 0 20px 30px -10px rgba(0,0,0,0.35);
    }

    .btn-outline {
      background: transparent;
      border: 1.5px solid #d4d4d4;
      color: #1a1a1a;
    }

    .btn-outline:hover {
      border-color: #f5c542;
      color: #000;
      background: #fffdf7;
      transform: translateY(-4px) scale(1.03);
    }

    /* header / nav */
    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1.8rem 0;
      flex-wrap: nowrap;
      animation: slideDown 0.8s ease;
    }

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

    .logo {
      font-weight: 800;
      font-size: 1.8rem;
      letter-spacing: -0.5px;
      color: #0f0f0f;
      white-space: nowrap;
      transition: transform 0.3s ease;
    }
    .logo:hover {
      transform: scale(1.05);
    }
    .logo span {
      color: #0f0f0f;
    }

    nav {
      display: flex;
      flex-wrap: nowrap;
      gap: 1.8rem;
    }

    nav a {
      text-decoration: none;
      color: #2b2b2b;
      font-weight: 500;
      font-size: 1rem;
      transition: all 0.3s ease;
      display: inline-block;
      white-space: nowrap;
      cursor: pointer;
      position: relative;
      padding: 0.3rem 0;
    }

    nav a::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 2px;
      background: #f5c542;
      transition: width 0.3s ease;
    }

    nav a:hover {
      color: #f5c542;
      transform: translateY(-2px);
    }

    nav a:hover::after {
      width: 100%;
    }

    /* hero */
    .hero-grid {
      display: flex;
      align-items: center;
      gap: 3rem;
      margin: 3rem 0 5rem;
      flex-wrap: nowrap;
    }

    .hero-image {
      flex: 0 0 380px;
      display: flex;
      justify-content: center;
      animation: floatImage 4s ease-in-out infinite;
    }

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

    .hero-image img {
      width: 100%;
      max-width: 380px;
      aspect-ratio: 1/1;
      object-fit: cover;
      border-radius: 50%;
      box-shadow: 0 30px 50px rgba(0,0,0,0.2);
      background: #eaeaea;
      border: 4px solid white;
      transition: all 0.5s ease;
    }
    .hero-image img:hover {
      transform: scale(1.05) rotate(2deg);
      box-shadow: 0 40px 60px rgba(0,0,0,0.3);
    }

    .hero-text {
      flex: 1 1 auto;
      animation: fadeSlideUp 1s ease;
    }

    .hero-text h1 {
      font-size: 3.8rem;
      font-weight: 800;
      line-height: 1.1;
      margin-bottom: 0.5rem;
      background: linear-gradient(135deg, #0f0f0f 0%, #3a3a3a 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .hero-sub {
      font-size: 1.4rem;
      font-weight: 600;
      color: #3d3d3d;
      margin-bottom: 0.8rem;
      transition: color 0.3s;
    }

    .tagline {
      font-size: 1.1rem;
      margin: 1.5rem 0 2rem;
      color: #4a4a4a;
      max-width: 500px;
    }

    .hero-buttons {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }

    /* engineering skills grid - fixed equal sizes */
    .skills-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.8rem;
      margin: 2.5rem 0 4rem;
    }

    .skill-card {
      background: white;
      border-radius: 24px;
      padding: 2rem 1rem;
      text-align: center;
      font-weight: 600;
      box-shadow: 0 12px 24px -10px rgba(0,0,0,0.06);
      transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
      border: 1px solid #f0f0f0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 140px;
      height: 100%;
      position: relative;
      overflow: hidden;
    }

    .skill-card::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(245, 197, 66, 0.1) 0%, transparent 70%);
      opacity: 0;
      transition: opacity 0.4s;
    }

    .skill-card:hover::before {
      opacity: 1;
    }

    .skill-card i {
      font-size: 2.2rem;
      color: #f5c542;
      margin-bottom: 0.8rem;
      transition: all 0.4s ease;
      position: relative;
      z-index: 1;
    }

    .skill-card:hover i {
      transform: scale(1.2) rotate(5deg);
      color: #e0a800;
    }

    .skill-card:hover {
      transform: translateY(-8px) scale(1.02);
      border-color: #f5c542;
      box-shadow: 0 25px 35px -12px rgba(0,0,0,0.15);
    }

    /* projects */
    .project-section {
      margin: 6rem 0;
    }

    .project-card {
      display: flex;
      flex-direction: column;
      background: white;
      border-radius: 32px;
      overflow: hidden;
      margin-bottom: 4rem;
      box-shadow: 0 25px 40px -15px rgba(0,0,0,0.1);
      transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
      position: relative;
    }

    .project-card::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 32px;
      background: linear-gradient(135deg, transparent 60%, rgba(245, 197, 66, 0.08) 100%);
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.4s;
    }

    .project-card:hover::after {
      opacity: 1;
    }

    .project-card:hover {
      transform: translateY(-8px);
      box-shadow: 0 40px 55px -18px rgba(0,0,0,0.2);
    }

    .project-hero-img {
      width: 100%;
      height: 300px;
      object-fit: cover;
      background: #d9d9d9;
      transition: all 0.6s ease;
      filter: brightness(0.95);
    }
    .project-card:hover .project-hero-img {
      transform: scale(1.03);
      filter: brightness(1.05);
    }

    .project-content {
      padding: 2.2rem 2.5rem;
      position: relative;
      z-index: 1;
    }

    .project-content h3 {
      font-size: 2rem;
      margin-bottom: 1rem;
      transition: color 0.3s;
    }

    .project-card:hover .project-content h3 {
      color: #f5c542;
    }

    .project-desc {
      font-size: 1.1rem;
      color: #2d2d2d;
      margin: 1.2rem 0;
      line-height: 1.7;
    }

    .tech-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
      margin: 1.2rem 0 0.5rem;
    }
    .tech-tag {
      background: #f2f2f2;
      padding: 0.3rem 1.2rem;
      border-radius: 30px;
      font-size: 0.85rem;
      font-weight: 600;
      transition: all 0.3s ease;
    }
    .tech-tag:hover {
      background: #f5c542;
      color: #000;
      transform: translateY(-2px);
    }

    /* experience timeline */
    .experience-section {
      margin: 6rem 0;
    }
    .timeline {
      margin: 4rem 0;
    }
    .timeline-item {
      display: flex;
      gap: 2rem;
      margin-bottom: 3rem;
      position: relative;
      transition: transform 0.3s ease;
    }
    .timeline-item:hover {
      transform: translateX(10px);
    }
    .timeline-marker {
      width: 16px;
      height: 16px;
      background: #f5c542;
      border-radius: 50%;
      margin-top: 0.5rem;
      box-shadow: 0 0 0 5px white, 0 0 0 7px #e0e0e0;
      flex-shrink: 0;
      transition: all 0.4s ease;
    }
    .timeline-item:hover .timeline-marker {
      background: #e0a800;
      box-shadow: 0 0 0 8px white, 0 0 0 10px #f5c542;
    }
    .timeline-content h4 {
      font-weight: 700;
      font-size: 1.4rem;
      margin-bottom: 0.2rem;
      transition: color 0.3s;
    }
    .timeline-item:hover .timeline-content h4 {
      color: #f5c542;
    }
    .timeline-content .date {
      font-weight: 500;
      color: #6b6b6b;
      margin-bottom: 0.8rem;
      font-size: 0.95rem;
    }
    .timeline-content ul {
      list-style-type: none;
      padding-left: 0;
      color: #3a3a3a;
    }
    .timeline-content ul li {
      margin-bottom: 0.4rem;
      display: flex;
      align-items: baseline;
      gap: 0.5rem;
      transition: transform 0.2s;
    }
    .timeline-content ul li:hover {
      transform: translateX(5px);
    }
    .timeline-content ul li i {
      color: #f5c542;
      font-size: 0.8rem;
      width: 16px;
      text-align: center;
    }

    /* gallery masonry 3:4 images */
    .masonry {
      columns: 3;
      column-gap: 1.5rem;
      margin: 2rem 0;
    }
    .masonry-item {
      break-inside: avoid;
      margin-bottom: 1.5rem;
      border-radius: 24px;
      overflow: hidden;
      box-shadow: 0 12px 22px rgba(0,0,0,0.06);
      background: #ddd;
      transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
      position: relative;
    }
    .masonry-item::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
      opacity: 0;
      transition: opacity 0.4s;
    }
    .masonry-item:hover::after {
      opacity: 1;
    }
    .masonry-item img {
      width: 100%;
      display: block;
      aspect-ratio: 3 / 4;
      object-fit: cover;
      transition: transform 0.6s ease;
    }
    .masonry-item:hover {
      transform: scale(1.03);
      box-shadow: 0 20px 35px rgba(0,0,0,0.2);
    }
    .masonry-item:hover img {
      transform: scale(1.08);
    }

    /* certificates */
    .cert-card {
      transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
      cursor: pointer;
    }
    .cert-card:hover {
      transform: translateY(-10px) rotate(2deg);
    }
    .cert-card i {
      transition: all 0.4s;
    }
    .cert-card:hover i {
      transform: scale(1.3);
      color: #e0a800;
    }

    /* Certificate Popup Modal */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0);
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
      transition: background 0.4s ease;
    }

    .modal-overlay.active {
      background: rgba(0, 0, 0, 0.75);
      pointer-events: all;
    }

    .modal-dialog {
      background: white;
      border-radius: 24px;
      padding: 1.5rem;
      max-width: 600px;
      width: 90%;
      position: relative;
      transform: scale(0.7);
      opacity: 0;
      transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
      box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    }

    .modal-overlay.active .modal-dialog {
      transform: scale(1);
      opacity: 1;
    }

    .modal-close {
      position: absolute;
      top: -15px;
      right: -15px;
      width: 40px;
      height: 40px;
      background: #0f0f0f;
      color: white;
      border: none;
      border-radius: 50%;
      font-size: 1.2rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
      z-index: 10;
      box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    }

    .modal-close:hover {
      background: #f5c542;
      color: #000;
      transform: rotate(90deg) scale(1.1);
    }

  .modal-image {
  width: 100%;
  border-radius: 16px;
  display: block;
  object-fit: contain;
  max-height: 70vh;
  transition: opacity 0.3s ease;
  }

    footer {
      text-align: center;
      padding: 3rem 0;
      color: #666;
      position: relative;
    }

    footer::before {
      content: '';
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 100px;
      height: 2px;
      background: linear-gradient(90deg, transparent, #f5c542, transparent);
    }

    /* keyframe animations */
    @keyframes fadeSlideUp {
      0% {
        opacity: 0;
        transform: translateY(25px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Scroll reveal animation */
    .reveal {
      opacity: 0;
      transform: translateY(30px);
      transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    .reveal.visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* For all screens, keep exactly the desktop layout. No mobile breakpoints that change grid or flex direction. */
    @media (max-width: 900px) {
      .container {
        padding: 0 1.5rem;
      }
      .hero-grid {
        gap: 2rem;
      }
      .hero-image {
        flex: 0 0 280px;
      }
      .hero-text h1 {
        font-size: 2.8rem;
      }
      .skills-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
      }
    }

    @media (max-width: 700px) {
      .hero-grid {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
      }
      .hero-text {
        text-align: center;
      }
      .hero-buttons {
        justify-content: center;
      }
      .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
      }
      .masonry {
        columns: 2;
      }
      header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
      }
      nav {
        gap: 1rem;
      }
    }
    /* Perbaikan navigasi untuk mobile - tidak terlalu mepet */
    @media (max-width: 700px) {
      header {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
      }

      nav {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 0 0.5rem;
      }

      nav a {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        margin: 0;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 50px;
        transition: all 0.3s ease;
      }

      nav a:hover {
        background: rgba(245, 197, 66, 0.2);
      }
    }

    @media (max-width: 480px) {
      .container {
        padding: 0 1rem;
      }

      header {
        padding: 1rem 0;
      }

      nav {
        gap: 0.4rem;
      }

      nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.9rem;
      }
    }

    @media (max-width: 380px) {
      nav {
        gap: 0.3rem;
      }

      nav a {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
      }
    }

    /* Perbaikan tampilan Contact di Mobile */
@media (max-width: 700px) {
  #contact > div {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 1rem !important;
  }
  
  #contact .btn {
    padding: 0.8rem 1.5rem !important;
    font-size: 0.9rem !important;
    min-width: 140px !important;
  }
}

@media (max-width: 380px) {
  #contact > div {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.6rem !important;
  }
  
  #contact .btn {
    padding: 0.65rem 1rem !important;
    font-size: 0.8rem !important;
    min-width: auto !important;
    flex: 1 1 auto !important;
  }
}

    /* Perbaikan spacing Contact - LinkedIn & Instagram */
@media (max-width: 700px) {
  #contact > div {
    gap: 1rem !important;
  }
}

@media (max-width: 480px) {
  #contact > div {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 1rem !important;
    row-gap: 1.2rem !important;
  }
}
