/* =========================
   RESET & GLOBAL
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --bg: #070b14;
    --bg-soft: #0b1220;
    --surface: rgba(15, 23, 42, 0.72);
    --text: #f1f5f9;
    --muted: #9aa8bc;
    --accent: #60a5fa;
    --accent-bright: #38bdf8;
    --border: rgba(148, 163, 184, 0.16);
    --glow: rgba(56, 189, 248, 0.16);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(ellipse at 15% 0%, rgba(37, 99, 235, 0.10), transparent 35%),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
}

/* =========================
   NAVBAR
========================= */
header {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    padding: 17px 6%;
    background: rgba(7, 11, 20, 0.78);
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

nav h2 {
    color: var(--text);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.8px;
    white-space: nowrap;
}

nav h2 span {
    color: var(--accent-bright);
}

nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.25s ease;
}

nav a:hover,
nav a:focus-visible {
    color: var(--accent-bright);
}

/* =========================
   HOME / HERO
========================= */
.home {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(35px, 6vw, 85px);
    padding: 135px 8% 85px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 82% 48%, rgba(56, 189, 248, 0.12), transparent 29%),
        radial-gradient(ellipse at 5% 80%, rgba(37, 99, 235, 0.08), transparent 30%),
        var(--bg);
}

.home::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.17;
    background-image: linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.home-text {
    flex: 1 1 580px;
    max-width: 720px;
    min-width: 0;
    text-align: left;
    z-index: 2;
    animation: fade-up 0.8s ease both;
}

/* TULISAN HALO, SAYA */

/* TULISAN HALO, SAYA */
.welcome {
    display: block;
    position: relative;
    width: fit-content;

    margin-bottom: 18px;
    color: #94a3b8;

    font-size: clamp(50px, 3,8vw, 70px);
    font-weight: 700;
    letter-spacing: 4px;

    opacity: 1;
    filter: none;
    animation: welcomeReveal 1s ease-out both;
    animation-delay: 0.2s;
}

/* ANIMASI MUNCUL */
@keyframes welcomeReveal {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Nama utama */
.home-text h1 {
    margin-bottom: 20px;
    color: #f1f5f9;
    font-size: clamp(38px, 5vw, 68px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -2px;
    overflow-wrap: anywhere;
}

/* Warna nama yang ditonjolkan */
.home-text h1 span {
    color: #38bdf8;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.home-text h1 span {
    color: var(--accent);
    text-shadow: 0 0 28px rgba(96, 165, 250, 0.18);
}

.home-text h3 {
    margin-bottom: 18px;
    color: #d5deea;
    font-size: clamp(16px, 1.7vw, 21px);
    font-weight: 600;
    line-height: 1.5;
}

.description {
    max-width: 560px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.9;
}

/* =========================
   HOME BUTTONS
========================= */
.home-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.button,
.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 23px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease,
                border-color 0.25s ease, box-shadow 0.25s ease;
}

.button {
    color: #07111f;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
    box-shadow: 0 8px 26px rgba(56, 189, 248, 0.16);
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.25);
}

.button-outline {
    color: #dbeafe;
    border: 1px solid rgba(96, 165, 250, 0.45);
    background: rgba(15, 23, 42, 0.38);
}

.button-outline:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    background: rgba(96, 165, 250, 0.10);
}

/* =========================
   PROFILE PHOTO
========================= */
.profile {
    position: relative;
    flex: 0 0 clamp(270px, 33vw, 410px);
    width: clamp(270px, 33vw, 410px);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fade-in 1s ease 0.15s both;
}

.profile-glow {
    position: absolute;
    width: 84%;
    height: 84%;
    border-radius: 50%;
    background: var(--accent-bright);
    opacity: 0.16;
    filter: blur(58px);
    pointer-events: none;
}

.profile-circle {
    position: relative;
    width: 82%;
    aspect-ratio: 1;
    padding: 5px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7dd3fc, #3b82f6 48%, #4338ca);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08),
                0 18px 55px rgba(37, 99, 235, 0.18);
    z-index: 1;
    animation: floating 5s ease-in-out infinite;
}

.profile-circle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--bg);
}

/* =========================
   SHARED SECTION STYLES
========================= */
section:not(.home) {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 6%;
}

.title {
    margin-bottom: 42px;
    color: var(--text);
    text-align: center;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -1px;
}

.title span {
    color: var(--accent-bright);
}

/* =========================
   ABOUT
========================= */
.card {
    padding: 30px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48));
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.42);
    background: rgba(15, 23, 42, 0.9);
}

.card h3 {
    margin-bottom: 12px;
    color: var(--accent-bright);
    font-size: 19px;
}

.card p {
    color: var(--muted);
    line-height: 1.85;
}

/* =========================
   SKILLS
========================= */
.skills {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.skill {
    padding: 25px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.skill:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
}

.skill h3 {
    margin-bottom: 10px;
    color: var(--accent-bright);
    font-size: 17px;
}

.skill p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

/* =========================
   PROJECTS
========================= */
.projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.project {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.project h3 {
    margin-bottom: 10px;
    color: var(--accent-bright);
    font-size: 18px;
}

.project p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

/* =========================
   CONTACT
========================= */
.contact-subtitle {
    max-width: 620px;
    margin: -20px auto 38px;
    color: var(--muted);
    text-align: center;
    line-height: 1.8;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 23px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(15, 23, 42, 0.92);
}

.contact-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--accent-bright);
    background: rgba(56, 189, 248, 0.10);
    font-size: 24px;
    transition: transform 0.25s ease, background 0.25s ease;
}

.contact-card:hover .contact-icon {
    transform: scale(1.06);
    background: rgba(56, 189, 248, 0.18);
}

.contact-card h3 {
    margin-bottom: 4px;
    color: var(--text);
    font-size: 16px;
}

.contact-card p {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}/* ===== KONTAK DI TENGAH ===== */

#contact {
    width: 100%;
    min-height: 100vh;
    padding: 120px 8% 80px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

/* Judul kontak */
#contact .title {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

/* Deskripsi kontak */
.contact-subtitle {
    max-width: 650px;
    margin: 0 auto 40px;
    text-align: center;
    line-height: 1.8;
    color: #9aa8bc;
}

/* Semua kartu kontak */
.contact-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;

    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 25px;
}

/* Isi kartu kontak */
.contact-card {
    flex: 1 1 250px;
    max-width: 300px;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px 20px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.2);

    transition: 0.3s ease;
}

/* Efek saat kursor diarahkan */
.contact-card:hover {
    transform: translateY(-8px);
    border-color: #38bdf8;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.12);
}

/* Ikon kontak */
.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

/* Tampilan HP */
@media (max-width: 600px) {
    #contact {
        padding: 100px 20px 60px;
    }

    .contact-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
        max-width: 350px;
    }
}

/* =========================
   FOOTER
========================= */
footer {
    padding: 28px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #8190a5;
    text-align: center;
    font-size: 13px;
}

/* =========================
   ANIMATIONS
========================= */
@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

/* =========================
   TABLET
========================= */
@media (max-width: 1000px) {
    .home {
        gap: 30px;
        padding-left: 6%;
        padding-right: 6%;
    }

    .profile {
        flex-basis: clamp(260px, 32vw, 340px);
        width: clamp(260px, 32vw, 340px);
    }

    .skills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .projects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 800px) {
    header {
        padding: 15px 5%;
    }

    nav ul {
        display: none;
    }

    .home {
        min-height: auto;
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding: 125px 7% 70px;
        text-align: center;
    }

    .home-text {
        flex: auto;
        width: 100%;
        max-width: 650px;
        text-align: center;
    }

    .welcome {
        font-size: 11px;
        letter-spacing: 4px;
    }

    .home-text h1 {
        font-size: clamp(36px, 8vw, 54px);
        letter-spacing: -1.8px;
    }

    .home-text h3 {
        font-size: 17px;
    }

    .description {
        margin-left: auto;
        margin-right: auto;
        font-size: 15px;
    }

    .home-buttons {
        justify-content: center;
    }

    .profile {
        flex: 0 0 auto;
        width: min(72vw, 320px);
    }

    .profile-circle {
        width: 82%;
    }

    section:not(.home) {
        padding: 78px 6%;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    nav h2 {
        font-size: 21px;
    }

    .home {
        padding-top: 115px;
        gap: 25px;
    }

    .home-text h1 {
        font-size: clamp(33px, 9vw, 43px);
        letter-spacing: -1.4px;
    }

    .home-text h3 {
        font-size: 16px;
    }

    .description {
        font-size: 14px;
        line-height: 1.8;
    }

    .home-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .button,
    .button-outline {
        width: 100%;
    }

    .profile {
        width: min(68vw, 260px);
    }

    .skills,
    .projects {
        grid-template-columns: 1fr;
    }

    .card,
    .skill,
    .project {
        padding: 23px;
    }

    .contact-card {
        padding: 18px;
        gap: 14px;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ANIMASI MENGETIK */
.welcome {
    display: inline-block;
    margin-bottom: 18px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    border-right: 2px solid #38bdf8;
    animation:
        typing 3s steps(16, end) forwards,
        cursor 0.7s step-end infinite;
}

/* Efek tulisan diketik */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 16ch;
    }
}

/* Efek kursor berkedip */
@keyframes cursor {
    50% {
        border-color: transparent;
    }
}
/* INTRO SCREEN */
#intro-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    justify-content: center;
    align-items: center;

    background:
        radial-gradient(
            circle at center,
            rgba(56, 189, 248, 0.12),
            transparent 45%
        ),
        #070b14;

    transition:
        opacity 0.8s ease,
        visibility 0.8s ease;
}

#intro-screen.intro-hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-content {
    width: 90%;
    max-width: 520px;
    text-align: center;
    animation: introAppear 1s ease both;
}

/* RUANG 3D INTRO */
.intro-content {
    perspective: 1200px;
}

/* KARTU FOTO 3D */
.intro-logo {
    position: relative;
    isolation: isolate;

    width: 260px;
    height: 320px;
    margin: 0 auto 40px;

    padding: 8px;
    border: 1px solid rgba(125, 211, 252, 0.9);
    border-radius: 24px;

    background: linear-gradient(
        135deg,
        #67e8f9 0%,
        #164e63 20%,
        #0b1220 50%,
        #0284c7 100%
    );

    box-shadow:
        15px 20px 0 -8px #10253b,
        20px 28px 35px rgba(0, 0, 0, 0.65),
        0 0 35px rgba(56, 189, 248, 0.3),
        inset 0 0 15px rgba(125, 211, 252, 0.35);

    transform-style: preserve-3d;
    animation: cardFloat3D 5s ease-in-out infinite;
}

/* FOTO PERSEGI, BUKAN LINGKARAN */
.intro-logo img {
    position: relative;
    z-index: 1;

    width: 100%;
    height: 100%;
    display: block;

    border-radius: 17px;
    object-fit: cover;
    object-position: center;

    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* LAPISAN KACA 3D */
.intro-logo::before {
    content: "";
    position: absolute;

    inset: -9px;
    z-index: -1;

    border: 1px solid rgba(56, 189, 248, 0.7);
    border-radius: 28px;

    background: linear-gradient(
        145deg,
        rgba(56, 189, 248, 0.18),
        transparent 45%,
        rgba(14, 165, 233, 0.12)
    );

    transform: translateZ(-25px) rotate(5deg);
}

/* CAHAYA DI BELAKANG KARTU */
.intro-logo::after {
    content: "";
    position: absolute;

    inset: 15%;
    z-index: -2;

    background: #0ea5e9;
    filter: blur(55px);
    opacity: 0.4;
    transform: translateZ(-40px);
}

/* ANIMASI MELAYANG 3D */
@keyframes cardFloat3D {
    0%, 100% {
        transform: translateY(0)
                   rotateY(-5deg)
                   rotateX(2deg);
    }

    50% {
        transform: translateY(-12px)
                   rotateY(5deg)
                   rotateX(-1deg);
    }
}

/* UKURAN UNTUK HP */
@media (max-width: 480px) {
    .intro-logo {
        width: 210px;
        height: 260px;
    }
}

/* HORMATI PENGATURAN REDUKSI ANIMASI */
@media (prefers-reduced-motion: reduce) {
    .intro-logo {
        animation: none;
    }
}


.loading-info {
    display: flex;
    justify-content: space-between;
    margin-top: 55px;
    margin-bottom: 12px;

    color: #38bdf8;
    font-size: 11px;
    letter-spacing: 2px;
}

.loading-bar {
    width: 100%;
    height: 3px;
    overflow: hidden;
    background: #1e293b;
    border-radius: 10px;
}

#loading-progress {
    width: 0%;
    height: 100%;
    background: #38bdf8;
    box-shadow: 0 0 15px #38bdf8;
}

.intro-footer {
    margin-top: 20px;
    color: #64748b;
    font-size: 9px;
    letter-spacing: 2px;
}

@keyframes introAppear {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .intro-name {
        font-size: 10px;
        letter-spacing: 3px;
    }

    .intro-small {
        letter-spacing: 4px;
    }
}/* ===== KONTAK MODERN ===== */

#contact {
    min-height: 100vh;
    padding: 120px 8% 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#contact .title {
    margin-bottom: 18px;
    text-align: center;
}

.contact-subtitle {
    max-width: 650px;
    margin: 0 auto 45px;
    color: #9aa8bc;
    line-height: 1.8;
    text-align: center;
}

.contact-container {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 25px;
}

.contact-card {
    flex: 1 1 250px;
    max-width: 310px;
    padding: 35px 22px;
    border-radius: 22px;
    text-decoration: none;
    color: #f1f5f9;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;

    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);

    transition: transform 0.35s ease,
                border-color 0.35s ease,
                box-shadow 0.35s ease;
}

.contact-icon {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;

    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    font-size: 38px;

    transition: 0.35s ease;
}

.contact-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.contact-card p {
    color: #9aa8bc;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 22px;
}

.contact-link {
    color: #60a5fa;
    font-size: 14px;
    font-weight: 700;
}

/* Warna logo */
.whatsapp .contact-icon {
    color: #25D366;
}

.instagram .contact-icon {
    color: #E879F9;
}

.email .contact-icon {
    color: #38BDF8;
}

/* Efek hover */
.contact-card:hover {
    transform: translateY(-10px);
    border-color: #38bdf8;
    box-shadow: 0 15px 40px rgba(56, 189, 248, 0.12);
}

.contact-card:hover .contact-icon {
    transform: scale(1.08);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.15);
}

/* Tampilan HP */
@media (max-width: 600px) {
    #contact {
        padding: 100px 20px 60px;
    }

    .contact-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
        max-width: 350px;
    }
}
