/*
Theme Name: Ramven Water
Theme URI: https://ramven.com
Author: Dr. Ramven K.
Author URI: https://ramven.com
Description: A water-blue professional blog theme for Chemical Industries & Personal Reflections by Dr. Ramven K.
Version: 3.0.0
License: GNU General Public License v2 or later
Text Domain: ramven
Tags: blog, water-blue, professional, chemical, engineering
*/

/* ─── WATER BLUE PALETTE ─────────────────────────────────────── */
:root {
    /* Sidebar */
    --sidebar-bg:        #023E58;
    --sidebar-bg-deep:   #012D40;
    --sidebar-hover:     #025570;
    --sidebar-active:    #0077A3;
    --sidebar-border:    rgba(0,180,216,0.15);

    /* Content */
    --bg-body:           #EBF6FB;
    --bg-surface:        #FFFFFF;
    --bg-card:           #FFFFFF;
    --bg-card-hover:     #F0FAFF;

    /* Accent water blues */
    --accent:            #0096C7;
    --accent-mid:        #00B4D8;
    --accent-light:      #48CAE4;
    --accent-pale:       #ADE8F4;
    --accent-dark:       #005F7A;
    --accent-deep:       #03045E;

    /* Text */
    --text-primary:      #022B3A;
    --text-secondary:    #4A7A8A;
    --text-sidebar:      #90CAD9;
    --text-sidebar-mute: #4A8097;

    /* Borders & Shadows */
    --border-light:      #D0EBF5;
    --border-medium:     #90CAD9;
    --shadow-sm:         0 1px 4px rgba(2,62,88,0.07);
    --shadow-md:         0 4px 18px rgba(2,62,88,0.11);
    --shadow-lg:         0 10px 40px rgba(2,62,88,0.16);
    --shadow-blue:       0 4px 16px rgba(0,150,199,0.25);

    /* Typography */
    --font-display:      'Cormorant Garamond', Georgia, serif;
    --font-body:         'DM Sans', 'Helvetica Neue', sans-serif;

    /* Layout */
    --sidebar-width:     275px;
    --radius-outer:      14px;
    --radius-inner:      9px;
    --radius-sm:         5px;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ─── BODY ───────────────────────────────────────────────────── */
body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.app-container {
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(175deg, var(--sidebar-bg-deep) 0%, var(--sidebar-bg) 50%, #024B66 100%);
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
    box-shadow: 4px 0 28px rgba(2,45,64,0.35);
    border-right: 1px solid rgba(0,180,216,0.12);
}

/* Water shimmer effect on sidebar */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 180px;
    background: radial-gradient(ellipse at 30% 0%, rgba(0,180,216,0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 40px;
    text-decoration: none;
    position: relative;
}

.logo-mark {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--accent-mid));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 19px;
    font-family: var(--font-display);
    box-shadow: 0 3px 10px rgba(0,150,199,0.45);
    flex-shrink: 0;
}

.logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 8px;
}

.brand-name {
    font-weight: 700;
    font-size: 17px;
    color: #FFFFFF;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

/* Nav Groups */
.nav-group { margin-bottom: 22px; }

.nav-label {
    color: var(--text-sidebar-mute);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
    padding-left: 11px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: var(--radius-inner);
    color: var(--text-sidebar);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    background: rgba(0,180,216,0.1);
    color: #FFFFFF;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0,150,199,0.35), rgba(0,180,216,0.2));
    color: #FFFFFF;
    border-left: 3px solid var(--accent-mid);
    padding-left: 8px;
}

.nav-icon {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }

.badge {
    margin-left: auto;
    background: linear-gradient(135deg, var(--accent), var(--accent-mid));
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

/* Archive Tree */
.tree-container { position: relative; padding-left: 22px; }
.tree-container::before {
    content: '';
    position: absolute;
    left: 11px; top: 0; bottom: 18px;
    width: 1px;
    background: rgba(0,180,216,0.25);
}

.tree-item {
    position: relative;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    color: var(--text-sidebar-mute);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.tree-item:hover { color: #FFF; background: rgba(0,180,216,0.1); }
.tree-item.active { color: #FFF; font-weight: 600; }

.tree-item::before {
    content: '';
    position: absolute;
    left: -11px; top: 50%;
    width: 11px; height: 1px;
    background: rgba(0,180,216,0.25);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--sidebar-border);
    padding-top: 14px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-inner);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.user-profile:hover { background: rgba(0,180,216,0.1); }

.avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent), var(--accent-mid));
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info h4 { font-size: 13px; font-weight: 600; color: #FFFFFF; }
.user-info p  { font-size: 11px; color: var(--text-sidebar-mute); }

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    padding: 54px 68px;
    overflow-y: auto;
    min-width: 0;
}

/* ─── PAGE HEADER ────────────────────────────────────────────── */
.page-header { margin-bottom: 48px; max-width: 720px; }

.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.eyebrow-text {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    max-width: 580px;
}

/* ─── POST FEED ──────────────────────────────────────────────── */
.feed { display: flex; flex-direction: column; gap: 18px; max-width: 780px; }

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-outer);
    padding: 26px 30px;
    transition: all 0.25s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: transparent;
    border-radius: 4px 0 0 4px;
    transition: background 0.25s;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--accent-pale);
    background: var(--bg-card-hover);
}

.post-card:hover::before {
    background: linear-gradient(180deg, var(--accent), var(--accent-mid));
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 9px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.post-tag {
    color: var(--accent);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.post-title {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 9px;
    line-height: 1.3;
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 13px;
}

.read-more {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s;
}

.post-card:hover .read-more { opacity: 1; transform: translateX(0); }

/* ─── SINGLE ARTICLE ─────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 34px;
    transition: color 0.2s;
    text-decoration: none;
}

.back-link:hover { color: var(--accent); }
.article-container { max-width: 730px; }
.article-header { margin-bottom: 34px; }

.article-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.article-tag {
    color: var(--accent);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.article-title {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.article-content { font-size: 17px; line-height: 1.82; color: #032838; }
.article-content p { margin-bottom: 22px; }
.article-content h2, .article-content h3 { font-family: var(--font-display); color: var(--text-primary); margin: 34px 0 13px; }
.article-content h2 { font-size: 27px; }
.article-content h3 { font-size: 21px; }

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 14px 22px;
    margin: 26px 0;
    background: rgba(0,150,199,0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content figure {
    margin: 34px 0;
    background: var(--bg-surface);
    border-radius: var(--radius-outer);
    padding: 34px;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.chart-placeholder {
    height: 180px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
}

.bar {
    width: 36px;
    background: linear-gradient(180deg, var(--accent-mid), var(--accent));
    border-radius: 4px 4px 0 0;
    opacity: 0.85;
}

/* ─── COMMENTS ───────────────────────────────────────────────── */
.comments-section {
    margin-top: 60px;
    padding-top: 34px;
    border-top: 2px solid var(--border-light);
}

.comments-header {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 26px;
    color: var(--text-primary);
}

.comment-input-area { display: flex; gap: 13px; margin-bottom: 36px; }

.comment-box {
    flex: 1;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-inner);
    padding: 13px 15px;
    min-height: 92px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.comment-box:focus { border-color: var(--accent); }
.comment-box::placeholder { color: var(--text-secondary); }
.comment-actions { display: flex; justify-content: flex-end; margin-top: 9px; }

.btn-post {
    background: linear-gradient(135deg, var(--accent), var(--accent-mid));
    color: white;
    border: none;
    padding: 9px 22px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-body);
    transition: opacity 0.2s;
    box-shadow: var(--shadow-blue);
}

.btn-post:hover { opacity: 0.88; }
.comment-list { display: flex; flex-direction: column; gap: 26px; }
.comment-item { display: flex; gap: 13px; }
.comment-content { flex: 1; }
.comment-author { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.author-name { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.comment-time { font-size: 12px; color: var(--text-secondary); }
.comment-text { color: var(--text-secondary); font-size: 15px; line-height: 1.6; }

/* ─── ABOUT ME ───────────────────────────────────────────────── */
.profile-header {
    display: flex;
    gap: 34px;
    margin-bottom: 52px;
    align-items: flex-start;
}

.profile-photo {
    width: 155px;
    height: 155px;
    background: var(--bg-surface);
    border-radius: 18px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--border-light);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

.profile-intro .title-tag {
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 9px;
    display: block;
}

.profile-intro h1 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 11px;
    letter-spacing: -0.8px;
    line-height: 1.15;
}

.profile-intro p { color: var(--text-secondary); font-size: 16px; max-width: 480px; line-height: 1.65; }

.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.section-title::after { content: ''; height: 1px; flex: 1; background: var(--border-light); }

.bio-text { font-size: 16px; color: var(--text-secondary); max-width: 700px; margin-bottom: 48px; line-height: 1.78; }
.bio-text p { margin-bottom: 18px; }
.bio-text strong { color: var(--text-primary); font-weight: 600; }

.experience-timeline { display: flex; flex-direction: column; gap: 26px; margin-bottom: 48px; }
.timeline-item { display: grid; grid-template-columns: 125px 1fr; gap: 18px; }
.timeline-date { color: var(--text-secondary); font-size: 12px; font-weight: 600; padding-top: 4px; }
.timeline-content h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.timeline-content .company { color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 9px; display: block; }
.timeline-content p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

/* ─── PERSONAL NOTES ─────────────────────────────────────────── */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    max-width: 1080px;
}

.note-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-outer);
    padding: 22px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
}

.note-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--accent-pale); }

.note-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 13px; }
.note-date { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

.note-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(0,150,199,0.08);
    color: var(--accent);
}

.note-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 9px; color: var(--text-primary); line-height: 1.35; }
.note-content { color: var(--text-secondary); font-size: 14px; line-height: 1.65; flex-grow: 1; }

/* ─── PUBLICATIONS ───────────────────────────────────────────── */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
    gap: 24px;
    max-width: 1080px;
}

.book-card {
    display: flex;
    gap: 20px;
    padding: 22px;
    border-radius: var(--radius-outer);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.book-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--accent-pale); }

.book-cover {
    width: 125px;
    height: 180px;
    border-radius: 5px;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(2,62,88,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-cover::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 9px;
    background: linear-gradient(to right, rgba(0,0,0,0.22), transparent);
}

.book-cover-text {
    text-align: center;
    padding: 9px;
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,0.92);
    letter-spacing: 1.2px;
    font-family: var(--font-display);
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.book-info { display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.book-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; margin-bottom: 5px; display: block; }
.book-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 9px; line-height: 1.3; color: var(--text-primary); }
.book-description { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.book-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.book-price { font-size: 20px; font-weight: 800; color: var(--text-primary); font-family: var(--font-display); }

.buy-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-mid));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    box-shadow: var(--shadow-blue);
}

.buy-button:hover { opacity: 0.88; transform: scale(1.02); }

/* ─── CONTACT PAGE ───────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; max-width: 900px; }

.contact-form-wrap { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-outer); padding: 32px; box-shadow: var(--shadow-sm); }

.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }

.form-input, .form-textarea {
    width: 100%;
    background: var(--bg-body);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-inner);
    padding: 11px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,150,199,0.1); }
.form-textarea { min-height: 130px; resize: vertical; }

.btn-send {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent), var(--accent-mid));
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-inner);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: opacity 0.2s;
    box-shadow: var(--shadow-blue);
    width: 100%;
}

.btn-send:hover { opacity: 0.88; }

.contact-info-card {
    background: linear-gradient(160deg, var(--sidebar-bg-deep), var(--sidebar-bg));
    border-radius: var(--radius-outer);
    padding: 28px 24px;
    color: white;
}

.contact-info-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 20px; }

.contact-detail {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-sidebar);
}

.contact-detail svg { stroke: var(--accent-mid); flex-shrink: 0; }
.contact-detail a { color: var(--text-sidebar); transition: color 0.2s; }
.contact-detail a:hover { color: white; }

.social-links { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(0,180,216,0.15); }

.social-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(0,180,216,0.12);
    color: var(--text-sidebar);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(0,180,216,0.2);
}

.social-btn:hover { background: rgba(0,180,216,0.22); color: white; }

/* ─── RESOURCES PAGE ─────────────────────────────────────────── */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1080px;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-outer);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.resource-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent-pale); }

.resource-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, rgba(0,150,199,0.12), rgba(0,180,216,0.08));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,150,199,0.15);
}

.resource-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }
.resource-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); line-height: 1.35; }
.resource-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; flex: 1; }

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    background: rgba(0,150,199,0.08);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(0,150,199,0.2);
    transition: all 0.2s;
    cursor: pointer;
    font-family: var(--font-body);
    border: none;
    width: fit-content;
}

.download-btn:hover { background: var(--accent); color: white; box-shadow: var(--shadow-blue); }

/* ─── PAGINATION ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 32px; max-width: 780px; }

.pagination a, .pagination span {
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.pagination a:hover { background: var(--accent); color: white; border-color: var(--accent); }
.pagination .current { background: var(--accent); color: white; border-color: var(--accent); }

/* ─── SEARCH FORM ────────────────────────────────────────────── */
.search-form { display: flex; gap: 8px; max-width: 400px; margin-bottom: 34px; }
.search-form input { flex: 1; background: var(--bg-surface); border: 1.5px solid var(--border-light); border-radius: var(--radius-inner); padding: 10px 13px; color: var(--text-primary); font-size: 14px; font-family: var(--font-body); outline: none; transition: border-color 0.2s; }
.search-form input:focus { border-color: var(--accent); }
.search-form button { background: linear-gradient(135deg, var(--accent), var(--accent-mid)); color: white; border: none; border-radius: var(--radius-inner); padding: 10px 16px; cursor: pointer; font-size: 14px; font-family: var(--font-body); font-weight: 700; }

/* ─── SINGLE POST CONTENT ────────────────────────────────────── */
.single-post-content { font-size: 16px; line-height: 1.78; color: var(--text-secondary); max-width: 700px; }
.single-post-content h2, .single-post-content h3 { font-family: var(--font-display); color: var(--text-primary); margin: 30px 0 12px; }
.single-post-content p { margin-bottom: 18px; }
.single-post-content a { color: var(--accent); text-decoration: underline; }
.single-post-content blockquote { border-left: 4px solid var(--accent); padding: 14px 20px; margin: 22px 0; background: rgba(0,150,199,0.05); font-style: italic; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ─── MOBILE TOGGLE ──────────────────────────────────────────── */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 1000;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    width: 40px; height: 40px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-blue);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2,45,64,0.55);
    z-index: 998;
}

.sidebar-overlay.active { display: block; }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--accent-pale); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .main-content { padding: 38px 32px; }
    .book-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .sidebar { position: fixed; left: -285px; z-index: 999; transition: left 0.3s; }
    .sidebar.open { left: 0; }
    .main-content { padding: 68px 16px 36px; }
    .page-header h1 { font-size: 26px; }
    .article-title { font-size: 26px; }
    .profile-header { flex-direction: column; }
    .notes-grid, .resources-grid { grid-template-columns: 1fr; }
    .book-card { flex-direction: column; }
    .timeline-item { grid-template-columns: 1fr; gap: 3px; }
}

/* ═══════════════════════════════════════════════════════════════
   ELEMENTOR COMPATIBILITY
═══════════════════════════════════════════════════════════════ */

/* Ensure Elementor content fills the main area */
.page-content-wrap {
    width: 100%;
}

/* Elementor sections inside our layout */
.elementor-section-wrap,
.elementor-inner,
.e-con {
    width: 100% !important;
}

/* Full-width Elementor sections */
.elementor-section.elementor-section-stretched {
    width: 100% !important;
    left: 0 !important;
    max-width: none !important;
}

/* Canvas mode - hide sidebar for full-page Elementor designs */
body.ramven-canvas .sidebar,
body.elementor-editor-active .sidebar {
    display: none;
}

body.ramven-canvas .main-content {
    padding: 0 !important;
}

/* Elementor editor view - ensure content area is visible */
body.elementor-editor-active .main-content {
    padding: 0 !important;
    width: 100% !important;
}

body.elementor-editor-active .app-container {
    max-width: 100% !important;
}

/* Fix Elementor widgets inside our theme */
.main-content .elementor-widget-text-editor p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.75;
}

.main-content .elementor-heading-title {
    font-family: var(--font-display) !important;
    color: var(--text-primary) !important;
}

.main-content .elementor-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-mid)) !important;
    border: none !important;
    border-radius: var(--radius-inner) !important;
}

/* Elementor image widget */
.main-content .elementor-widget-image img {
    border-radius: var(--radius-inner);
    box-shadow: var(--shadow-md);
}
