:root {
    /* Sophisticated Blue Pastel Palette - Professional & Trustworthy */
    --primary: #466a91;
    /* Calm Professional Blue - Trust and Authority */
    --primary-light: #e1e9f1;
    /* Soft Ice Blue Tint */
    --accent: #f43f5e;
    /* Vibrant Coral/Red - Catchy and distinct */
    --accent-hover: #e11d48;
    --bg-main: #f4f7fa;
    /* Soft Cool White - clean, crisp blue-tinted gray */
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    /* Darker grey-blue for readability */
    --text-muted: #6b7a8d;
    --border-color: #e5ebf1;
    /* Subtle Blue-tinted border */
    --glass-bg: rgba(255, 255, 255, 0.9);

    /* Enriched Shadow System for More Depth */
    --shadow-sm: 0 2px 4px 0 rgba(74, 124, 140, 0.08);
    --shadow-md: 0 8px 16px -4px rgba(74, 124, 140, 0.12), 0 4px 8px -4px rgba(74, 124, 140, 0.08);
    --shadow-lg: 0 20px 30px -10px rgba(74, 124, 140, 0.15), 0 10px 15px -10px rgba(74, 124, 140, 0.1);
    --shadow-premium: 0 25px 50px -12px rgba(74, 124, 140, 0.18), 0 10px 20px -12px rgba(0, 0, 0, 0.05);

    /* Animation & Layout */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

body.page-loaded {
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 25px;
    padding-right: 25px;
    width: 100%;
}

@media (min-width: 1250px) {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Header Redesign */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-right {
    display: contents;
    /* Makes main-nav and lang direct siblings of logo for desktop centering */
}

.logo img {
    height: 28px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent);
}

.lang-switcher-wrapper {
    display: flex;
    align-items: center;
}

.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--border-color);
    padding: 3px;
    border-radius: 50px;
}

.lang-switcher a {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50px;
    color: var(--text-muted);
}

.lang-switcher a.active {
    background: #fff;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.mobile-only {
    display: none !important;
}

@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* Main Content Layout */
.main-content {
    padding: 30px 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-column {
        display: none;
        /* Consider a bottom bar or menu for mobile if needed */
    }
}

/* Footer Section */
.footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 30px 0 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Hero Section - Clean & Typographic */
.hero {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    /* Rounded corners for all devices */
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 124, 140, 0.05) 0%, transparent 70%);
    z-index: 0;
}

/* Mobile & Tablet Overrides (Up to iPad Pro) */
@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .header {
        position: relative;
        /* Guarantee space occupation */
        width: 100%;
        height: auto;
        padding: 5px 0;
        z-index: 950;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
    }

    body {
        padding-top: 0 !important;
    }

    .header-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        padding: 10px 15px;
        position: relative;
    }

    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.7rem;
        color: var(--primary);
        cursor: pointer;
        justify-self: start;
        padding: 12px 18px;
        margin-left: -15px;
        z-index: 100;
        position: relative;
        pointer-events: auto !important;
    }

    .logo {
        justify-self: center;
        display: flex;
        align-items: center;
        margin-top: 2px;
    }

    .logo img {
        max-height: 22px;
    }

    .lang-switcher-wrapper {
        justify-self: end;
        position: static;
        order: unset;
    }

    .lang-switcher.pill-style {
        background: #f5f7fa;
        padding: 4px;
        border-radius: 20px;
        display: flex;
        gap: 2px;
    }

    .lang-switcher.pill-style a {
        padding: 5px 10px;
        font-size: 0.75rem;
        font-weight: 700;
        border-radius: 50%;
        color: var(--text-muted);
        text-decoration: none;
    }

    .lang-switcher.pill-style a.active {
        background: #fff;
        color: var(--accent);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    /* Mobile Nav Overlay - Premium Corner Card */
    .mobile-nav-overlay {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        height: auto;
        background: transparent;
        z-index: 1500;
        transition: top 0.4s cubic-bezier(0.4, 1, 0.4, 1);
        padding: 10px;
    }

    .mobile-nav-overlay.active {
        top: 0;
    }

    .mobile-nav-content {
        width: 100%;
        max-width: 280px;
        margin: 0;
        background: var(--bg-card);
        padding: 12px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-premium);
        position: relative;
        border: 1px solid var(--border-color);
        transform: scale(0.85);
        transform-origin: top left;
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    }

    .mobile-nav-overlay.active .mobile-nav-content {
        transform: scale(1);
        opacity: 1;
    }

    /* Top Bar Branding & Actions */
    .mobile-nav-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
        padding-bottom: 5px;
    }

    .branding-mini {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mini-logo {
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }

    .mini-main-logo {
        max-height: 22px;
        width: auto;
    }

    .header-right-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .close-square-btn {
        width: 32px;
        height: 32px;
        background: #f1f5f9;
        border: none;
        border-radius: 8px;
        color: #64748b;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: var(--transition);
    }

    .close-square-btn:active {
        background: #e2e8f0;
        transform: scale(0.95);
    }

    /* Clean Menu Items */
    .mobile-menu-links-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .menu-item-clean {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 6px;
        text-decoration: none;
        transition: var(--transition);
        border-radius: 12px;
    }

    .item-left {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .icon-box {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    }

    /* Mona-style specific icon colors */
    .icon-pink {
        background: #fff1f2;
        color: #f43f5e;
    }

    .icon-purple {
        background: #f5f3ff;
        color: #8b5cf6;
    }

    .icon-orange {
        background: #fff7ed;
        color: #f97316;
    }

    .icon-blue {
        background: #eff6ff;
        color: #3b82f6;
    }

    .item-label {
        font-size: 1.05rem;
        font-weight: 700;
        color: #1e293b;
    }

    .arrow-mini {
        font-size: 0.75rem;
        color: #94a3b8;
        opacity: 0.8;
    }

    .menu-item-clean:active {
        background: #f8fafc;
    }

    .mobile-nav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-nav-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        padding: 30px 0;
    }

    .hero {
        padding: 30px 20px;
        margin-bottom: 25px;
        border-radius: var(--radius-lg);
        /* Added rounded corners */
    }

    .avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .about-section {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .footer {
        padding: 15px 0 10px;
    }

    .footer-bottom {
        padding-top: 15px;
        margin-top: 15px;
    }

    /* Back to Top Button */
    .back-to-top {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 998;
        box-shadow: var(--shadow-lg);
    }

    .back-to-top.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .back-to-top i {
        font-size: 1.1rem;
    }

    .back-to-top:active {
        transform: scale(0.9);
    }
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
    border: 4px solid #fff;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.letter-container {
    max-width: 720px;
    margin: 15px auto 0;
    animation: fadeIn 1s ease-out;
}

.letter-paper {
    background: #fff;
    padding: 35px 40px;
    border-radius: var(--radius-md);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24),
        0 10px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    border: 1px solid #f1f5f9;
    text-align: left;
    transform: rotate(-0.5deg);
}

.letter-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.about-section {
    font-size: 1rem;
    color: #475569;
    line-height: 1.5;
    font-style: italic;
    min-height: 180px;
}

/* Cursor effect */
#typing-content::after {
    content: '|';
    animation: blink 0.8s infinite;
    color: var(--accent);
    font-weight: bold;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 30px 15px;
    }

    .avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .letter-paper {
        padding: 24px 20px;
        transform: none;
    }

    .letter-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .about-section {
        font-size: 0.95rem;
        min-height: auto;
    }
}


/* Post Cards Redesign */
.post-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

@media (max-width: 640px) {
    .post-list {
        grid-template-columns: 1fr;
    }
}

.post-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.post-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.post-thumbnail-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.post-item:hover .post-thumbnail {
    transform: scale(1.05);
}

.post-content-inner {
    padding: 24px;
}

.post-meta {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 12px;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-summary {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.post-item:hover .read-more::after {
    transform: translateX(4px);
}

/* Sidebar Styling */
.sidebar-column>div {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-card {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Refined Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-primary,
.btn-accent {
    width: 100%;
    padding: 12px;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
}

.btn-accent {
    background: var(--accent);
}

.btn-primary:hover,
.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.sidebar-title.accent-style {
    color: var(--accent);
}

/* Social Accordion Refinement */
.brand-item {
    border-bottom: 1px solid var(--border-color);
}

.brand-toggle {
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.brand-item.active .brand-toggle {
    color: var(--primary);
}

.brand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.brand-item.active .brand-content {
    max-height: 200px;
    padding-bottom: 16px;
}

.social-item {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-item:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1);
}

/* Footer Section */
.footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}