/* In 2025, I changed the style of the website to be more elegant but lightweight for any device */
/* Author: rezky_nightly 2025 */

:root {
  /* Font Settings */
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'liga' 1, 'calt' 1; /* Fix Chrome */

  /* Background Colors */
  --main-bg-color: #070a1c; /* Deep Space Blue */
  --secondary-bg-color: #040717; /* Dark Galactic Black */
  --accent-bg-color: #1b1f3a; /* Distant Nebula Blue */

  /* Plasma & Glow Colors */
  --plasma-blue: #4285f4; /* Electric Plasma Blue */
  --plasma-purple: #9b59b6; /* Cosmic Purple */
  --star-glow: #f4e542; /* Soft Yellow Star Glow */
  --nebula-glow: #7f7fd5; /* Ethereal Nebula Glow */

  /* Text Colors */
  --text-color: #e0e0e0; /* Soft White */
  --subtext-color: #c5c8e6; /* Light Bluish White */

  /* Borders & Shadows */
  --border-color: rgba(66, 133, 244, 0.5); /* Subtle Plasma Blue */
  --shadow-color: rgba(7, 10, 28, 0.7); /* Deep Space Shadow */

  /* Button Gradient */
  --button-gradient: linear-gradient(135deg, var(--plasma-blue), var(--plasma-purple));

  /* Container */
  --container-bg: rgba(15, 20, 40, 0.85);
  --container-border: rgba(255, 255, 255, 0.15);
    --icon-1: rgba(128, 128, 128); /* Neutral icon color */
}

/* Variable Font Support */
@supports (font-variation-settings: normal) {
    :root {
        font-family: InterVariable, sans-serif;
    }
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit; /* Warisi dari :root */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    scroll-behavior: smooth;
    height: auto;
    overflow: auto;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color:  var(--text-color);
    background-color: var(--container-bg);
    background-size: cover;
    padding: 20px 0 140px 0;
    position: relative;
    overflow: hidden; /* Prevent scrollbar issues with ::before pseudo-element */
    font-size: clamp(14px, 2vw, 18px); /* Min 14px, max 18px, skala responsif */
    padding: min(5vw, 20px); /* Gunakan nilai terkecil antara 5% viewport atau 20px */
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 40% 80%, var(--main-bg-color) 10%, var(--accent-bg-color) 40%, var(--secondary-bg-color) 100%);
    z-index: -1;
    transition: background-position 3s ease-in-out;
}

#homeButton {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--container-bg);
    color: var(--text-color);
    border: 1px solid var(--container-border);
    padding: 16px 18px;
    border-radius: 50%;
    border-left: 2px solid var(--container-border);
    border-top: 2px solid var(--container-border);
    cursor: pointer;
    font-size: 28px;
    z-index: 1000;
}

#homeButton:hover {
    background: green;
    border-color: white;
}

.container {
    max-width: 1000px;
    width: 100%;
}

header {
    position: relative;
    background: url('../assets/health1.jpg') center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 20px 50px 20px 50px;
    color: var(--text-color);
    text-align: center;
    border-radius: 1rem;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    margin: 80px 0 120px 0;
    overflow: hidden;
    filter: brightness(80%);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

header * {
    position: relative; /* Ensure the text and other elements are positioned above the overlay */
    z-index: 2; /* Ensure text and elements are above the overlay */
}

header .category {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}

header .info .tags i {
    font-size: 24px;
    margin-right: 8px;
}

header .info .tags span {
    font-size: 2.5rem;
    font-weight: 400;
}

header .info .title {
    margin: 20px 0;
    font-size: 3rem;
    font-weight: bold;
}

header .info .subtitle,
header .info .subtitle2 {
    max-width: 70%;
    margin: 0 auto;
    font-size: 1.2rem;
    text-align: center;
}

.details {
    background : var(--container-bg);
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 50px;
    padding: 20px;
    border-radius: 1rem;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    color: var(--text-color);
    overflow: hidden;
}

.details::before {
    content: ''; /* Required for pseudo-elements */
    position: absolute; /* Position it absolutely within the header */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--container-bg); /* Color the overlay */
    z-index: 1; /* Place it above the image but below the text */
}

.details * {
    position: relative; /* Ensure the text and other elements are positioned above the overlay */
    z-index: 2; /* Ensure text and elements are above the overlay */
}

.details .item {
    flex: 1 1 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.details .item span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.details .item .item-data {
    font-size: 1.2rem;
    font-weight: normal;
}

.details .item .item-text {
    margin-top: 12px;
    font-size: 1.5rem;
}

@media screen and (max-width: 768px) {
    header {
        padding: 10px 20px;
        min-height: 300px;
    }

    header .category {
        font-size: 0.9rem;
    }

    header .info .title {
        font-size: 2.2rem;
    }

    header .info .subtitle,
    header .info .subtitle2 {
        font-size: 0.8rem;
    }

    .details {
        flex-direction: column;
        padding: 15px;
    }

    .details .item {
        flex: 1 1 100%;
        margin-bottom: 30px;
    }

}

@keyframes pulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}


/* other styles */

hr{
    height: 1px;
    width: 70%;
    margin: 60px auto 60px auto;
    border-radius: 1rem;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
}

/* Custom Styling */

.fa-champagne-glasses {
    color: purple;
    font-size: 1.2rem;
}

.fa-copyright{
    color: rgba(0, 128, 0, 0.8);
    font-size: 1.2rem;
}

.fa-heart-circle-check {
    color: rgba(255, 0, 0, 0.8);
    font-size: 1.2rem;
}

.fa-envelope {
    color: rgba(255, 255, 0, 0.8);
    font-size: 1.2rem;
}

.fa-github {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.fa-people-group {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.fa-box-open {
    color: rgba(210, 105, 30, 0.8);
    font-size: 1.2rem;
}

.anonymous p {
    font-size: 0.9rem;
    margin: 5px;
    color: grey;
}

footer {
    width: 50%; /* Set the desired width */
    max-width: 1000px; /* Optional: Limit the maximum width */
    min-width: 300px; /* Optional: Set a minimum width */
    margin: 120px auto; /* Center the footer horizontally */
    color: var(--text-color);
    background: var(--container-bg);
    border-radius: 1rem;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    text-align: center; /* Center text for better readability */
    padding: 20px; /* Optional: Add padding for better content spacing */
}


article {
    width: 100%; /* Ensure full width scaling */
    max-width: 1000px; /* Set a max-width for readability on large screens */
    min-width: 300px; /* Prevent too small article width on small devices */
    margin: 120px auto 100px auto; /* Center and add spacing at the bottom */
    line-height: 1.8; /* Increase line spacing for better readability */
    color: var(--text-color); /* Set text color to white */
    background: var(--container-bg); /* Set a dark background */
    border-radius: 1rem;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
    text-align: center; /* Left-align for better flow in longer articles */
    padding: 30px 40px; /* More padding for spacious layout */
}

article h3,
article h4 {
    margin: 20px 0;
}

article h3 {
    font-size: 2rem; /* Slightly larger heading for emphasis */
    font-weight: 600; /* Bold the heading */
    color: var(--text-color); /* Set heading color to white */
}

article h4 {
    font-size: 1.3rem; /* Slightly larger subheading */
    font-weight: 500;
    color: var(--text-color); /* Set subheading color to white */
}

article p {
    font-size: 1.1rem; /* Slightly larger for readability */
    max-width: 800px; /* Restrict the paragraph width */
    margin: 0 auto 20px auto; /* Center text and add spacing */
    background: var(--container-bg); /* Set a dark background */
    padding: 20px; /* Add padding for spacious content */
    border-radius: 1rem;
    border-top: 1px solid var(--container-border);
    border-left: 1px solid var(--container-border);
    border-right: 1px solid var(--container-border);
}

article blockquote {
    margin: 40px auto;
    background: var(--container-bg); /* Set a dark background */
    padding: 30px;
    border-radius: 16px;
    font-style: italic;
    border-right: 4px solid var(--container-border); /* Add a subtle border */
    border-top: 2px solid var(--container-border);
    max-width: 90%; /* Widen the blockquote for more content */
    color: var(--text-color); /* Set text color to white */
    text-align: left; /* Left-align blockquote */
    font-size: 1rem;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    article h3 {
        font-size: 1.8rem; /* Adjust heading size for mobile */
    }

    article h4 {
        font-size: 1.1rem; /* Adjust subheading size */
    }

    article p {
        font-size: 1rem; /* Smaller paragraph text for mobile */
        padding: 15px; /* Less padding on smaller screens */
    }

    article blockquote {
        font-size: 1rem; /* Reduce blockquote font size */
        padding: 20px; /* Less padding */
    }
}
