/* ronri.org - Design System
 * Colors: #f5f0e8, #1a1a2e, #6c757d, #e8b84b, #4a90d9
 * Fonts: Caveat (handwritten headings), Inter (body)
 * Style: Neomorphic + organic leaf illustrations
 */

:root {
    --color-bg: #f5f0e8;
    --color-deep: #1a1a2e;
    --color-gray: #6c757d;
    --color-gold: #e8b84b;
    --color-blue: #4a90d9;
    --color-card: #ede8de;
    --color-card-light: #faf6ee;
    --shadow-neo-out: 6px 6px 12px rgba(74, 144, 217, 0.12), -6px -6px 12px rgba(255, 255, 255, 0.8);
    --shadow-neo-in: inset 3px 3px 6px rgba(74, 144, 217, 0.1), inset -3px -3px 6px rgba(255, 255, 255, 0.7);
    --shadow-neo-hover: 8px 8px 16px rgba(74, 144, 217, 0.18), -8px -8px 16px rgba(255, 255, 255, 0.9);
    --font-heading: 'Caveat', cursive;
    --font-body: 'Inter', sans-serif;
    --sidebar-width: 260px;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-deep);
    display: flex;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== SIDEBAR ========== */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-card-light);
    box-shadow: 4px 0 20px rgba(74, 144, 217, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: 2rem 1.25rem;
    transition: transform var(--transition-smooth);
}

#sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(74, 144, 217, 0.15);
    margin-bottom: 1.5rem;
}

.leaf-logo {
    transition: transform var(--transition-smooth);
}

.leaf-logo:hover {
    transform: rotate(15deg) scale(1.1);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-deep);
    letter-spacing: 0.02em;
}

/* ========== NAVIGATION ========== */
#sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-gray);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-smooth);
    position: relative;
}

.nav-link:hover {
    color: var(--color-blue);
    background: rgba(74, 144, 217, 0.06);
    transform: translateX(4px);
    box-shadow: var(--shadow-neo-out);
}

.nav-link.active {
    color: var(--color-blue);
    background: var(--color-bg);
    box-shadow: var(--shadow-neo-out);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--color-blue);
    border-radius: 2px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-text {
    white-space: nowrap;
}

/* ========== SIDEBAR FOOTER ========== */
#sidebar-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(74, 144, 217, 0.15);
}

.sidebar-leaf {
    opacity: 0.6;
    transition: opacity var(--transition-smooth);
}

.sidebar-leaf:hover {
    opacity: 1;
}

#sidebar-footer .footer-text {
    font-size: 0.75rem;
    color: var(--color-gray);
}

/* ========== MAIN CONTENT ========== */
#main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.content-section {
    padding: 5rem 4rem;
    position: relative;
    min-height: 60vh;
}

/* ========== HERO SECTION ========== */
#hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    min-height: 100vh;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-leaf-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-leaf {
    position: absolute;
    animation: floatLeaf 8s ease-in-out infinite;
}

.leaf-1 { top: 10%; right: 15%; animation-delay: 0s; }
.leaf-2 { top: 60%; right: 5%; animation-delay: -3s; }
.leaf-3 { bottom: 10%; left: 5%; animation-delay: -5s; }

@keyframes floatLeaf {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-15px) rotate(5deg); opacity: 0.5; }
}

.hero-content {
    flex: 1;
    max-width: 560px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-deep);
}

.handwritten-heading {
    font-family: var(--font-heading);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-gray);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.hero-card {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration {
    display: block;
}

.rotating-leaves {
    animation: slowRotate 30s linear infinite;
    transform-origin: center;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== NEOMORPHIC CARDS ========== */
.neo-card {
    background: var(--color-card-light);
    border-radius: 16px;
    box-shadow: var(--shadow-neo-out);
    padding: 2rem;
    transition: all var(--transition-smooth);
}

.neo-card:hover {
    box-shadow: var(--shadow-neo-hover);
    transform: translateY(-2px);
}

/* ========== NEOMORPHIC BUTTONS ========== */
.neo-button {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.neo-button.primary {
    background: var(--color-blue);
    color: #fff;
    box-shadow: 4px 4px 10px rgba(74, 144, 217, 0.3), -2px -2px 8px rgba(255, 255, 255, 0.5);
}

.neo-button.primary:hover {
    background: #3a7dc4;
    box-shadow: 6px 6px 14px rgba(74, 144, 217, 0.4), -3px -3px 10px rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.neo-button.primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-neo-in);
}

.neo-button.secondary {
    background: var(--color-card-light);
    color: var(--color-blue);
    box-shadow: var(--shadow-neo-out);
}

.neo-button.secondary:hover {
    box-shadow: var(--shadow-neo-hover);
    transform: translateY(-2px);
}

.neo-button.secondary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-neo-in);
}

.neo-button.small {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    background: var(--color-card-light);
    color: var(--color-blue);
    box-shadow: 3px 3px 8px rgba(74, 144, 217, 0.1), -3px -3px 8px rgba(255, 255, 255, 0.7);
}

.neo-button.small:hover {
    box-shadow: var(--shadow-neo-hover);
    transform: translateY(-1px);
}

.neo-button.text-btn {
    background: none;
    box-shadow: none;
    color: var(--color-blue);
    padding: 0.25rem 0;
    font-weight: 500;
    border-bottom: 1px solid transparent;
}

.neo-button.text-btn:hover {
    border-bottom-color: var(--color-blue);
    transform: none;
}

.neo-button.full-width {
    width: 100%;
}

/* ========== SECTION TITLES ========== */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--color-deep);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-blue), var(--color-gold));
    border-radius: 2px;
}

/* ========== LEAF DIVIDER ========== */
.leaf-divider {
    padding: 0.5rem 4rem;
    opacity: 0.7;
}

/* ========== ABOUT SECTION ========== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.about-card {
    padding: 2rem;
    position: relative;
}

.card-leaf-accent {
    margin-bottom: 1rem;
}

.card-heading {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-deep);
    margin-bottom: 0.75rem;
}

.card-text {
    font-size: 0.95rem;
    color: var(--color-gray);
    line-height: 1.7;
}

/* ========== RESEARCH SECTION ========== */
.research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.research-card {
    padding: 2rem;
    position: relative;
}

.research-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-blue);
    opacity: 0.25;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.25rem;
}

.tag {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    background: var(--color-bg);
    color: var(--color-blue);
    box-shadow: 2px 2px 5px rgba(74, 144, 217, 0.08), -2px -2px 5px rgba(255, 255, 255, 0.6);
    transition: all var(--transition-smooth);
}

.tag:hover {
    box-shadow: 3px 3px 8px rgba(74, 144, 217, 0.15), -3px -3px 8px rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

/* ========== INSIGHTS SECTION ========== */
.insights-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.insight-card {
    padding: 2rem 2.5rem;
}

.insight-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.insight-date {
    font-size: 0.85rem;
    color: var(--color-gray);
}

.insight-category {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-gold);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: rgba(232, 184, 75, 0.1);
}

.insight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(74, 144, 217, 0.1);
}

.read-time {
    font-size: 0.85rem;
    color: var(--color-gray);
    font-weight: 500;
}

/* ========== CONTACT SECTION ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

.contact-lead {
    font-size: 1.1rem;
    color: var(--color-gray);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-detail-card {
    padding: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--color-deep);
    font-size: 0.95rem;
}

.contact-item + .contact-item {
    border-top: 1px solid rgba(74, 144, 217, 0.1);
}

.contact-form-card {
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-deep);
    margin-bottom: 0.4rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.neo-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    background: var(--color-bg);
    color: var(--color-deep);
    font-family: var(--font-body);
    font-size: 0.95rem;
    box-shadow: var(--shadow-neo-in);
    transition: all var(--transition-smooth);
    outline: none;
}

.neo-input:hover {
    box-shadow: inset 2px 2px 4px rgba(74, 144, 217, 0.12), inset -2px -2px 4px rgba(255, 255, 255, 0.8);
}

.neo-input:focus {
    box-shadow: inset 2px 2px 4px rgba(74, 144, 217, 0.15), inset -2px -2px 4px rgba(255, 255, 255, 0.9), 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.neo-input::placeholder {
    color: var(--color-gray);
    opacity: 0.6;
}

.neo-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236c757d'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.neo-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========== FOOTER ========== */
#main-footer {
    padding: 2rem 4rem;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

#main-footer .footer-text {
    font-size: 0.85rem;
    color: var(--color-gray);
}

/* ========== SCROLL REVEAL ANIMATIONS ========== */
.content-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

#hero {
    opacity: 1;
    transform: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .research-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    #hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.open {
        transform: translateX(0);
    }
    #main-content {
        margin-left: 0;
    }
    .content-section {
        padding: 3rem 1.5rem;
    }
    .leaf-divider {
        padding: 0.5rem 1.5rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
    #main-footer {
        padding: 2rem 1.5rem;
    }
}

/* ========== RIPPLE EFFECT ========== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(74, 144, 217, 0.15);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ========== CARD ENTER STAGGER ========== */
.about-card, .research-card, .insight-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow var(--transition-smooth);
}

.about-card.animate-in, .research-card.animate-in, .insight-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}
