/* resar.one - Art Deco Scholarship with Kinetic Energy */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Font: Inter, Playfair Display */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a2e;
    color: #f5f0e8;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ================================
   Art Deco Border Ornaments
   ================================ */

.deco-border-top,
.deco-border-bottom {
    width: 100%;
    height: 60px;
    overflow: hidden;
    background: #1a1a2e;
}

.deco-ornament-top,
.deco-ornament-bottom {
    width: 100%;
    height: 60px;
}

/* ================================
   Hero Section
   ================================ */

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    overflow: hidden;
}

/* Organic blob shapes in jewel tones */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: blobFloat 12s ease-in-out infinite;
}

.hero-blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #9b1b30, transparent 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.hero-blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #4a90d9, transparent 70%);
    bottom: -50px;
    right: -50px;
    animation-delay: -4s;
}

.hero-blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #0e6655, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -8s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(20px, 20px) scale(1.02); }
}

.hero-blob-3 {
    animation-name: blobFloat3;
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    25% { transform: translate(calc(-50% + 30px), calc(-50% - 20px)) scale(1.05); }
    50% { transform: translate(calc(-50% - 20px), calc(-50% + 30px)) scale(0.95); }
    75% { transform: translate(calc(-50% + 20px), calc(-50% + 20px)) scale(1.02); }
}

/* Art Deco Frame */
.deco-frame {
    position: relative;
    padding: 80px 100px;
    text-align: center;
    z-index: 1;
}

.deco-corner {
    position: absolute;
    width: 80px;
    height: 80px;
}

.deco-corner-tl { top: 0; left: 0; }
.deco-corner-tr { top: 0; right: 0; }
.deco-corner-bl { bottom: 0; left: 0; }
.deco-corner-br { bottom: 0; right: 0; }

/* Kinetic Typography - Hero Title */
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #f5f0e8;
    margin-bottom: 24px;
}

.kinetic-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotateX(90deg);
    animation: charReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: calc(var(--i) * 0.1s + 0.5s);
}

.kinetic-char.dot {
    color: #e8b84b;
}

@keyframes charReveal {
    0% {
        opacity: 0;
        transform: translateY(60px) rotateX(90deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #e8b84b;
}

/* Deco Divider */
.deco-divider {
    margin-top: 40px;
    width: 300px;
    z-index: 1;
}

.deco-divider svg {
    width: 100%;
    height: auto;
}

/* ================================
   Navigation
   ================================ */

#main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(232, 184, 75, 0.3);
    padding: 0 20px;
}

#main-nav ul {
    display: flex;
    justify-content: center;
    gap: 40px;
    list-style: none;
    padding: 16px 0;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #f5f0e8;
    text-decoration: none;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e8b84b;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #e8b84b;
}

.nav-link:hover::after {
    width: 100%;
}

/* ================================
   Section Base Styles
   ================================ */

.section-dark {
    background: #1a1a2e;
    padding: 100px 20px;
}

.section-jewel {
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
}

.section-ruby {
    background: linear-gradient(135deg, #2a1015 0%, #1a1a2e 50%, #2a1520 100%);
}

.section-sapphire {
    background: linear-gradient(135deg, #0f1a2e 0%, #1a1a2e 50%, #101e30 100%);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Section Headings - Kinetic Animation */
.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #f5f0e8;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.heading-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    margin: 0 8px;
}

.heading-word.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-heading::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: #e8b84b;
    margin: 20px auto 0;
}

/* Blob Accents */
.blob-accent {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.1;
    pointer-events: none;
}

.blob-ruby {
    background: #9b1b30;
    top: 10%;
    right: -100px;
}

/* Fade Reveal */
.fade-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Content Card */
.content-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(232, 184, 75, 0.2);
    border-radius: 2px;
    position: relative;
}

.card-deco-line {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #e8b84b;
}

.content-card p {
    font-size: 1.05rem;
    color: #f5f0e8;
    margin-bottom: 20px;
    line-height: 1.8;
}

.content-card p:last-child {
    margin-bottom: 0;
}

/* ================================
   Masonry Grid
   ================================ */

.masonry-grid {
    columns: 3;
    column-gap: 24px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 24px;
    padding: 32px;
    border: 1px solid rgba(232, 184, 75, 0.2);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 184, 75, 0.5);
}

.masonry-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.08;
    pointer-events: none;
}

.jewel-sapphire::before { background: linear-gradient(135deg, #1a5276, #4a90d9); }
.jewel-emerald::before { background: linear-gradient(135deg, #0e6655, #1abc9c); }
.jewel-amethyst::before { background: linear-gradient(135deg, #6c3483, #a569bd); }
.jewel-ruby::before { background: linear-gradient(135deg, #9b1b30, #c0392b); }

.item-ornament {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
}

.masonry-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e8b84b;
    margin-bottom: 12px;
}

.masonry-item p {
    font-size: 0.95rem;
    color: rgba(245, 240, 232, 0.85);
    margin-bottom: 10px;
    line-height: 1.7;
}

.masonry-item p:last-child {
    margin-bottom: 0;
}

/* ================================
   Gallery Grid
   ================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-item {
    text-align: center;
}

.gallery-artwork {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(232, 184, 75, 0.3);
    border-radius: 2px;
    padding: 20px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-artwork:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 40px rgba(232, 184, 75, 0.1);
}

.gallery-artwork svg {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-label {
    display: block;
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #e8b84b;
}

/* ================================
   Contact Section
   ================================ */

.contact-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-deco {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    opacity: 0.7;
}

.contact-deco svg {
    width: 100%;
    height: 100%;
}

.contact-info {
    flex: 1;
}

.contact-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(245, 240, 232, 0.85);
    margin-bottom: 24px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #e8b84b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #f5f0e8;
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================
   Footer
   ================================ */

#footer {
    background: #1a1a2e;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(232, 184, 75, 0.15);
}

.footer-divider {
    width: 250px;
    margin: 0 auto 24px;
}

.footer-divider svg {
    width: 100%;
    height: auto;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #6c757d;
}

/* ================================
   Responsive
   ================================ */

@media (max-width: 900px) {
    .masonry-grid {
        columns: 2;
    }

    .deco-frame {
        padding: 60px 50px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .contact-container {
        flex-direction: column;
        text-align: center;
    }

    .contact-deco {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        columns: 1;
    }

    .deco-frame {
        padding: 40px 30px;
    }

    #main-nav ul {
        gap: 20px;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .content-card {
        padding: 30px;
    }

    .section-dark,
    .section-jewel {
        padding: 60px 16px;
    }
}

/* ================================
   Kinetic Hover Effects
   ================================ */

.kinetic-char {
    transition: color 0.3s ease, transform 0.3s ease;
}

.hero-title:hover .kinetic-char {
    animation: charWave 0.5s ease forwards;
    animation-delay: calc(var(--i) * 0.05s);
}

@keyframes charWave {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); color: #e8b84b; }
    100% { transform: translateY(0); }
}

/* Gold shimmer on section headings */
.section-heading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232, 184, 75, 0.1), transparent);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}