@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

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

:root {
    --primary: #00f2ff;
    --secondary: #7b2cff;
    --accent: #ff00ff;
    --neon: #39ff14;
    --warning: #ffb800;
    --bg-dark: #04060f;
    --bg-deep: #02030a;
    --bg-card: rgba(12, 18, 38, 0.65);
    --bg-card-solid: #0a1024;
    --line: rgba(0, 242, 255, 0.18);
    --line-strong: rgba(0, 242, 255, 0.45);
    --text: #d6e8ff;
    --text-dim: rgba(214, 232, 255, 0.55);
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --display: 'Orbitron', sans-serif;
    --body: 'Rajdhani', sans-serif;
    --glow-cyan: 0 0 20px rgba(0, 242, 255, 0.5);
    --glow-purple: 0 0 20px rgba(123, 44, 255, 0.5);
    --glow-neon: 0 0 14px rgba(57, 255, 20, 0.55);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body);
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

::selection {
    background: rgba(0, 242, 255, 0.35);
    color: #fff;
}

/* ========== Background Layers ========== */

.grid-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 242, 255, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(123, 44, 255, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 0% 50%, rgba(255, 0, 255, 0.08) 0%, transparent 55%),
        var(--bg-dark);
    pointer-events: none;
    z-index: 0;
}

.grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

.grid-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70vh;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(123, 44, 255, 0.12) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(400px) rotateX(60deg);
    transform-origin: bottom;
    mask-image: linear-gradient(to top, #000, transparent);
    -webkit-mask-image: linear-gradient(to top, #000, transparent);
}

.scan-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0, 242, 255, 0.015) 3px,
        rgba(0, 242, 255, 0.015) 4px
    );
}

.scan-overlay::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, rgba(0, 242, 255, 0.04), transparent);
    animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
    0% { top: -200px; }
    100% { top: 100vh; }
}

.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    mix-blend-mode: screen;
    will-change: left, top;
}

.stars,
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: drift 8s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    50% { transform: translate(20px, -30px); opacity: 1; }
}

/* ========== Scroll Progress ========== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    box-shadow: 0 0 10px var(--primary);
    z-index: 1100;
    transition: width 0.1s;
}

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

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(4, 6, 15, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary);
    font-size: 0.95rem;
    text-shadow: var(--glow-cyan);
}

.nav-brand .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.15), rgba(123, 44, 255, 0.15));
    font-size: 0.9rem;
    position: relative;
}

.nav-brand .brand-mark::before,
.nav-brand .brand-mark::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border: 1px solid var(--primary);
}

.nav-brand .brand-mark::before {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
}

.nav-brand .brand-mark::after {
    bottom: -2px;
    right: -2px;
    border-left: 0;
    border-top: 0;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-left: auto;
    margin-right: 2rem;
}

.nav-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px var(--neon);
    animation: blinkDot 1.5s ease-in-out infinite;
}

@keyframes blinkDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0.2rem;
    transition: color 0.3s;
}

nav a .nav-num {
    color: var(--text-dim);
    margin-right: 0.4rem;
    font-family: var(--mono);
    font-size: 0.75rem;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 8px var(--primary);
    transition: width 0.3s;
}

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

nav a:hover::after {
    width: 100%;
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(123, 44, 255, 0.25) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    border: 1px dashed rgba(0, 242, 255, 0.3);
    border-radius: 50%;
    animation: rotate 30s linear infinite;
    z-index: 1;
}

.hero-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 720px;
    height: 720px;
    border: 1px solid rgba(123, 44, 255, 0.2);
    border-radius: 50%;
    animation: rotate 50s linear infinite reverse;
    z-index: 1;
    pointer-events: none;
}

.hero-orbit::before,
.hero-orbit::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--primary);
}

.hero-orbit::before {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-orbit::after {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-corners {
    position: absolute;
    inset: 80px 5%;
    pointer-events: none;
    z-index: 1;
}

.hero-corners span {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--primary);
    border-style: solid;
    border-width: 0;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

.hero-corners span:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.hero-corners span:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.hero-corners span:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.hero-corners span:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.hero-meta {
    position: absolute;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    z-index: 2;
    pointer-events: none;
}

.hero-meta.tl { top: 100px; left: 5%; }
.hero-meta.tr { top: 100px; right: 5%; text-align: right; }
.hero-meta.bl { bottom: 60px; left: 5%; }
.hero-meta.br { bottom: 60px; right: 5%; text-align: right; }

.hero-meta .label {
    color: var(--primary);
    margin-right: 0.5rem;
}

.hero-meta div + div {
    margin-top: 0.3rem;
}

.hero-content {
    text-align: center;
    z-index: 3;
    position: relative;
}

.hero-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--primary);
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    padding: 0.4rem 1.2rem;
    border: 1px solid var(--line-strong);
    border-radius: 30px;
    background: rgba(0, 242, 255, 0.05);
    text-transform: uppercase;
    position: relative;
}

.hero-tag::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--neon);
    border-radius: 50%;
    margin-right: 0.6rem;
    box-shadow: 0 0 8px var(--neon);
    animation: blinkDot 1.5s infinite;
    transform: translateY(-2px);
}

.hero-content h1 {
    font-family: var(--display);
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(135deg, var(--primary) 0%, #ffffff 30%, var(--secondary) 60%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 60px rgba(0, 242, 255, 0.5);
    position: relative;
    animation: glow 3s ease-in-out infinite alternate;
}

.hero-content h1::before,
.hero-content h1::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    pointer-events: none;
    mix-blend-mode: screen;
}

.hero-content h1::before {
    animation: glitchA 4s infinite steps(2, end);
    color: var(--primary);
    text-shadow: -2px 0 var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.hero-content h1::after {
    animation: glitchB 4s infinite steps(2, end);
    color: var(--secondary);
    text-shadow: 2px 0 var(--primary);
    clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
}

@keyframes glitchA {
    0%, 92%, 100% { transform: translate(0); opacity: 0; }
    93% { transform: translate(-3px, 0); opacity: 0.8; }
    94% { transform: translate(2px, 0); opacity: 0.8; }
    95% { transform: translate(0); opacity: 0; }
}

@keyframes glitchB {
    0%, 90%, 100% { transform: translate(0); opacity: 0; }
    91% { transform: translate(3px, 0); opacity: 0.8; }
    92% { transform: translate(-2px, 0); opacity: 0.8; }
    93% { transform: translate(0); opacity: 0; }
}

@keyframes glow {
    from { filter: drop-shadow(0 0 20px rgba(0, 242, 255, 0.5)); }
    to { filter: drop-shadow(0 0 40px rgba(123, 44, 255, 0.8)); }
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    letter-spacing: 6px;
    font-weight: 300;
}

.hero-terminal {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 1.5rem 0 2.5rem;
    letter-spacing: 1px;
}

.hero-terminal .prompt {
    color: var(--neon);
    margin-right: 0.5rem;
}

.hero-terminal .typed {
    color: var(--primary);
}

.hero-terminal .caret {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--primary);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 0.8s infinite;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    font-family: var(--display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--primary);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    border-radius: 999px;
}

.hero-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: translateX(-101%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.hero-btn .arrow {
    transition: transform 0.3s;
}

.hero-btn:hover {
    color: var(--bg-dark);
    box-shadow: 0 10px 40px rgba(0, 242, 255, 0.5);
}

.hero-btn:hover::before {
    transform: translateX(0);
}

.hero-btn:hover .arrow {
    transform: translateX(6px);
}

/* ========== Sections / Section title ========== */

section {
    padding: 6rem 5%;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--display);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: 4px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.section-title .num {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    border: 1px solid var(--line);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
}

.section-title span.label {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* ========== About / Contact ========== */

#about-contact {
    background: linear-gradient(180deg, transparent 0%, rgba(123, 44, 255, 0.06) 50%, transparent 100%);
}

.about-contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-section,
.contact-section {
    background: var(--bg-card);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    position: relative;
}

.about-section::before,
.contact-section::before {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px var(--neon);
    animation: blinkDot 1.6s infinite;
}

.about-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

.about-section .avatar-container {
    position: relative;
    padding: 6px;
}

.about-section .avatar {
    width: 180px;
    height: 180px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    position: relative;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { box-shadow: 0 0 30px rgba(0, 242, 255, 0.5), inset 0 0 20px rgba(0, 242, 255, 0.15); }
    100% { box-shadow: 0 0 50px rgba(123, 44, 255, 0.6), inset 0 0 20px rgba(123, 44, 255, 0.15); }
}

.about-section .avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
    z-index: -1;
    animation: rotateGradient 4s linear infinite;
    background-size: 200% 200%;
}

@keyframes rotateGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.about-section .about-text h3 {
    font-family: var(--display);
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    letter-spacing: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-section .about-text p {
    font-size: 1rem;
    line-height: 2;
    color: var(--text-dim);
    text-align: left;
}

.contact-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-section h3 {
    font-family: var(--display);
    font-size: 1.4rem;
    color: var(--primary);
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.contact-section h3::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.contact-section > p {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.contact-section .contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-section .contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 242, 255, 0.04);
    border: 1px solid var(--line);
    border-left: 2px solid var(--primary);
    transition: all 0.3s;
    font-family: var(--mono);
}

.contact-section .contact-item:hover {
    background: rgba(0, 242, 255, 0.1);
    transform: translateX(4px);
}

.contact-section .contact-item span:first-child {
    font-size: 1.2rem;
}

.contact-section .contact-item a {
    color: var(--text);
    text-decoration: none;
    word-break: break-all;
}

.contact-section .qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
}

.contact-section .qrcode {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.contact-section .qrcode img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-section .qrcode::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    animation: qrScan 2.5s linear infinite;
}

@keyframes qrScan {
    0% { top: 0; }
    50% { top: calc(100% - 2px); }
    100% { top: 0; }
}

.contact-section .qrcode-container span {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--mono);
    letter-spacing: 2px;
}

.typing {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========== Skills ========== */

#skills {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 242, 255, 0.04) 50%, transparent 100%);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 2rem 1.8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0, 242, 255, 0.08), transparent 60%),
        radial-gradient(circle at top right, rgba(123, 44, 255, 0.15), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transition: left 0.6s;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0, 242, 255, 0.08), transparent 60%),
        radial-gradient(circle at top right, rgba(123, 44, 255, 0.15), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transition: left 0.6s;
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 30px 60px rgba(0, 242, 255, 0.18), 0 0 0 1px rgba(0, 242, 255, 0.4) inset;
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card:hover::after {
    left: 100%;
}

.skill-card .skill-id {
    position: absolute;
    top: 14px;
    right: 16px;
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: floatIcon 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.4));
}

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

.skill-card h4 {
    font-family: var(--display);
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
    letter-spacing: 2px;
}

.skill-card p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.7;
    position: relative;
}

.skill-card:nth-child(2) .skill-icon { animation-delay: 0.3s; }
.skill-card:nth-child(3) .skill-icon { animation-delay: 0.6s; }
.skill-card:nth-child(4) .skill-icon { animation-delay: 0.9s; }
.skill-card:nth-child(5) .skill-icon { animation-delay: 1.2s; }
.skill-card:nth-child(6) .skill-icon { animation-delay: 1.5s; }

/* ========== Portfolio ========== */

#portfolio {
    background: linear-gradient(180deg, transparent 0%, rgba(255, 0, 255, 0.04) 50%, transparent 100%);
}

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

/* PPT作品区域限制卡片大小 */
#portfolio .portfolio-section:last-child .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
}

#portfolio .portfolio-section:last-child .portfolio-item {
    max-width: none;
}

.portfolio-item {
    background: var(--bg-card);
    border: 1px solid rgba(123, 44, 255, 0.25);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    border-radius: 16px;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.08), transparent);
    transition: left 0.6s;
    z-index: 4;
    pointer-events: none;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.08), transparent);
    transition: left 0.6s;
    z-index: 4;
    pointer-events: none;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    border-color: var(--secondary);
    box-shadow: 0 30px 60px rgba(123, 44, 255, 0.3), 0 0 0 1px rgba(123, 44, 255, 0.5) inset;
}

.portfolio-item:hover::before {
    left: 100%;
}

.portfolio-img {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    overflow: hidden;
}

.portfolio-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
    animation: shine 3s infinite;
}

.portfolio-img span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.portfolio-info {
    padding: 1.5rem;
    position: relative;
}

.portfolio-info h4 {
    font-family: var(--display);
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    color: var(--primary);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-info h4::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
    border-radius: 50%;
}

.portfolio-info p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.9rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.3);
    font-size: 0.72rem;
    color: var(--primary);
    font-family: var(--mono);
    letter-spacing: 1px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.tag:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.portfolio-section {
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-section:last-child {
    margin-bottom: 3rem;
}

.portfolio-section-title {
    font-family: var(--display);
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: 3px;
    position: relative;
    padding-left: 1.2rem;
    text-transform: uppercase;
}

.portfolio-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    box-shadow: 0 0 10px var(--secondary);
}

.portfolio-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line-strong), transparent);
    margin-left: 1rem;
}

.section-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 6px rgba(123, 44, 255, 0.5));
}

.view-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 2rem;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
    border-radius: 999px;
    overflow: hidden;
}

.view-more-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: translateX(-101%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.view-more-btn:hover {
    color: var(--bg-dark);
    box-shadow: 0 10px 40px rgba(0, 242, 255, 0.5);
}

.view-more-btn:hover::before {
    transform: translateX(0);
}

.view-more-btn .arrow {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.view-more-btn:hover .arrow {
    transform: translateX(4px);
}

/* ========== Modal ========== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(4, 6, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card-solid);
    border: 1px solid var(--line-strong);
    width: 92%;
    max-width: 1200px;
    max-height: 88vh;
    overflow: hidden;
    animation: modalSlide 0.3s ease;
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.2);
}

@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.95) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 242, 255, 0.04);
}

.modal-title {
    font-family: var(--display);
    font-size: 1.2rem;
    color: var(--secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.modal-close {
    font-size: 2rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
}

.modal-close:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    max-height: calc(88vh - 80px);
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

/* ========== Video ========== */

.video-item {
    position: relative;
    cursor: pointer;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, #0a0e1f, #15183a);
    overflow: hidden;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-container iframe.video-player {
    border: none;
}

.video-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
    pointer-events: none;
}

.video-item.playing .play-icon {
    opacity: 0;
    pointer-events: none;
}

.video-container .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 242, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--bg-dark);
    z-index: 3;
    transition: all 0.3s;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.6);
}

.video-container .play-icon::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: ringPulse 2s ease-out infinite;
}

@keyframes ringPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

.video-item:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.9);
}

.video-container .fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text);
    z-index: 3;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
}

.video-container:hover .fullscreen-btn {
    opacity: 1;
}

.video-container .fullscreen-btn:hover {
    background: rgba(0, 242, 255, 0.85);
    color: var(--bg-dark);
    transform: scale(1.05);
}

/* ========== PPT Modal ========== */

.ppt-modal-content {
    width: 90%;
    max-width: 1000px;
}

.ppt-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
}

.ppt-viewer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ppt-viewer img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ppt-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ppt-nav-btn {
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppt-nav-btn:hover {
    background: var(--secondary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(123, 44, 255, 0.5);
}

.ppt-page-info {
    font-family: var(--mono);
    color: var(--text-dim);
    font-size: 0.9rem;
}

.video-fullscreen-modal {
    background: rgba(0, 0, 0, 0.96);
}

.video-fullscreen-content {
    width: 90%;
    max-width: 960px;
    background: var(--bg-deep);
    border: 1px solid var(--primary);
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 242, 255, 0.3);
}

.portfolio-item.video-item .portfolio-info {
    padding: 1.2rem 1.5rem;
}

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

footer {
    background: rgba(2, 3, 10, 0.9);
    border-top: 1px solid var(--line);
    padding: 1.5rem 2rem;
    text-align: center;
    position: relative;
    z-index: 5;
}

footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 8px var(--primary);
}

footer p {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 3px;
}

footer .accent {
    color: var(--primary);
}

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

@media (max-width: 960px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.8rem 4%;
        flex-wrap: wrap;
    }

    .nav-status {
        display: none;
    }

    nav ul {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        order: 3;
        margin-top: 0.6rem;
    }

    nav a {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }

    .hero-content p {
        font-size: 0.95rem;
        letter-spacing: 3px;
    }

    .hero-meta {
        font-size: 0.65rem;
    }

    .hero::after {
        width: 320px;
        height: 320px;
    }

    .hero-orbit {
        width: 380px;
        height: 380px;
    }

    .about-contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* PPT卡片在小屏幕下单列显示 */
    #portfolio .portfolio-section:last-child .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .avatar {
        width: 150px;
        height: 150px;
        font-size: 4rem;
    }

    .section-title {
        font-size: 1.5rem;
        gap: 0.8rem;
    }

    .section-title::before,
    .section-title::after {
        flex: 0.3;
    }

    section {
        padding: 4rem 5%;
    }
}

/* ========== Bilibili Video Placeholder ========== */

.bilibili-cover {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.bilibili-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.bilibili-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 2;
    pointer-events: none;
}

.bilibili-cover .fullscreen-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 242, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--bg-dark);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bilibili-cover:hover .fullscreen-btn {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
}

/* ========== Bilibili iframe Fullscreen ========== */

.video-fullscreen-body {
    position: relative;
    padding: 24px;
    background: #000;
}

.fullscreen-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
    background: #000;
}
