/* 
   Ultra-Premium Glassmorphism Design System 
   Author: Antigravity
*/

:root {
    /* Color Palette - Deep Universe & Neon */
    --bg-dark: #09090b;
    /* Zinc 950 - Darker base */
    --accent-1: #0ea5e9;
    /* Sky 500 */
    --accent-2: #8b5cf6;
    /* Violet 500 */
    --accent-3: #10b981;
    /* Emerald 500 */
    --accent-glow: rgba(139, 92, 246, 0.4);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Transitions */
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    cursor: default;
    /* Custom cursor fallback handled via JS if needed */
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    /* Clean grainy texture overlay */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* --- Premium Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100vw;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Standard Scrollbar Support */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* --- Dynamic Background --- */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    /* Heavy blur for soft mesh look */
    opacity: 0.4;
    border-radius: 50%;
    animation: float-blob 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--accent-2);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--accent-1);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: var(--accent-3);
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes float-blob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 40px) scale(0.95);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* --- Typography Overrides --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    font-weight: 700;
}

p,
span,
li,
a {
    letter-spacing: 0.01em;
}

/* --- Glass Components --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: transform 0.4s var(--ease-out-back), box-shadow 0.4s ease;
    overflow: hidden;
    /* For glow effect */
}

/* Glow Card Logic (via JS) */
.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    /* The border width */
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
            rgba(255, 255, 255, 0.4),
            transparent 40%);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-wrapper {
    padding-top: 4rem;
    padding-bottom: 8rem;
}

.resume-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* --- Hero Section --- */
.profile-section {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    border-radius: 32px;
}

.profile-photo-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    position: relative;
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    /* Organic but fuller top */
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    animation: morph-shape 8s ease-in-out infinite;
    transition: transform 0.5s var(--ease-out-back);
}

.profile-photo:hover {
    transform: scale(1.05) rotate(3deg);
}

@keyframes morph-shape {

    0%,
    100% {
        border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    }

    34% {
        border-radius: 60% 60% 50% 50% / 50% 50% 50% 50%;
    }

    67% {
        border-radius: 50% 50% 60% 60% / 60% 60% 40% 40%;
    }
}

.glow-splatter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: conic-gradient(from 0deg, var(--accent-1), var(--accent-2), var(--accent-3), var(--accent-1));
    filter: blur(40px);
    z-index: 1;
    border-radius: 50%;
    opacity: 0.5;
    animation: spin-slow 10s linear infinite;
}

@keyframes spin-slow {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.profile-name {
    font-size: 3.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.profile-role span {
    font-size: 1.25rem;
    color: var(--accent-1);
    font-weight: 500;
    font-family: var(--font-heading);
    background: rgba(14, 165, 233, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

/* --- Sidebar --- */
.sidebar section {
    margin-bottom: 2.5rem;
    padding: 2rem;
}

.section-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title i {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.contact-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* --- Skills --- */
.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: var(--accent-2);
    color: white;
    border-color: var(--accent-2);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

/* --- Main Content --- */
.summary-card {
    padding: 2.5rem;
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-card {
    padding: 2rem;
    margin-bottom: 2rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-title {
    font-size: 1.75rem;
    color: white;
}

.project-year {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Magazine / Magnetic Button */
.btn-magnetic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.8rem 1.8rem;
    border-radius: 14px;
    background: white;
    color: black;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Liquid fill effect on hover */
.btn-magnetic::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-1));
    z-index: -1;
    transition: transform 0.4s ease;
    transform: scaleX(0);
    transform-origin: right;
}

.btn-magnetic:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-magnetic:hover {
    color: white;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

/* Education */
.edu-item {
    margin-bottom: 1.5rem;
    padding: 2rem;
    border-left: 4px solid var(--accent-3);
    position: relative;
}

.edu-title {
    font-size: 1.25rem;
    color: white;
    margin-bottom: 0.5rem;
}

.edu-school {
    color: var(--accent-3);
    font-weight: 500;
}

/* --- Master Button --- */
.master-btn-container {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    pointer-events: none;
}

.master-toggle {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    transition: all 0.4s var(--ease-out-back);
    display: grid;
    place-items: center;
}

.master-toggle.scroll-hidden {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
    pointer-events: none;
}

.master-toggle:hover {
    background: white;
    color: black;
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.4);
}

.master-menu {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(24px);
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transform-origin: bottom right;
    transition: all 0.3s var(--ease-out-back);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.master-menu.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.menu-item {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 500;
    transition: 0.2s;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.menu-item:hover {
    background: white;
    color: black;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    /* Deep dark */
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 90vw;
    height: 90vh;
    max-width: 850px;
    /* Adjusted to fit typical PDF width */
    background: #525659;
    /* Standard PDF Viewer Dark Gray */
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: 0.4s var(--ease-out-back);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: 0.3s;
    display: grid;
    place-items: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    flex: 1;
    flex: 1;
    background: #525659;
    /* Match container background */
    position: relative;
    overflow: hidden;
    /* Hide the pushed-out scrollbar */
}

.modal-body iframe {
    width: calc(100% + 18px);
    /* Push scrollbar off-screen */
    height: 100%;
    border: none;
    display: block;
    margin-right: -18px;
    /* Compensate for width */
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .resume-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .main-wrapper {
        padding-top: 2rem;
    }

    .profile-name {
        font-size: 2.5rem;
    }

    .master-btn-container {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}