@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --bg-light: #f8fafc;
    --bg-dark: #020617;
    /* Slate 950 */
    --text-light: #0f172a;
    /* Slate 900 */
    --text-dark: #f8fafc;
    /* Slate 50 */
    --accent: #0891b2;
    /* Cyan 600 */
    --accent-glow: rgba(8, 145, 178, 0.5);
}

/* Base Layout & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-light);
    color: var(--text-light);
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
}

.dark body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Background Glow Effect - Top Center */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

.dark body::before {
    opacity: 0.2;
}

/* Floating Navbar */
.nav-floating {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.dark .nav-floating {
    background: rgba(15, 23, 42, 0.6);
    /* Slate 900 alpha */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

/* Bento Card Style */
.bento-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.dark .bento-card {
    background: rgba(30, 41, 59, 0.4);
    /* Slate 800 alpha */
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: none;
}

/* Hover Interactive */
.bento-card-interactive {
    cursor: pointer;
}

.bento-card-interactive:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 12px 24px -10px var(--accent-glow);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    /* Pill shape */
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 8px 16px var(--accent-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--text-light);
    /* Will be handled by tailwind classes usually, but good fallback */
    border: 1px solid #cbd5e1;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.dark .btn-secondary {
    color: var(--text-dark);
    border-color: #334155;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.5);
    border-color: var(--accent);
}

.dark .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Accordion */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
    opacity: 0;
}

.accordion-content.active {
    opacity: 1;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

/* Utility */
.animate-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background-color: #334155;
}

/* Modern Research Card Design */
.research-card-modern {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 2px 4px -1px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    isolation: isolate;
}

.dark .research-card-modern {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Hover State - Lift & Glow */
.research-card-modern:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 20px 40px -12px rgba(0, 0, 0, 0.1),
        0 0 0 1px var(--card-glow-color, var(--accent));
}

/* Dynamic Gradient Border Effect */
.research-card-modern::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.4),
            transparent 40%,
            transparent 60%,
            var(--card-glow-color, var(--accent)));
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.dark .research-card-modern::before {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1),
            transparent 40%,
            transparent 60%,
            var(--card-glow-color, var(--accent)));
}

.research-card-modern:hover::before {
    opacity: 0.5;
}

/* Inner Layout */
.card-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Category Badge */
.category-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

/* Icon Box */
.icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.research-card-modern:hover .icon-box {
    transform: rotate(10deg) scale(1.1);
}

/* Title */
.card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

/* DOI Badge */
.doi-badge {
    font-family: 'JetBrains Mono', monospace;
    /* or fallback monospace */
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.04);
    color: #64748b;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.dark .doi-badge {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.doi-badge:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

.dark .doi-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

/* Action Button */
.action-btn {
    opacity: 0.8;
    transform: translateX(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-card-modern:hover .action-btn {
    opacity: 1;
    transform: translateX(4px);
}/ *   H e r o   F l o a t i n g   B a d g e s   * /  
 . h e r o - f l o a t - b a d g e   {  
         p o s i t i o n :   a b s o l u t e ;  
         p a d d i n g :   0 . 7 5 r e m   1 . 2 5 r e m ;  
         b o r d e r - r a d i u s :   1 r e m ;  
         b a c k g r o u n d :   r g b a ( 1 5 ,   2 3 ,   4 2 ,   0 . 8 ) ;  
         / *   D a r k   b a c k g r o u n d   * /  
         b a c k d r o p - f i l t e r :   b l u r ( 1 2 p x ) ;  
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ;  
         c o l o r :   w h i t e ;  
         f o n t - w e i g h t :   6 0 0 ;  
         d i s p l a y :   f l e x ;  
         a l i g n - i t e m s :   c e n t e r ;  
         g a p :   0 . 7 5 r e m ;  
         b o x - s h a d o w :   0   8 p x   3 2 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 2 ) ;  
         z - i n d e x :   2 0 ;  
         f o n t - s i z e :   0 . 9 r e m ;  
 }  
  
 . l i g h t   . h e r o - f l o a t - b a d g e   {  
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 9 ) ;  
         b o r d e r :   1 p x   s o l i d   r g b a ( 0 ,   0 ,   0 ,   0 . 0 5 ) ;  
         c o l o r :   # 0 f 1 7 2 a ;  
         b o x - s h a d o w :   0   8 p x   3 2 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 0 5 ) ;  
 }  
  
 . h e r o - f l o a t - b a d g e   i   {  
         f o n t - s i z e :   1 . 1 e m ;  
 }  
  
 / *   F l o a t i n g   A n i m a t i o n s   * /  
 @ k e y f r a m e s   f l o a t - 1   {  
  
         0 % ,  
         1 0 0 %   {  
                 t r a n s f o r m :   t r a n s l a t e Y ( 0 p x )   r o t a t e ( 0 d e g ) ;  
         }  
  
         5 0 %   {  
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 5 p x )   r o t a t e ( 2 d e g ) ;  
         }  
 }  
  
 @ k e y f r a m e s   f l o a t - 2   {  
  
         0 % ,  
         1 0 0 %   {  
                 t r a n s f o r m :   t r a n s l a t e Y ( 0 p x )   r o t a t e ( 0 d e g ) ;  
         }  
  
         5 0 %   {  
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 0 p x )   r o t a t e ( - 2 d e g ) ;  
         }  
 }  
  
 @ k e y f r a m e s   f l o a t - 3   {  
  
         0 % ,  
         1 0 0 %   {  
                 t r a n s f o r m :   t r a n s l a t e Y ( 0 p x )   r o t a t e ( 0 d e g ) ;  
         }  
  
         5 0 %   {  
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 0 p x )   r o t a t e ( 1 d e g ) ;  
         }  
 }  
  
 . a n i m a t e - f l o a t - 1   {  
         a n i m a t i o n :   f l o a t - 1   5 s   e a s e - i n - o u t   i n f i n i t e ;  
 }  
  
 . a n i m a t e - f l o a t - 2   {  
         a n i m a t i o n :   f l o a t - 2   7 s   e a s e - i n - o u t   i n f i n i t e ;  
 }  
  
 . a n i m a t e - f l o a t - 3   {  
         a n i m a t i o n :   f l o a t - 3   6 s   e a s e - i n - o u t   i n f i n i t e ;  
 }  
 