/* ===================================
   TABSHIR KHANDAKER — PORTFOLIO
   Apple-esque, modern, clean design
   =================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #060608;
    --color-surface: #0e0f11;
    --color-surface-hover: #151619;
    --color-border: rgba(255, 255, 255, 0.06);
    --color-text: #eef0f4;
    --color-text-secondary: #8a8f98;
    --color-text-tertiary: #5c6370;
    --color-accent: #38bdf8;
    --color-accent-light: #7dd3fc;
    --color-accent-glow: rgba(56, 189, 248, 0.12);
    --gradient-hero: linear-gradient(135deg, #0a1628 0%, #0c1a30 30%, #091e3a 60%, #0a1628 100%);
    --gradient-text: linear-gradient(135deg, #38bdf8 0%, #22d3ee 40%, #67e8f9 70%, #38bdf8 100%);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1100px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.section-heading {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 48px;
    color: var(--color-text);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Entry Overlay --- */
.entry-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #030304;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.entry-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.entry-inner {
    text-align: center;
}

.entry-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: 12px;
}

.entry-name {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 200;
    letter-spacing: -0.03em;
    color: var(--color-text);
    margin-bottom: 36px;
}

.entry-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    border-radius: 100px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(56, 189, 248, 0.08);
    color: var(--color-accent-light);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.entry-btn i {
    font-size: 0.8rem;
}

.entry-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.12);
    transform: scale(1.04);
}

.entry-btn:active {
    transform: scale(0.97);
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 100px;
    background: var(--color-accent);
    color: #fff;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--color-accent-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 20px;
    height: 1.5px;
    background: var(--color-text);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:first-child {
    transform: rotate(45deg) translate(2px, 2px);
}

.nav-toggle.active span:last-child {
    transform: rotate(-45deg) translate(2px, -2px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 28px;
}

.mobile-menu-links a {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    transition: var(--transition);
}

.mobile-menu-links a:hover {
    color: var(--color-text);
}

.mobile-cta {
    margin-top: 16px;
    padding: 12px 32px !important;
    border-radius: 100px;
    background: var(--color-accent);
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #050505;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(56, 189, 248, 0.04) 0%, transparent 70%),
                radial-gradient(ellipse 60% 50% at 30% 60%, rgba(34, 211, 238, 0.03) 0%, transparent 60%),
                radial-gradient(ellipse 50% 40% at 70% 30%, rgba(103, 232, 249, 0.02) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.hero .hero-scroll {
    z-index: 4;
    position: relative;
}

/* Prism WebGL Background */
.prism-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.prism-container canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Hero bottom fade — smooth transition into content */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(6, 6, 8, 0.3) 30%,
        rgba(6, 6, 8, 0.7) 60%,
        var(--color-bg) 100%
    );
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 0 24px;
    z-index: 3;
}

.hero-greeting {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-accent-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-name {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 200;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 20px;
    color: var(--color-text);
}

.hero-tagline {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: 48px;
    letter-spacing: -0.01em;
}

.hero-accent {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--color-accent-light);
    font-weight: 400;
    transition: opacity 0.4s ease;
}

.hero-accent.fade-out {
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-accent-light);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.25);
}

.btn-primary:not([data-magnet]):hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover {
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1rem;
}

/* Scroll indicator */
.hero-scroll {
    margin-top: 64px;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    margin: 0 auto;
    position: relative;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.03);
}

.scroll-dot {
    width: 3px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 8px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

/* --- SpotlightCard Effect --- */
.card-spotlight {
    position: relative;
    overflow: hidden;
    --mouse-x: 50%;
    --mouse-y: 50%;
    --spotlight-color: rgba(56, 189, 248, 0.08);
}

.card-spotlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        var(--spotlight-color),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.card-spotlight:hover::after,
.card-spotlight:focus-within::after {
    opacity: 1;
}

/* Ensure card children stay above the spotlight layer */
.card-spotlight > * {
    position: relative;
    z-index: 2;
}

/* --- Magnet Effect --- */
.magnet-wrap {
    position: relative;
    display: inline-block;
}

.magnet-inner {
    will-change: transform;
    transition: transform 0.5s ease-in-out;
}

.magnet-inner.active {
    transition: transform 0.3s ease-out;
}

/* --- Sections Base --- */
.section {
    padding: 120px 0;
}

/* --- About --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-description {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-description strong {
    color: var(--color-text);
    font-weight: 500;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 16px;
    text-align: center;
    transition: var(--transition);
    min-width: 0;
}

.stat-card:hover {
    border-color: rgba(56, 189, 248, 0.15);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.15));
    white-space: nowrap;
    overflow: visible;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--color-text-tertiary);
    font-weight: 400;
}

/* --- Experience / Timeline --- */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 8px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 2px solid var(--color-accent);
    z-index: 1;
}

.timeline-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(56, 189, 248, 0.12);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.timeline-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--color-accent-light);
    margin-top: 2px;
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    white-space: nowrap;
    font-weight: 400;
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-details li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    padding-left: 16px;
    position: relative;
    line-height: 1.6;
}

.timeline-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-accent);
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.25), transparent);
    opacity: 0;
    transition: var(--transition);
    z-index: 3;
}

.project-card:hover {
    border-color: rgba(56, 189, 248, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(56, 189, 248, 0.04) 100%);
    border-color: rgba(56, 189, 248, 0.1);
}

.project-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--color-accent-glow);
    color: var(--color-accent-light);
    border: 1px solid rgba(56, 189, 248, 0.15);
}

/* Project image placeholder */
.project-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.06) 0%, rgba(14, 15, 17, 0.8) 100%);
    border: 1px solid var(--color-border);
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-md);
    transition: transform 0.4s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.03);
}

/* Fallback for missing images */
.project-img img[src=""],
.project-img img:not([src]),
.project-img img[alt]:not([src*="."]) {
    display: none;
}

.project-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(14, 15, 17, 0.4) 100%);
    pointer-events: none;
    border-radius: var(--radius-md);
}

/* Project metrics row */
.project-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.project-metrics span {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(56, 189, 248, 0.08);
    color: var(--color-accent-light);
    border: 1px solid rgba(56, 189, 248, 0.12);
    font-weight: 400;
}

.project-metrics span strong {
    font-weight: 600;
    color: var(--color-accent);
}

.project-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text);
}

.project-role {
    font-size: 0.82rem;
    color: var(--color-accent-light);
    margin-bottom: 12px;
    font-weight: 400;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-desc strong {
    color: var(--color-text);
    font-weight: 500;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.project-tags span {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-tertiary);
    border: 1px solid var(--color-border);
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    font-size: 0.85rem;
    color: var(--color-accent-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.project-link:hover {
    color: var(--color-accent);
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-category {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: var(--transition);
}

.skill-category:hover {
    border-color: rgba(56, 189, 248, 0.12);
}

.skill-category h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-pill {
    font-size: 0.8rem;
    font-weight: 400;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(56, 189, 248, 0.06);
    color: var(--color-text-secondary);
    border: 1px solid rgba(56, 189, 248, 0.08);
    transition: var(--transition);
}

.skill-pill:hover {
    background: rgba(56, 189, 248, 0.12);
    color: var(--color-text);
    border-color: rgba(56, 189, 248, 0.2);
}

/* --- Education --- */
.education-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.edu-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}

.edu-card:hover {
    border-color: rgba(56, 189, 248, 0.12);
    transform: translateY(-2px);
}

.edu-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--color-accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edu-icon i {
    font-size: 1.5rem;
    color: var(--color-accent-light);
}

.edu-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.edu-degree {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

.edu-date {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

/* --- Contact --- */
.contact {
    background: linear-gradient(180deg, var(--color-bg) 0%, rgba(56, 189, 248, 0.02) 100%);
}

.contact-inner {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-desc {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

.contact-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    transition: var(--transition);
}

.contact-card i {
    font-size: 1.1rem;
    color: var(--color-accent-light);
}

.contact-card:hover {
    border-color: rgba(56, 189, 248, 0.15);
    color: var(--color-text);
    transform: translateY(-2px);
    background: var(--color-surface-hover);
}

.contact-cta {
    margin-top: 8px;
}

/* --- Footer --- */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--color-border);
}

.footer-inner {
    text-align: center;
}

.footer-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.footer-quote {
    font-size: 0.82rem;
    font-style: italic;
    color: var(--color-text-tertiary);
    margin-bottom: 20px;
    font-family: var(--font-serif);
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--color-text-tertiary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-accent-light);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

/* --- Floating Music Player --- */
.music-player {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-radius: 100px;
    background: rgba(14, 15, 17, 0.55);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
    will-change: transform;
    transition: box-shadow 0.3s ease;
    cursor: default;
    user-select: none;
}

.music-player:hover {
    border-color: rgba(56, 189, 248, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(56, 189, 248, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(56, 189, 248, 0.12);
    color: var(--color-accent-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.mp-btn:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.25);
    transform: scale(1.08);
}

.mp-btn:active {
    transform: scale(0.95);
}

.mp-slider {
    position: relative;
    display: flex;
    align-items: center;
    width: 80px;
    height: 28px;
    cursor: grab;
    touch-action: none;
}

.mp-slider:active {
    cursor: grabbing;
}

.mp-track {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: height 0.2s ease;
}

.music-player:hover .mp-track {
    height: 6px;
}

.mp-range {
    position: absolute;
    height: 100%;
    width: 50%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    transition: width 0.05s linear;
    transform-origin: left center;
}

.mp-vol-icon {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    transition: color 0.25s ease;
}

.music-player:hover .mp-vol-icon {
    color: var(--color-text-secondary);
}

/* Marquee credit */
.mp-credit {
    position: relative;
    width: 100px;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, #000 15%, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 15%, #000 85%, transparent 100%);
    cursor: default;
    flex-shrink: 0;
}

.mp-marquee {
    display: flex;
    width: max-content;
    animation: mpMarquee 12s linear infinite;
}

.mp-marquee span {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    white-space: nowrap;
    transition: color 0.25s ease;
}

.mp-credit:hover .mp-marquee span {
    color: var(--color-accent-light);
}

.mp-credit:hover .mp-marquee {
    animation-play-state: paused;
}

@keyframes mpMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Credit tooltip */
.mp-tooltip {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(14, 15, 17, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    font-size: 0.68rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

.mp-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(14, 15, 17, 0.85);
}

.mp-credit:hover .mp-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Divider */
.mp-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* Elastic stretch feedback */
.mp-slider.stretching .mp-track {
    transition: none;
}

@media (max-width: 480px) {
    .music-player {
        bottom: 16px;
        right: 16px;
        gap: 10px;
        padding: 8px 14px;
    }

    .mp-credit {
        width: 72px;
    }

    .mp-slider {
        width: 48px;
    }
}

/* --- ScrollReveal word effect --- */
[data-scroll-reveal] {
    transform-origin: 0% 50%;
}

[data-scroll-reveal] .sr-word {
    display: inline-block;
    transition: none;
    will-change: opacity, filter;
}

/* Preserve gradient on text-gradient spans inside scroll reveal */
[data-scroll-reveal] .text-gradient .sr-word {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Animations --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.5s; }
.delay-4 { animation-delay: 0.7s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .hero-name {
        font-size: clamp(2.4rem, 10vw, 4rem);
    }

    .section {
        padding: 80px 0;
    }

    .section-heading {
        font-size: clamp(1.8rem, 5vw, 2.4rem);
        margin-bottom: 36px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card.featured {
        grid-column: span 1;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .education-cards {
        grid-template-columns: 1fr;
    }

    .timeline-header {
        flex-direction: column;
    }

    .timeline-date {
        order: -1;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 20px 16px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
