/* Variables */
:root {
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --accent-primary: #ffffff;
    --accent-secondary: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --gradient-1: linear-gradient(120deg, #ffffff 0%, #888888 100%);
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --border-radius: 12px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

.nav-menu a:hover {
    color: var(--accent-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 50%);
    pointer-events: none;
}

.hero-grid {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.hero-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 4rem;
    position: relative;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.intro-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-2px);
}

.hero-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.photo-frame {
    width: 80%;
    height: auto;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.photo-frame:hover .profile-image {
    transform: scale(1.03);
}

/* Skills Section */
.skills {
    padding: 6rem 2rem;
    background-color: var(--bg-primary);
    position: relative;
}

.skills h2 {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skill-item h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 3px;
    transition: width 1s ease;
}

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .skill-item {
        padding: 1.5rem;
    }
}

/* Organizations Section */
.organizations {
    padding: 6rem 2rem;
    background-color: var(--bg-secondary);
    position: relative;
}

.organizations h2 {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.org-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex-wrap: wrap;
}

.org-item {
    width: 250px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.org-item img {
    width: auto;
    height: 80px;
    margin-bottom: 1.5rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.org-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.1);
}

.org-item:hover img {
    transform: scale(1.05);
}

.org-item-overlay {
    text-align: center;
    color: #fff;
    margin-top: auto;
}

.org-item-overlay h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.org-item-overlay .period {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin: 0;
}

.org-item:hover .org-item-overlay h3 {
    color: var(--accent-primary);
}

/* Gallery Section */
.gallery {
    padding: 6rem 2rem;
    background: var(--bg-primary);
    position: relative;
}

.gallery h2 {
    text-align: center;
    margin-bottom: 4rem;
    font-family: var(--font-display);
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 500;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay h3 {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        height: auto;
        padding-top: 6rem;
    }

    .hero-intro {
        text-align: center;
        padding: 2rem;
    }

    .intro-text {
        margin: 0 auto 2.5rem;
    }

    .hero-photo {
        height: auto;
        padding: 2rem;
    }

    .photo-frame {
        width: 60%;
        max-width: 400px;
    }

    .org-grid {
        max-width: 1200px;
    }
    
    .org-item {
        width: calc(33.33% - 2rem);
        min-width: 220px;
    }
}

@media (max-width: 992px) {
    .org-item {
        width: calc(50% - 2rem);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--bg-secondary);
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .org-grid {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .org-item {
        width: 100%;
        max-width: 300px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery */
.gallery, .memes {
    padding: 4rem 2rem;
    background-color: var(--mithila-black);
}

.gallery h2, .memes h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.meme-categories {
    max-width: 1200px;
    margin: 0 auto;
}

.meme-categories h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text-accent);
    margin: 3rem 0 1.5rem;
    text-align: center;
}

.gallery-grid, .memes-grid, .video-memes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Regular gallery and meme items */
.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border: none;
    transition: transform 0.3s;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    border-radius: 8px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay h3 {
    color: white;
    font-family: var(--font-display);
    font-size: 1.5rem;
}

/* Video items specific styles */
.video-memes-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.video-item {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden;
    border: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
}

.video-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item::after {
    content: '';
    position: absolute;
    inset: 15px;
    border: 2px solid var(--mithila-red);
    z-index: 1;
    pointer-events: none;
    border-radius: 6px;
    transition: opacity 0.3s ease;
}

.video-item:hover::before,
.video-item:hover::after {
    opacity: 0;
}

.video-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 2;
}

.video-item:hover .video-item-overlay {
    opacity: 0;
}

.video-item-overlay h3 {
    color: white;
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-align: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    .video-memes-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .video-item:hover {
        transform: scale(1.02);
    }
}

/* About */
.about {
    padding: 6rem 2rem;
    background: var(--mithila-black);
}

.about h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 2rem;
}

.about-text {
    color: var(--text-primary);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text em {
    color: var(--accent-primary);
    font-style: italic;
}

@media (max-width: 768px) {
    .about-content {
        padding: 1.5rem;
    }
    
    .about-text p {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
}

/* Contact */
.contact {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
    text-align: center;
}

.contact h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 0 1rem;
}

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

.contact-item h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.contact-link:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    background: var(--mithila-black);
    color: var(--text-secondary);
}

/* Mithila Decorations */
.mithila-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    opacity: 0.15;
}

.mithila-decoration.left {
    top: 20%;
    left: 5%;
    background: url('patterns/mithila-lotus.svg') no-repeat center/contain;
    animation: rotate 30s linear infinite;
}

.mithila-decoration.right {
    bottom: 20%;
    right: 5%;
    background: url('patterns/mithila-peacock.svg') no-repeat center/contain;
    animation: float 6s ease-in-out infinite;
}

/* Section Decorations */
.gallery::before,
.about::before,
.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: url('patterns/mithila-border.svg') repeat-x;
    opacity: 0.2;
}

.gallery::after,
.about::after,
.contact::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: url('patterns/mithila-border.svg') repeat-x;
    opacity: 0.2;
    transform: rotate(180deg);
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

.cta-button {
    background: var(--text-accent);
    color: var(--mithila-black);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

/* Intro Animation */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--mithila-black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.greeting-animation {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    margin: 0 20px;
}

.greeting-text {
    position: absolute;
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--text-accent);
    text-align: center;
    width: 100%;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(20px);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

@keyframes greetingFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    20%, 80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Make each greeting stay visible longer */
.greeting-text:nth-child(1) { animation: greetingFade 1.2s ease-out 0s forwards; }
.greeting-text:nth-child(2) { animation: greetingFade 1.2s ease-out 0.8s forwards; }
.greeting-text:nth-child(3) { animation: greetingFade 1.2s ease-out 1.6s forwards; }
.greeting-text:nth-child(4) { animation: greetingFade 1.2s ease-out 2.4s forwards; }
.greeting-text:nth-child(5) { animation: greetingFade 1.2s ease-out 3.2s forwards; }
.greeting-text:nth-child(6) { animation: greetingFade 1.2s ease-out 4.0s forwards; }
.greeting-text:nth-child(7) { animation: greetingFade 1.2s ease-out 4.8s forwards; }
.greeting-text:nth-child(8) { animation: greetingFade 1.2s ease-out 5.6s forwards; }
.greeting-text:nth-child(9) { animation: greetingFade 1.2s ease-out 6.4s forwards; }
.greeting-text:nth-child(10) { animation: greetingFade 1.2s ease-out 7.2s forwards; }

@keyframes loadingBar {
    from {
        width: 0;
    }
    to {
        width: 200px;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes bodyFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Organizations Section */
.organizations {
    padding: 4rem 2rem;
    background-color: var(--mithila-black);
    position: relative;
}

.organizations h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 2.5rem;
}

.org-item {
    width: 265px;
    height: 230px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.org-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.org-item img {
    max-width: 100%;
    max-height: 150px;
    width: auto;
    height: auto;
    margin-bottom: 15px;
    object-fit: contain;
}

.org-item-overlay {
    text-align: center;
    color: #fff;
    margin-top: auto;
}

.org-item-overlay h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.org-item-overlay p {
    font-size: 0.9em;
    opacity: 0.8;
}

@media (max-width: 1400px) {
    .org-grid {
        max-width: 1200px;
    }
    
    .org-item {
        width: calc(33.33% - 2rem);
        min-width: 220px;
    }
}

@media (max-width: 992px) {
    .org-item {
        width: calc(50% - 2rem);
    }
}

@media (max-width: 768px) {
    .org-grid {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .org-item {
        width: 100%;
        max-width: 300px;
    }
}

.hidden {
    display: none;
} 