/*
Theme Name: Pradana Theme
Theme URI: https://pradana.id
Author: Imam Pradana
Author URI: https://pradana.id
Description: Personal tech blog theme - ported from Next.js. Features multi-color theme switcher, dark mode, responsive mobile menu.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pradana-theme
Tags: blog, personal, tech, responsive, dark-mode
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
    --primary-color: #0F172A;
    --accent-color: #0EA5E9;
    --bg-color: #FFFFFF;
    --text-color: #0F172A;
    --light-gray: #F8FAFC;
    --card-bg: #FFFFFF;
    --border-radius: 40px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    border-left: 20px solid var(--accent-color);
    border-right: 20px solid var(--accent-color);
    min-height: 100vh;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
    scroll-behavior: smooth;
}

/* ── Dark Mode ────────────────────────────────────────────── */
[data-theme='dark'] {
    --bg-color: #0F172A;
    --text-color: #E2E8F0;
    --light-gray: #1E293B;
    --card-bg: #1E293B;
}

[data-theme='dark'] body {
    background-color: #0F172A;
    color: #E2E8F0;
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes gradientText {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Header ──────────────────────────────────────────────── */
header {
    padding: 1.5rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    padding: 1rem 8%;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    background: rgba(255, 255, 255, 0.85);
}

[data-theme='dark'] header {
    background: rgba(15, 23, 42, 0.7);
}

[data-theme='dark'] header.scrolled {
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.logo a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: -1px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
}

nav ul li a:hover,
nav ul li a.current-menu-item {
    color: var(--accent-color);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-say-hi {
    border: 2px solid var(--primary-color);
    padding: 0.8rem 2.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-say-hi:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ── Theme Switcher ──────────────────────────────────────── */
.theme-switcher-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

[data-theme='dark'] .theme-switcher-wrap {
    background: rgba(255,255,255,0.1);
}

#theme-select {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    color: #1e293b;
    font-size: 0.8rem;
    font-weight: 800;
}

[data-theme='dark'] #theme-select {
    color: white;
}

#theme-select option { color: black; }

/* ── Hamburger ───────────────────────────────────────────── */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-btn .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: var(--transition);
}

/* ── Mobile Overlay ──────────────────────────────────────── */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

.mobile-overlay.active {
    transform: translateX(0);
}

.close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-content ul {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.mobile-nav-content ul li a {
    color: white;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    transition: var(--transition);
}

.mobile-nav-content ul li a:hover {
    color: var(--accent-color);
}

.mobile-theme-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.6rem 1rem;
    border-radius: 50px;
}

#mobile-theme-select {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

#mobile-theme-select option { color: black; }

.no-scroll { overflow: hidden; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 8% 8rem 8%;
    min-height: calc(100vh - 100px);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 50%, #22c55e 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 4s ease-in-out infinite;
}

.hero-illustration {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.hero-illustration img {
    max-width: 100%;
    height: auto;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 6rem;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8%;
}

.footer-brand h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 1rem;
    color: var(--primary-color);
}

.footer-brand h2 span { color: var(--accent-color); }

.footer-brand p {
    opacity: 0.7;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links h3,
.footer-connect h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.footer-links nav {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links nav a {
    font-size: 0.9rem;
    opacity: 0.6;
    transition: 0.2s;
    color: inherit;
    text-decoration: none;
}

.footer-links nav a:hover { opacity: 1; color: var(--accent-color); }

.footer-socials {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.footer-socials a {
    padding: 0.5rem;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    transition: 0.2s;
    font-size: 1.2rem;
    text-decoration: none;
}

.footer-socials a:hover {
    background: rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.footer-email {
    font-size: 0.85rem;
    opacity: 0.6;
}

.footer-email a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 2rem 8% 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.footer-bottom p { opacity: 0.6; margin: 0; }

.footer-version {
    display: flex;
    gap: 1rem;
    color: var(--accent-color);
    font-weight: 700;
    opacity: 0.8;
}

.footer-decor {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.05;
    z-index: -1;
}

/* ── Container ───────────────────────────────────────────── */
.container {
    padding: 8rem 8%;
    max-width: 1600px;
    margin: 0 auto;
}

.container h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

/* ── Blog List ───────────────────────────────────────────── */
article.post-card {
    margin-bottom: 4rem;
    background: var(--light-gray);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

[data-theme='dark'] article.post-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

article.post-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
    border-color: var(--accent-color);
}

article.post-card .post-meta {
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

article.post-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

article.post-card p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

article.post-card a.read-more {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

article.post-card a.read-more:hover {
    text-decoration: underline;
}

/* ── Post Detail ─────────────────────────────────────────── */
.post-detail {
    max-width: 1200px;
}

.post-detail h1 {
    font-size: 4rem;
    line-height: 1.1;
}

.post-detail .post-meta {
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.post-content {
    font-size: 1.3rem;
    line-height: 1.9;
    margin-top: 2.5rem;
}

.post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.post-content a {
    color: var(--accent-color);
}

.post-content pre,
.post-content code {
    background: var(--light-gray);
    border-radius: 8px;
    padding: 0.2em 0.5em;
    font-size: 0.9em;
}

.post-content pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* ── About Section ───────────────────────────────────────── */
#about {
    background-color: var(--light-gray);
    border-radius: 80px;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 5rem;
    align-items: start;
}

.about-left {
    position: sticky;
    top: 2rem;
}

.about-left h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.about-left h3 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.about-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.interest-card {
    background: white;
    padding: 2.5rem 3rem;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

[data-theme='dark'] .interest-card {
    background: rgba(30, 41, 59, 0.8);
}

.interest-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(45deg, transparent, rgba(14,165,233,0.05), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.interest-card:hover::after {
    transform: translateX(100%);
}

.interest-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-left: 12px solid var(--accent-color);
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.15);
}

.interest-card h4 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.interest-card p {
    font-size: 1.15rem;
    opacity: 0.8;
}

.accent-ribbon {
    width: 60px;
    height: 8px;
    background: var(--accent-color);
    margin-bottom: 2rem;
    border-radius: 10px;
}

/* ── WP Admin Bar fix ────────────────────────────────────── */
.admin-bar header {
    top: 32px;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.pagination .current,
.pagination a:hover {
    background: var(--accent-color);
    color: white;
}

/* ── 404 ─────────────────────────────────────────────────── */
.not-found {
    text-align: center;
    padding: 10rem 8%;
}

.not-found h1 {
    font-size: 8rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
}

.not-found h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    header { padding: 2rem 5%; }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 4rem 5% 6rem 5%;
        min-height: auto;
    }

    .hero-content { max-width: 100%; margin-bottom: 3rem; }
    .hero-content h1 { font-size: 3.5rem; }

    .about-grid { grid-template-columns: 1fr; gap: 3rem; }

    .about-left {
        position: static;
        text-align: center;
    }

    .about-left h3 { font-size: 3rem; }
    .about-left .accent-ribbon { margin: 0 auto 2rem auto; }
}

@media (max-width: 768px) {
    header { padding: 1.2rem 5%; }

    nav.desktop-nav { display: none; }

    .btn-say-hi { display: none; }

    .menu-btn { display: flex !important; }

    .logo a { font-size: 1.4rem; }
    .header-actions { gap: 0; }

    .hero { padding: 3rem 5% 5rem 5%; }
    .hero-content h1 { font-size: 2.6rem; }

    .container { padding: 4rem 5%; }
    .container h1 { font-size: 2.5rem; margin-bottom: 2rem; }

    .post-detail h1 { font-size: 2.5rem; }

    .about-left h3 { font-size: 2.5rem; }

    footer { padding: 3rem 1rem 2rem; }
    .footer-bottom { padding: 2rem 5% 0; }

    .admin-bar header { top: 46px; }
}
