@import url('https://fonts.googleapis.com/css?family=Poppins');

/* =====================
   CSS VARIABLES / THEMES
   ===================== */
:root {
    --bg: #ffffff;
    --text: #000000;
    --text-inv: #ffffff;
    --header-bg-scroll: #ffffff;
    --header-color-scroll: #000000;
    --input-color: #000000;
    --placeholder-color: #000000;
    --footer-bg: transparent;
    --loading-bg: #ffffff;
    --scrollbar-thumb: #000000;
    --floating-bg: #ffffff;
    --floating-border: #e0e0e0;
    --floating-shadow: rgba(0,0,0,0.12);
    --floating-text: #333333;
}

[data-theme="dark"] {
    --bg: #121212;
    --text: #e0e0e0;
    --text-inv: #ffffff;
    --header-bg-scroll: #1e1e1e;
    --header-color-scroll: #e0e0e0;
    --input-color: #e0e0e0;
    --placeholder-color: #888888;
    --footer-bg: transparent;
    --loading-bg: #121212;
    --scrollbar-thumb: #555555;
    --floating-bg: #1e1e1e;
    --floating-border: #333333;
    --floating-shadow: rgba(0,0,0,0.4);
    --floating-text: #e0e0e0;
}

/* =====================
   BASE
   ===================== */
body {
    font-family: 'Poppins', sans-serif;
    padding: 0px;
    margin: 0px;
    max-width: 100vw;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* =====================
   LOADING
   ===================== */
#loading {
    width: 100vw;
    height: 100vh;
    position: fixed;
    background: var(--loading-bg);
    z-index: 999;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    transition: background 0.4s ease;
}
#spinner {
    animation: rotate 0.56s infinite linear;
    width: 50px;
    height: 50px;
    border: 12px solid #5478FF;
    border-bottom: 12px solid transparent;
    border-radius: 50%;
    margin: 0;
}
@keyframes rotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =====================
   FLOATING CONTROLS
   ===================== */
#floating-controls {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
#floating-controls button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--floating-border);
    background: var(--floating-bg);
    color: var(--floating-text);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0px 4px 16px var(--floating-shadow);
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
#floating-controls button:hover {
    background: #5478FF;
    color: #fff;
    border-color: #5478FF;
    box-shadow: 0px 6px 20px #5478FFaa;
    transform: scale(1.08);
}
#floating-controls button:focus {
    outline: none;
}

/* =====================
   HEADER
   ===================== */
header {
    width: 92vw;
    padding: 6vh 4vw;
    position: fixed;
    font-weight: bold;
    background: transparent;
    color: #fff;
    transition: 0.4s ease-in-out;
    z-index: 2;
}
header table { width: 100%; }
#logo {
    width: 20%;
    font-size: 24px;
    color: #5478FF;
}
#navigation { width: 80%; text-align: right; }
#navigation a {
    color: inherit;
    text-decoration: none;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
    margin-left: 4vw;
    transition: 0.4s ease-in-out;
}
#navigation a:hover { border-bottom: 2px solid #fff; }

/* =====================
   MAGNIFY
   ===================== */
#magnify {
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    position: fixed;
    z-index: 4;
    display: none;
    flex-direction: column;
    justify-content: center;
}
#magnify h1 {
    position: absolute;
    top: 0; right: 0;
    margin: 20px 40px;
    color: #fff;
    transition: 0.4s ease-in-out;
}
#magnify h1:hover { color: #5478FF; cursor: pointer; }
#img_here {
    width: 90%; height: 90%;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    margin: 0px auto;
}

/* =====================
   HERO
   ===================== */
#top_part {
    width: 100%;
    border: 2vh solid var(--bg);
    transition: border-color 0.4s ease;
}
#top_part tr td { width: 50%; }
#about {
    width: 84% !important;
    height: 95vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 0px 8%;
}
#about h1 { font-size: 45px; word-wrap: break-word; }
#about table { width: 70%; margin-top: 4vh; }
#about table tr td { width: 20% !important; text-align: left; }

.social {
    color: #5478FF;
    font-size: 23px;
    padding: 12px 17px;
    border-radius: 50%;
    background: transparent;
    transition: 0.4s ease-in-out;
    font-weight: bold;
    margin: 0px 8px;
}
.social:hover {
    cursor: pointer;
    color: #fff;
    background: #5478FF;
    box-shadow: 0px 10px 30px #5478FFcc;
}
.btn_one {
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    color: #5478FF;
    background: var(--bg);
    border: 3px solid #5478FF;
    padding: 8px 40px;
    width: 35%;
    border-radius: 80px;
    font-weight: bold;
    margin: 2vh 0px;
    transition: 0.4s ease-in-out;
}
.btn_one:hover {
    box-shadow: 0px 10px 30px #5478FFcc;
    cursor: pointer;
    color: #fff;
    background: #5478FF;
}
#rightImage {
    width: 100%;
    height: 95vh;
    background: linear-gradient(0deg,#5478FFcc,#5479ff8a), url("https://www.adialamsyahardi.id/img/adi.jpg") center center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* =====================
   WORK
   ===================== */
#work {
    width: 92vw;
    padding: 6vh 4vw;
    font-weight: bold;
}
#work h1 {
    padding: 5px 0px;
    border-bottom: 4px solid #5478FF;
    width: 6%;
}
.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.slides {
    display: flex;
    transition: transform 0.5s ease;
}
.slide {
    min-width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 20px;
}
.slide img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    transition: 0.4s ease-in-out;
}
.slide img:hover { transform: scale(1.05); cursor: pointer; }
.slide h2 {
    margin: 10px 0;
    font-size: 24px;
    font-weight: bold;
}
.slide p {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
    font-weight: normal;
}
.slider .prev, .slider .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background 0.3s ease;
}
.slider .prev:hover, .slider .next:hover {
    background: rgba(0, 0, 0, 0.8);
}
.slider .prev { left: 10px; }
.slider .next { right: 10px; }
.dots {
    text-align: center;
    margin-top: 20px;
}
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: 0.3s ease;
}
.dot.active {
    background: #5478FF;
}
.dot:hover {
    background: #5478FF;
}

/* =====================
   BIO
   ===================== */
#bio {
    width: 92vw;
    padding: 6vh 4vw;
    font-weight: bold;
}
#bio h1 {
    padding: 5px 0px;
    border-bottom: 4px solid #5478FF;
    width: 8%;
}

/* =====================
   CONTACT
   ===================== */
#contact {
    width: 92vw;
    padding: 6vh 4vw;
}
#contact h1 {
    padding: 5px 0px;
    border-bottom: 4px solid #5478FF;
    width: 10%;
}
#contact table { width: 100%; }
#contact table tr td { width: 50%; }
#inner_div table { width: 100%; }
#inner_div table tr td { font-weight: bold; }
#inner_table tr td { padding: 10px 20px !important; }

#contact form { width: 100%; }
#contact form input {
    width: 96%;
    margin: 20px 1%;
    background: transparent;
    border: 0px;
    border-bottom: 3px solid #5478FF80;
    padding: 8px 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    transition: 0.4s ease-in-out;
    color: var(--input-color);
    font-weight: bold;
}
#contact form textarea {
    width: 96%;
    margin: 20px 1%;
    padding: 8px 10px;
    border: 0px;
    border-bottom: 3px solid #5478FF80;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    background: transparent;
    resize: none;
    transition: 0.4s ease-in-out;
    color: var(--input-color);
    font-weight: bold;
}
#contact form input:focus,
#contact form textarea:focus {
    outline: none;
    border-bottom: 3px solid #5478FF;
}

/* =====================
   ADDRESS & FOOTER
   ===================== */
#address { position: relative; top: -25px; left: 30px; }
#footer {
    width: 100%;
    padding: 10vh 0px;
    text-align: center;
    font-weight: bold;
}
#footer a { color: #5478FF; text-decoration: none; }

/* =====================
   MISC
   ===================== */
::placeholder { color: var(--placeholder-color); }
button:focus { outline: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.8); }

/* =====================
   DARK MODE OVERRIDES
   ===================== */
[data-theme="dark"] #contact form input,
[data-theme="dark"] #contact form textarea {
    color: var(--input-color);
}
[data-theme="dark"] ::placeholder {
    color: var(--placeholder-color);
}
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #2a2a2a;
}
[data-theme="dark"] .dot {
    background: #555;
}
[data-theme="dark"] .dot.active {
    background: #5478FF;
}
[data-theme="dark"] header.scrolled {
    background: var(--header-bg-scroll);
    color: var(--header-color-scroll);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1000px) {
    #rightImage { display: none; }
    #top_part { border: 0px; }
    #top_part tr td { width: 100%; text-align: center; }
    #about {
        width: 92% !important;
        height: 75vh;
        padding-top: 20vh !important;
        text-align: center;
        padding: 0px 4%;
    }
    #about table { width: 100%; margin-top: 6vh; }
    #about table tr td { text-align: center; }
    .btn_one {
        padding: 6px 30px;
        width: 60%;
        margin: 4vh auto;
        box-shadow: 0px 10px 20px #5478FFcc;
        background: #5478FF;
        color: #fff;
    }
    .btn_one:hover { box-shadow: 0px 10px 40px #5478FFcc; cursor: pointer; }
    #contact table tr td { width: 100%; display: block; }
    #inner_table tr td { padding: 10px 0px !important; }
    #contact form input { width: 90%; }
    #contact form textarea { width: 90%; }
    #work h1 { width: 19%; }
    #bio h1 { width: 25%; }
    #contact h1 { width: 33%; }
    header {
        width: 96vw;
        background: var(--header-bg-scroll) !important;
        color: var(--header-color-scroll) !important;
        padding: 4vh 2vw;
        position: absolute;
    }
    #header table tr td {
        width: 100%;
        display: block;
        text-align: center;
        padding: 15px 0px;
    }
    #navigation a { color: var(--header-color-scroll); }

    /* Floating button smaller on mobile */
    #floating-controls {
        bottom: 20px;
        right: 16px;
        gap: 8px;
    }
    #floating-controls button {
        width: 42px;
        height: 42px;
        font-size: 12px;
    }
}
