
/* ========================================
   1. PENGATURAN DASAR
======================================== */
:root {
    --bg: #ffffff;
    --surface: #f7f7fa;
    --surface-strong: #efedf5;
    --text: #191922;
    --muted: #696977;
    --border: #e5e4ea;
    --primary: #854cf6;
    --primary-dark: #6c2fe0;
    --primary-soft: #eee6ff;
    --shadow: 0 18px 55px rgba(43, 25, 77, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition: background .25s, color .25s;
}

body.dark-theme {
    --bg: #15141b;
    --surface: #201e29;
    --surface-strong: #2a2636;
    --text: #f5f3fa;
    --muted: #b2afc0;
    --border: #383343;
    --primary: #a982ff;
    --primary-dark: #8c5bfa;
    --primary-soft: #332747;
    --shadow: 0 18px 55px rgba(0, 0, 0, .2);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.hidden {
    display: none !important;
}

/* ========================================
   2. NAVBAR DAN MENU
======================================== */
.navbar {
    min-height: 88px;
    padding: 15px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1.5px;
    white-space: nowrap;
}

.logo span,
.hero h1 span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.3vw, 34px);
}

.nav-links a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    border-color: var(--primary);
}

.theme-toggle,
.menu-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 22px;
    flex-shrink: 0;
}

.menu-toggle {
    display: none;
}

/* ========================================
   3. BAGIAN UMUM SECTION
======================================== */
.section {
    padding: 100px 6%;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 42px;
}

.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin-bottom: 16px;
}

.section-heading h2,
.contact-box h2 {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.2;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
}

.section-heading > p {
    color: var(--muted);
    font-size: 16px;
    max-width: 630px;
}

/* ========================================
   4. HERO / HOME
======================================== */
.hero {
    min-height: 650px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 55px;
    overflow: hidden;
}

.hero-text {
    max-width: 660px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #36b87b;
    margin-right: 7px;
}

.hero h1 {
    font-size: clamp(43px, 5.3vw, 70px);
    line-height: 1.12;
    letter-spacing: -3px;
    margin-bottom: 16px;
}

.hero h2 {
    font-size: clamp(19px, 2.2vw, 27px);
    margin-bottom: 18px;
    font-weight: 600;
}

.hero-text > p {
    color: var(--muted);
    font-size: 16px;
    max-width: 630px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 21px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-weight: 700;
    transition: transform .2s, background .2s, box-shadow .2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(133, 76, 246, .18);
}

.btn-primary:hover {
    box-shadow: 0 14px 30px rgba(133, 76, 246, .28);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.hero-social {
    margin-top: 34px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
}

.hero-social span {
    color: var(--muted);
}

.hero-social a {
    color: var(--primary);
    font-weight: 700;
}

/* Foto profil */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
}

.photo-frame {
    position: relative;
    z-index: 2;
    width: min(100%, 340px);
    height: 410px;
    overflow: hidden;
    border: 8px solid var(--bg);
    border-radius: 35px;
    box-shadow: var(--shadow);
    background: var(--surface);
}

.profile-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.photo-decoration {
    position: absolute;
    width: 340px;
    height: 410px;
    border: 2px solid var(--primary);
    border-radius: 35px;
    transform: rotate(7deg);
    opacity: .5;
}

.floating-card {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    z-index: 4;
    bottom: 28px;
    left: -10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 14px 18px;
    box-shadow: var(--shadow);
}

.floating-icon {
    color: var(--primary);
    font-size: 28px;
}

.floating-card strong,
.floating-card small {
    display: block;
}

.floating-card strong {
    font-size: 13px;
}

.floating-card small {
    font-size: 11px;
    color: var(--muted);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-soft);
    z-index: 0;
}

.orb-one {
    width: 90px;
    height: 90px;
    top: 20px;
    right: 10px;
}

.orb-two {
    width: 48px;
    height: 48px;
    bottom: 15px;
    right: 12%;
}

/* ========================================
   5. ABOUT / TENTANG SAYA
======================================== */
.about-section,
.projects-section {
    background: var(--surface);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.about-card {
    padding: 30px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 22px;
}

.feature-icon {
    width: 53px;
    height: 53px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 24px;
    margin-bottom: 22px;
}

.about-card h3 {
    margin-bottom: 10px;
    font-size: 19px;
}

.about-card p {
    color: var(--muted);
    font-size: 14px;
}

/* Profil singkat About */
.about-intro {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 30px;
    margin-bottom: 25px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 22px;
}

.about-intro-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 28px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 17px;
}

.about-intro h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.about-intro p {
    color: var(--muted);
    font-size: 15px;
}

/* Pengalaman UKM Musik KMM */
.organization-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 32px;
    margin-bottom: 55px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 22px;
}

.organization-info {
    max-width: 760px;
}

.organization-info .eyebrow {
    margin-bottom: 8px;
}

.organization-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.organization-info p {
    color: var(--muted);
    font-size: 15px;
}

.organization-icon {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 25px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 55px;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.experience-tags span {
    padding: 7px 12px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

/* Galeri dokumentasi UKM dan konser */
.experience-heading {
    margin-bottom: 25px;
}

.experience-heading h3 {
    font-size: 26px;
    margin-bottom: 8px;
}

.experience-heading p {
    color: var(--muted);
    font-size: 15px;
}

.experience-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.experience-photo-card {
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 22px;
    transition: transform .25s, box-shadow .25s;
}

.experience-photo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.experience-photo {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--surface-strong);
}

.experience-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s;
}

.experience-photo-card:hover .experience-photo img {
    transform: scale(1.04);
}

.experience-caption {
    padding: 23px;
}

.photo-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.experience-caption h4 {
    font-size: 19px;
    margin-bottom: 7px;
}

.experience-caption p {
    color: var(--muted);
    font-size: 14px;
}

/* ========================================
   6. EDUCATION / PENDIDIKAN
======================================== */
.timeline {
    max-width: 780px;
    border-left: 2px solid var(--border);
    margin-left: 9px;
    padding: 4px 0 4px 30px;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    left: -39px;
    top: 7px;
    border: 4px solid var(--primary);
    background: var(--bg);
    border-radius: 50%;
}

.timeline-content {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 27px;
    background: var(--surface);
}

.timeline-label {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.timeline-content h3 {
    margin: 8px 0;
    font-size: 22px;
}

.timeline-content p {
    font-weight: 600;
    margin-bottom: 7px;
}

.timeline-content small {
    color: var(--muted);
}

/* ========================================
   7. PROJECTS / PORTOFOLIO
======================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.project-card {
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 22px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.project-art {
    min-height: 205px;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.art-purple {
    background: linear-gradient(135deg, #8d5cf6, #5030a6);
}

.art-blue {
    background: linear-gradient(135deg, #4c90f5, #3547a0);
}

.art-pink {
    background: linear-gradient(135deg, #ed76b6, #7c43cc);
}

.project-art > span {
    font-size: 13px;
    font-weight: 700;
}

.art-symbol {
    text-align: center;
    font-size: 65px;
    font-weight: 800;
    opacity: .9;
}

.project-art small {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 800;
}

.project-info {
    padding: 23px;
}

.project-tag {
    display: inline-block;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
}

.project-info h3 {
    margin: 12px 0 7px;
    font-size: 19px;
}

.project-info p {
    color: var(--muted);
    font-size: 14px;
}

.section-note {
    margin-top: 22px;
    color: var(--muted);
    font-size: 12px;
}

/* ========================================
   8. CYBERPRENEURSHIP / MATERI
======================================== */
.materials-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.material-total {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.material-total strong {
    font-size: 23px;
}

.material-total span {
    color: var(--muted);
    font-size: 14px;
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.material-card {
    min-width: 0;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.material-card:hover {
    transform: translateY(-4px);
    border-color: #cbb5ff;
    box-shadow: var(--shadow);
}

.material-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 18px;
    font-size: 27px;
    margin-bottom: 25px;
}

.material-category {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.material-card h3 {
    font-size: 21px;
    line-height: 1.35;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
}

.material-card p {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 18px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.material-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    width: 100%;
}

.action-btn {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s;
}

.action-btn:hover {
    background: var(--primary-soft);
}

.action-read {
    color: var(--primary);
    border-color: transparent;
    padding-left: 0;
    background: transparent;
}

.action-edit {
    color: var(--primary);
}

.action-delete {
    color: #df4545;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 45px 20px;
    border: 1px dashed var(--border);
    border-radius: 18px;
}

/* ========================================
   9. CONTACT
======================================== */
.contact-section {
    background: var(--surface);
}

.contact-box {
    max-width: 760px;
    margin: auto;
    padding: 55px 35px;
    text-align: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.contact-box p {
    max-width: 560px;
    margin: 0 auto 25px;
    color: var(--muted);
}

.contact-note {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 12px;
}

/* ========================================
   10. FOOTER
======================================== */
.footer {
    padding: 27px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.back-to-top {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 22px;
    flex-shrink: 0;
}

/* ========================================
   11. MODAL TAMBAH, EDIT, BACA MATERI
======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 10, 22, .65);
    backdrop-filter: blur(5px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 600px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 24px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: 0 25px 90px rgba(0, 0, 0, .25);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 22px;
}

.modal-header h2 {
    font-size: 25px;
    line-height: 1.3;
}

.modal-close {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 25px;
    line-height: 1;
}

#materialForm label {
    display: block;
    margin: 16px 0 7px;
    font-size: 13px;
    font-weight: 700;
}

#materialForm input,
#materialForm textarea,
#materialForm select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: var(--surface);
    outline: none;
}

#materialForm textarea {
    resize: vertical;
}

#materialForm input:focus,
#materialForm textarea:focus,
#materialForm select:focus {
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.read-panel h2 {
    font-size: 29px;
    line-height: 1.3;
    margin-bottom: 18px;
    overflow-wrap: anywhere;
}

.read-content {
    color: var(--muted);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.9;
    margin-bottom: 25px;
}

/* ========================================
   12. ANIMASI SCROLL
======================================== */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   13. RESPONSIVE TABLET
======================================== */
@media (max-width: 1100px) {
    .navbar {
        padding: 15px 4%;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 12px;
    }

    .section {
        padding: 80px 5%;
    }

    .material-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ========================================
   14. RESPONSIVE HP / MOBILE
======================================== */
@media (max-width: 820px) {
    .navbar {
        min-height: 75px;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        padding: 18px 6% 25px;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 0;
        font-size: 14px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
        padding-top: 65px;
    }

    .hero-text {
        margin: auto;
    }

    .hero-actions,
    .hero-social {
        justify-content: center;
    }

    .hero-visual {
        min-height: 400px;
    }

    .photo-frame {
        height: 360px;
        width: 290px;
    }

    .photo-decoration {
        width: 290px;
        height: 360px;
    }

    .floating-card {
        left: 2%;
        bottom: 20px;
    }

    .about-grid,
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ========================================
   15. RESPONSIVE HP KECIL
======================================== */
@media (max-width: 560px) {
    .section {
        padding: 65px 5%;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero-text > p,
    .section-heading > p {
        font-size: 15px;
    }

    .about-grid,
    .project-grid,
    .material-grid {
        grid-template-columns: 1fr;
    }

    .about-card,
    .material-card {
        padding: 23px;
    }

    .about-intro {
        flex-direction: column;
        padding: 23px;
    }

    .organization-card {
        flex-direction: column-reverse;
        align-items: flex-start;
        padding: 23px;
    }

    .organization-icon {
        width: 72px;
        height: 72px;
        font-size: 40px;
    }

    .experience-gallery {
        grid-template-columns: 1fr;
    }

    .experience-photo {
        height: 250px;
    }

    .experience-heading h3 {
        font-size: 23px;
    }

    .materials-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .materials-toolbar .btn {
        width: 100%;
    }

    .material-card {
        min-height: 280px;
    }

    .modal-panel {
        padding: 22px;
    }

    .contact-box {
        padding: 38px 20px;
    }

    .footer {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer p {
        order: 3;
        width: 100%;
    }

    .back-to-top {
        margin-left: auto;
    }
}

/* ========================================
   16. AKSESIBILITAS ANIMASI
======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
