/* --- Cursor Spotlight Motion Blur Effect --- */
#cursor-spotlight {
    position: fixed;
    width: 600px;
    height: 600px;
    left: 50%;
    top: 50%;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,123,255,0.22) 0%, rgba(0,123,255,0.10) 60%, rgba(0,123,255,0) 100%);
    filter: blur(120px);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s cubic-bezier(.4,0,.2,1);
    will-change: left, top, opacity;
}
:root {
    --background: #000000;
    --panel-bg: rgba(15, 23, 42, 0.75);
    --panel-border: rgba(148, 163, 184, 0.18);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.14);
    --highlight: #facc15;
    --shadow-soft: 0 30px 70px rgba(8, 15, 35, 0.45);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --spacing-xl: 3.5rem;
    --spacing-lg: 2.5rem;
    --spacing-md: 1.5rem;
    --spacing-sm: 0.85rem;
    --spacing-xs: 0.5rem;
    --max-width: 1180px;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background-color: var(--background);
    position: relative;
    --cursor-x: 50%;
    --cursor-y: 50%;
    --cursor-opacity: 0;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        260px at var(--cursor-x, 50%) var(--cursor-y, 50%),
        rgba(59, 130, 246, 0.28) 0%,
        rgba(59, 130, 246, 0.16) 45%,
        transparent 75%
    );
    opacity: var(--cursor-opacity, 0);
    transition: opacity 0.3s ease;
    z-index: 0;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent);
}

.page-shell {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4.5rem 2rem 3.5rem;
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.profile-panel {
    position: sticky;
    top: 3rem;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-self: start;
}

.profile-intro {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.profile-eyebrow {
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.profile-name {
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
}

.profile-summary {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.8;
}

.profile-subheading {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.profile-resume-link {
    margin-top: var(--spacing-sm);
}

.resume-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
        font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.resume-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 100%;
    height: 1px;
    background: rgba(59, 130, 246, 0.4);
    transition: opacity 0.2s ease;
}

.resume-link:hover::after {
    opacity: 0;
}

.section-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.35rem 0;
    transition: color 0.2s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link.active {
    color: var(--accent);
}

.nav-link.active::before {
    background: var(--accent);
    transform: translateY(-50%) scale(1.3);
}

.profile-meta {
    display: grid;
    gap: var(--spacing-xs);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.meta-label {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.meta-value {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 0.85rem;
    font-size: 1.2rem;
}

.social-links a {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.social-links img {
    width: 1.1rem;
    height: 1.1rem;
    filter: brightness(0) invert(0.8);
    transition: filter 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.35);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
    color: var(--accent);
}

.social-links a:hover img {
    filter: brightness(1.15) saturate(1.3);
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    scroll-margin-top: 100px;
}

.panel-plain {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    backdrop-filter: none;
}

.panel-borderless {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    backdrop-filter: none;
}

.panel-borderless .panel-heading {
    padding-bottom: var(--spacing-md);
}

.panel-heading {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.panel-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.panel-heading h2 {
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
    filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.2));
}

.panel-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.8;
}

.panel-highlights {
    display: grid;
    gap: var(--spacing-sm);
}

.highlight-card {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
    color: var(--text-secondary);
}

.highlight-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.panel-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.panel-highlights {
    display: grid;
    gap: var(--spacing-sm);
}

.highlight-card {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
    color: var(--text-secondary);
}

.highlight-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.about-copy {
    display: grid;
    gap: var(--spacing-md);
}

.about-copy p {
    color: var(--text-primary);
    font-size: 0.98rem;
}

.achievements-grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.achievement-card {
    display: grid;
    gap: var(--spacing-sm);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.35);
}

.achievement-media img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.achievement-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievement-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.achievement-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.certificate-carousel {
    position: relative;
    padding: 2.8rem 3.5rem 4rem;
    background: radial-gradient(circle at 20% 15%, rgba(59, 130, 246, 0.18), transparent 55%),
        rgba(12, 20, 38, 0.75);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.carousel-stage {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1600px;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.certificate-slide {
    position: absolute;
    top: 0;
    left: 50%;
    width: clamp(280px, 60%, 520px);
    height: 100%;
    transform: translate3d(-50%, 30px, 0) scale(0.8);
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.4s ease;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(167, 139, 250, 0.08) 100%);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background-clip: padding-box;
    position: absolute;
    box-shadow: 0 35px 60px rgba(9, 14, 31, 0.45);
}

.certificate-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

.certificate-slide.active {
    transform: translate3d(-50%, 0, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
    cursor: zoom-in;
    z-index: 5;
}

.certificate-slide.active::before {
    opacity: 0.5;
}

.certificate-slide.prev {
    transform: translate3d(-95%, 25px, 0) scale(0.9);
    opacity: 0.65;
    z-index: 4;
    filter: brightness(0.6) saturate(0.8);
}

.certificate-slide.next {
    transform: translate3d(-5%, 25px, 0) scale(0.9);
    opacity: 0.65;
    z-index: 4;
    filter: brightness(0.6) saturate(0.8);
}

.certificate-slide.hidden {
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.certificate-visual {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(13, 22, 41, 0.8);
    display: grid;
    place-items: center;
    padding: 0.5rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.certificate-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.certificate-caption {
    padding: 1.6rem 1.8rem;
    display: grid;
    gap: 0.6rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(9, 14, 31, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(96, 165, 250, 0.2);
}

.certificate-caption h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
}

.certificate-caption p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.page-footer {
    max-width: var(--max-width);
    margin: 2rem auto 3rem;
    padding: 0 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 1024px) {
    .page-shell {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .profile-panel {
        position: static;
    }

    .content-area {
        gap: var(--spacing-lg);
    }

    .certificate-carousel {
        padding: 2.2rem 2.4rem 3.2rem;
    }

    .carousel-stage {
        height: 360px;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 3rem 1.25rem 2.5rem;
    }

    .panel {
        padding: 1.75rem;
    }

    .achievement-media img,
    .certificate-visual img {
        height: 180px;
    }

    .certificate-carousel {
        padding: 2rem 2rem 3rem;
    }

    .carousel-stage {
        height: 320px;
    }

    .certificate-slide {
        width: 100%;
    }
}

/* --- Projects Section --- */
.projects-section {
    margin-bottom: var(--spacing-xl);
}

.projects-section:last-child {
    margin-bottom: 0;
}

.projects-category {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

.projects-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.project-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(167, 139, 250, 0.05) 100%);
    border: 1px solid transparent;
    background-clip: padding-box;
    position: relative;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.1), 
                0 0 0 1px rgba(96, 165, 250, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
    box-shadow: 0 12px 40px rgba(96, 165, 250, 0.25), 
                0 0 0 1px rgba(96, 165, 250, 0.3),
                0 0 60px rgba(167, 139, 250, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.project-card:hover::before {
    opacity: 0.6;
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 70%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.project-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.project-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.project-links-icons {
    display: flex;
    gap: var(--spacing-sm);
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
}

.project-link img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.project-link:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(167, 139, 250, 0.25) 100%);
    border-color: rgba(96, 165, 250, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.project-link:hover img {
    opacity: 1;
    filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.project-meta {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(147, 197, 253, 0.9);
    margin: 0;
    text-align: right;
    white-space: nowrap;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(167, 139, 250, 0.15) 100%);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

/* --- Certificate Lightbox --- */
.certificate-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-lightbox.active {
    opacity: 1;
}

.certificate-lightbox.closing {
    opacity: 0;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    padding: 2rem;
    z-index: 1;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(96, 165, 250, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}
