/* Generals */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Raleway', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #e4e4e4;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Language Toggle */
.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 100;
}

.language-toggle a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.language-toggle a:hover {
    opacity: 1;
    transform: scale(1.1);
}

.language-toggle a.active {
    opacity: 1;
    border-color: #9fef00;
}

.language-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* About Me Link */
.about-me-link {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: #9fef00;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid rgba(159, 239, 0, 0.5);
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 100;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
}

.about-me-link:hover {
    background: #9fef00;
    color: #1a1a1a;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(159, 239, 0, 0.3);
}

/* Hero Section - New Design */
.hero-section {
    background: #1a1a1a;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 60px 40px;
    position: relative;
    z-index: 10;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    max-width: 1200px;
    width: 100%;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #fff;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #b0b0b0;
    margin: 0;
    text-align: justify;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05);
}

/* Hero Right Container */
.hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Icons Section */
.icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 40px;
    max-width: 1200px;
    width: 100%;
}

.icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: #ffffff;
}

.icons a:hover {
    color: #9fef00;
    transform: translateY(-5px);
}

.icons a svg {
    width: 48px;
    height: 48px;
}

.icons .icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0) invert(1);
}

.icons a:hover .icon-img {
    transform: scale(1.1);
    filter: invert(87%) sepia(50%) saturate(1000%) hue-rotate(40deg) brightness(105%) contrast(105%);
}

/* HTB Icon - white by default, green on hover */
.icons .htb-icon {
    color: #ffffff;
}

.icons .htb-icon:hover {
    color: #9fef00;
}

/* THM Icon - white by default, green on hover */
.icons .thm-icon {
    color: #ffffff;
}

.icons .thm-icon:hover {
    color: #9fef00;
}

/* Scroll Indicator - positioned at viewport bottom */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-indicator:hover {
    color: #9fef00;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-8px);
    }

    60% {
        transform: translateX(-50%) translateY(-4px);
    }
}

/* About Section */
.about-section {
    padding: 100px 20px;
    background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 37, 37, 0.5), transparent);
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    color: #fff;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #c44f4f 0%, #8b3a3a 100%);
    border-radius: 2px;
}

.about-content {
    background: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.about-content p {
    color: #b8b8b8;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Articles Section Title */
.section-title {
    font-size: 30px;
    font-weight: bold;
    margin: 20px auto;
    padding: 20px 0;
    color: #b2afaf;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.section-title:before,
.section-title:after {
    content: "";
    flex: 1;
    max-width: 500px;
    border-top: 1px solid #444;
    margin: 0 10px;
}

.main-content {
    padding: 40px 30px;
    position: relative;
    z-index: 5;
    background: #111;
}

/* Category Sections */
.category {
    margin: 30px 0;
}

.category-header {
    background: linear-gradient(135deg, #222, #111);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #333;
    position: relative;
    margin-bottom: 10px;
}

.category-header:hover {
    background: linear-gradient(135deg, #333, #222);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

.category-title {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-count {
    font-size: 14px;
    color: #888;
    background: #333;
    padding: 5px 10px;
    border-radius: 15px;
}

.category-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
    color: #888;
}

.category.expanded .category-arrow {
    transform: rotate(180deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category.expanded .category-content {
    max-height: 3000px;
}

/* Articles styling */
.post {
    background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.5s ease;
}

.post:hover {
    transform: translateX(10px);
    background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
    border-color: rgba(200, 200, 200, 0.3);
    box-shadow: 0 10px 30px rgba(200, 200, 200, 0.1);
}

.post:hover::before {
    left: 100%;
}

.post:active {
    background: linear-gradient(135deg, #252525 0%, #333 100%);
    transform: translateX(8px) scale(0.99);
    border-color: rgba(200, 200, 200, 0.4);
}

.post h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.post:hover h2 {
    color: #ffffff;
}

.post p {
    font-size: 1rem;
    color: #999;
    margin: 0 0 15px;
    line-height: 1.6;
}

.meta {
    font-size: 0.85rem;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta .meta-date {
    background: rgba(200, 200, 200, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
    color: #e0e0e0;
    font-weight: 500;
}

/* Tag System */
.post-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(200, 200, 200, 0.1);
    color: #e0e0e0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(200, 200, 200, 0.2);
}

/* Footer */
footer {
    background-color: #111;
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 15px;
    border-top: 1px solid #333;
}

/* Responsiveness */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        gap: 40px;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-description {
        text-align: center;
    }

    .icons {
        justify-content: center;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 20px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image img {
        width: 220px;
        height: 220px;
    }

    .about-section {
        padding: 40px 15px;
    }

    .about-title {
        font-size: 28px;
    }

    .about-content {
        padding: 20px;
        font-size: 15px;
    }

    .main-content {
        padding: 20px;
    }

    .category-header {
        padding: 15px;
    }

    .category-title {
        font-size: 20px;
    }

    .post {
        padding: 20px;
    }

    .post h2 {
        font-size: 1.2rem;
    }

    .post p {
        font-size: 0.9rem;
    }

    .meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-image img {
        width: 180px;
        height: 180px;
    }

    .icons {
        gap: 16px;
    }

    .icons a svg {
        width: 28px;
        height: 28px;
    }

    .about-section {
        padding: 30px 10px;
    }

    .about-title {
        font-size: 24px;
    }

    .about-content {
        padding: 15px;
        font-size: 14px;
    }

    .category-header {
        padding: 12px;
    }

    .category-title {
        font-size: 18px;
    }

    .post:hover {
        transform: translateX(5px);
    }
}