@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

:root {
    --primaryTextColor: #232e35;
    --secondaryTextColor: #656d72;

    --borderColor: #f1f1f1;
    --lineColor: #d9d9d9;

    --primaryBackgroundColor: #fff;
    --seconddaryBackgroundColor: #fbfbfb;
    --thirdBackgroundColor: #f5f3fe;

    --primaryIconColor: #7e74f1;
    --primaryIconColorHover: #5d51e8;

    --sectionPadding: 6rem 0;
    --itemBorderRadius: 0.7rem;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Roboto", sans-serif;
}

h1,h2,h3,h4,h5,h6, strong {
    color: var(--primaryTextColor);
}

p {
    font-size: 1rem; /* 16px */
    line-height: 1.9rem;
}

p, span, label, input, textarea, li {
    color: var(--secondaryTextColor)
}

a {
    text-decoration: none;
}

.main-container {
    width: 1200px;
    margin: 0 auto;
}

@media screen and (max-width: 1200px) {
    .main-container {
        width: 90%;
    }
}

/* Button */
.btn {
    padding: 1rem 1.5rem;
    background: white;
    border: 1.5px solid var(--borderColor);
    cursor: pointer;
    transition: 0.2 ease-in-out;
}

.btn:hover {
    box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
}

/* Tittles */
.section-tittle {
    margin: 1rem 0 4rem;
    font-size: 2rem;
}

.pre-tittle {
    text-transform: uppercase;
    letter-spacing: .5rem;
    color: var(--secondaryTextColor);
    position: relative;
    padding-left: 40px;
    width: fit-content;
    font-weight: 400;
    font-size: .9rem;
}

.pre-tittle:before {
    content: "";
    width: 30px;
    height: 1px;
    background: var(--lineColor);
    position: absolute;
    display: block;
    left: 0;
    top: 50%;
}
/* Layout */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

/* Logo and Navigation Menu */

.nav {
    display: flex;
    justify-content: space-between;
    padding: 2rem 0;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 2rem;
}

.logo a {
    color: var(--primaryTextColor);
}

nav ul li {
    display: flex;
    align-items: center;
}

nav ul li a {
    color: var(--primaryTextColor)
}

.burger div {
    width: 25px;
    height: 2px;
    background-color: #000;
    margin: 7px;
    transition: all 0.3s;
    z-index: 99;
}

.burger {
    display: none; 
    z-index: 99;
    position: fixed;
    top: 33px;
    right: 35px;
}

/* Hero Section */
#hero {
    height: 720px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.hero-name {
    font-size: 3rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
}

.hero-name span {
    color: var(--primaryIconColor);
}

.hero-right {
    display: flex;
    justify-content: center;
}
 .hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}



/* Services Section */

#services {
    background-color: var(--seconddaryBackgroundColor);
    padding: var(--sectionPadding);
}

.services .pre-tittle {
    margin: 0 auto;
}

.services-tittle {
    text-align: center;
}

.service {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--primaryBackgroundColor);
    border-radius: var(--itemBorderRadius);
}

.service h4 {
    margin: 1.5rem 0;
    font-weight: 500;
    font-size: 1.05rem;
}

.service-icon {
    background: var(--thirdBackgroundColor);
    width: fit-content;
    margin: 0 auto;
    padding: 1rem 1.3rem;
    border-radius: 0.5rem;
}

.service-icon svg {
    fill: var(--primaryIconColor);
}

/* Portofolio section */
#portofolio {
    padding: var(--sectionPadding);
    border: 1px solid var(--borderColor);
}

.portofolio {
    border-radius: var(--itemBorderRadius);
    
}

.portofolio-cover {
    height: 250px;
}

.portofolio-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.portofolio-info {
    padding: 2rem 1.5rem;
}

.portofolio-tittle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.portofolio h3 {
    font-weight: 500;
    font-size: 1.05rem;
}

.portofolio-tittle a svg:hover {
    fill: var(--primaryIconColor);
}

.portofolio-tittle a svg {
    transition: 0.2s ease-in-out;
}

.portofolio-tags {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.portofolio-tags div {
    font-size: .9rem;
    border: 1px solid var(--borderColor);
    padding: .4rem 1rem;
    color: var(--secondaryTextColor);
}

#portofolio .pre-tittle {
    margin: 0 auto;
}

.portofolio-info p {
    max-width: 65ch;
    margin: 0 auto 1rem;
    line-height: 1.8;
}

/* Skills & Education */
#skills {
    padding: var(--sectionPadding);
    background: var(--seconddaryBackgroundColor);
}

.education {
    display: flex;
    gap: 2rem;
}

.education .line {
    padding: 0 0.7rem;
}

.education .line div {
    width: 2px;
    height: 100%;
    background: var(--borderColor);
    position: relative;
}

.education-info {
    margin: 0.6rem 0 1.4rem;
}

.education-years {
    margin-bottom: 3rem;
}

/* The dot on the line */
.education .line div:before {
    content: "";
    width: 15px;
    height: 15px;
    background: var(--borderColor);
    border-radius: 50%;
    position: absolute;
    left: -6px;
}

.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 1.5rem;
}

.skills-right {
    line-height: 2rem;
    padding: 0 1rem;
}

/* Contact Section */
#contact {
    padding: var(--sectionPadding);
}

.contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.contact-form div {
    margin-bottom: 1.4rem;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1.3rem;
    font-family: "Roboto", sans-serif;
    background: var(--seconddaryBackgroundColor);
    border: 1px solid var(--borderColor);
    border-radius: 3px;
    resize: none;
}

.contact-form input::placeholder, 
.contact-form textarea::placeholder {
    color: #9d9fa1;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border: 1px solid #7d7d7d;
}

.btn-submit {
    width: 100%;
    padding: .75rem 1.3rem;
    background-color: var(--primaryIconColor);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

.btn-submit:hover {
    background-color: var(--primaryIconColorHover);
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-item-form {
    background: var(--thirdBackgroundColor);
    width: 53px;
    height: 53px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-item-icon svg {
    fill: var(--primaryIconColor);
}

.contact-item-detail h4 {
    margin-bottom: 0.6rem;
}

/* Footer Section */

footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--borderColor);
    font-size: 0.9rem;
    background: var(--seconddaryBackgroundColor);
}


.footer-icons {
    margin-bottom: 1rem;
}

.footer-icons a {
    margin: 0 0.5rem;
}

.footer-icons svg {
    fill: #3e3f40;
}

.footer-icons a:hover svg {
    fill: #000;

}

/* === PORTFOLIO OVERRIDE (SAFE, TANPA HAPUS KODE LAMA) === */

#portofolio .portofolio {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
    margin-bottom: 4rem;
}

/* Judul tidak sejajar ke samping lagi */
#portofolio .portofolio-tittle {
    display: block;
}

/* Media selalu di tengah dan responsif */
#portofolio .portofolio img,
#portofolio .portofolio video {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: var(--itemBorderRadius);
}

/* Lebar bacaan teks biar enak dibaca */
#portofolio .portofolio-info {
    padding: 0;
    max-width: 65ch;
    margin: 0 auto;
}

#portofolio .portofolio-info p {
    line-height: 1.8;
}

/* === ENHANCED BACKGROUND (RICH BUT CALM) === */

body {
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f3f1ff 45%,
            #ffffff 100%
        );
    position: relative;
    overflow-x: hidden;
}

/* Soft color blob top-right */
body::before {
    content: "";
    position: fixed;
    top: -220px;
    right: -220px;
    width: 520px;
    height: 520px;
    background: radial-gradient(
        circle at center,
        rgba(124, 108, 242, 0.28),
        rgba(124, 108, 242, 0.08),
        transparent 70%
    );
    z-index: -1;
    animation: floatSlow 18s ease-in-out infinite;
}

/* Soft color blob bottom-left */
body::after {
    content: "";
    position: fixed;
    bottom: -240px;
    left: -240px;
    width: 460px;
    height: 460px;
    background: radial-gradient(
        circle at center,
        rgba(124, 108, 242, 0.22),
        rgba(124, 108, 242, 0.06),
        transparent 70%
    );
    z-index: -1;
    animation: floatSlowReverse 22s ease-in-out infinite;
}

/* Subtle floating animation */
@keyframes floatSlow {
    0%   { transform: translate(0, 0); }
    50%  { transform: translate(-30px, 20px); }
    100% { transform: translate(0, 0); }
}

@keyframes floatSlowReverse {
    0%   { transform: translate(0, 0); }
    50%  { transform: translate(25px, -20px); }
    100% { transform: translate(0, 0); }
}

#experience {
    padding: var(--sectionPadding);
}

.experience-content {
    max-width: 720px;
}

.experience-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.experience-list {
    list-style: disc;
    padding-left: 1.5rem;
    line-height: 1.8;
}

/* Hentikan garis dan hapus ikon di item education terakhir */
.education:last-child .line {
    height: 0;
}

.education:last-child .line::after {
    display: none;
}

.education:last-child .line div {
    display: none;
}

/* ===== JUDUL KECIL CENTER DENGAN GARIS SIMETRIS ===== */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.section-label::before,
.section-label::after {
    content: "";
    width: 30px;
    height: 1px;
    background: var(--borderColor);
}

/* pastikan pembungkusnya center */

.pre-tittle {
    display: flex;
    justify-content: center;
    text-align: center;
}


.section-label {
    transform: translateX(-1px);
}

.section-label::before,
.section-label::after {
    width: 28px;
}

/* ===== RAPATKAN JUDUL PORTOFOLIO ===== */

/* jarak dari "PORTOFOLIO 1" ke judul video */
#portofolio .pre-tittle {
    margin-bottom: 4px;
}

/* jarak dari judul video ke media (video / image) */
#portofolio h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

/* jarak media ke teks deskripsi */
#portofolio video,
#portofolio img {
    margin-top: 0;
}


.portfolio-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* ===== FIX FINAL VIDEO DRIVE (ANTI FULL LAYAR) ===== */
.video-wrapper {
  width: 100%;
  max-width: 800px;   /* SAMA DENGAN LEBAR IMAGE PORTOFOLIO */
  height: 450px;      /* 16:9 dari 800px */
  margin: 0 auto;
  border-radius: var(--itemBorderRadius);
  overflow: hidden;
  background: #000;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  position: static;
}

#portofolio .portofolio img {
  width: 100%;
  max-width: 800px;
  height: 450px;
  object-fit: cover;
  margin: 0 auto;
  display: block;
  border-radius: var(--itemBorderRadius);
}

/* ===============================
   FINAL MOBILE FIX
   =============================== */
@media screen and (max-width: 825px) {

  /* NAV */
  .burger {
    display: block;
  }

  nav {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    flex-direction: column;
    background: var(--primaryBackgroundColor);
    border-left: 1px solid var(--borderColor);
    z-index: 9;
    transform: translateX(100%);
    transition: 0.4s ease-in-out;
  }

  nav ul {
    height: 100vh;
    align-items: center;
    flex-direction: column;
    justify-content: center;
  }

  /* HERO */
  #hero {
    grid-template-columns: 1fr;
    height: fit-content;
  }

  .hero-right {
    order: -1;
  }

 .hero-right img {
    width: 100%;
    max-width: 480px;
    height: auto;
}
  /* SKILLS */
  .skills-grid {
    grid-template-columns: 1fr;
  }

}

/* ======================================
         HERO IMAGE FINAL OVERRIDE 
   ====================================== */

/* PASTIKAN HERO TIDAK MEMOTONG ISI */
#hero {
  overflow: visible !important;
  align-items: center;
}

/* WRAPPER KANAN HERO */
.hero-right {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: visible !important;
}

/* GAMBAR HERO DESKTOP */
.hero-right img {
  width: auto !important;
  max-width: 520px !important;
  height: auto !important;
  max-height: 80vh !important;
  object-fit: contain !important;
}

/* MOBILE FIX TETAP AMAN */
@media screen and (max-width: 825px) {
  .hero-right img {
    max-width: 320px !important;
    max-height: none !important;
  }
}

/* ======================================
   PORTFOLIO MEDIA FINAL FIX (ANTI POTONG)
   ====================================== */

/* Wrapper portfolio media */
.portfolio-media,
.portofolio img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block;
}

/* Samakan tinggi visual portfolio 1 & 2 */
.portofolio {
  display: flex;
  flex-direction: column;
}

/* Wrapper khusus video & image agar sejajar */
.video-wrapper,
.portofolio img {
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

/* Cegah container memotong */
.portofolio {
  overflow: visible !important;
}

/* Mobile tetap rapi */
@media screen and (max-width: 825px) {
  .video-wrapper,
  .portofolio img {
    max-width: 100%;
  }
}

.menu-toggle,
.hamburger {
  pointer-events: auto !important;
  z-index: 100000;
  position: relative;
}
