/* ====== Reset & Base ====== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #070709;
    --bg-secondary: #0d0d10;
    --bg-card: #111115;
    --bg-card-hover: #16161c;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #e8e8ec;
    --text-secondary: #8a8a94;
    --text-muted: #5a5a64;
    --accent: #00e0c6;
    --accent-glow: rgba(0, 224, 198, 0.35);
    --accent-soft: rgba(0, 224, 198, 0.08);
    --accent-purple: #8b5cf6;
    --accent-orange: #ff9900;
    --max-width: 1700px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 60px;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ====== Navbar ====== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(7, 7, 9, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s var(--transition);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.nav-logo span {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 48px;
    list-style: none;
}

.nav-link {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s var(--transition);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 22px;
    border: 1px solid var(--border-hover);
    border-radius: 100px;
    color: var(--text-primary);
    transition: all 0.25s var(--transition);
}

.nav-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    box-shadow: 0 0 24px var(--accent-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s var(--transition);
}

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

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: #070709;
    background-image:
        linear-gradient(90deg, rgba(7, 7, 9, 0.88) 0%, rgba(7, 7, 9, 0.65) 35%, rgba(7, 7, 9, 0.35) 65%, rgba(7, 7, 9, 0.15) 100%),
        linear-gradient(180deg, rgba(7, 7, 9, 0.3) 0%, rgba(7, 7, 9, 0.15) 40%, rgba(7, 7, 9, 0.65) 100%),
        url('./hero-bg-camera.jpg');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

@media (min-width: 901px) {
    .hero-bg {
        background-attachment: fixed;
    }
}

#particleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 224, 198, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 224, 198, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 30% 50%, black 15%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 50%, black 15%, transparent 70%);
    z-index: 1;
    opacity: 0.5;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.6;
    animation: glowPulse 8s ease-in-out infinite;
}

.glow-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    top: -250px;
    right: -150px;
}

.glow-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(100, 80, 255, 0.3), transparent 70%);
    bottom: -200px;
    left: -100px;
    animation-delay: 2s;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 80, 160, 0.2), transparent 70%);
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.glow-3 {
    animation-name: glowPulse3;
}

@keyframes glowPulse3 {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.6; transform: translateX(-50%) scale(1.15); }
}

.floating-shape {
    position: absolute;
    border: 1px solid rgba(0, 224, 198, 0.15);
    border-radius: 20%;
    animation: floatShape 12s ease-in-out infinite;
    z-index: 2;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 8%;
    border-radius: 50%;
    border-color: rgba(0, 224, 198, 0.2);
    animation-duration: 14s;
    animation-delay: 0s;
}

.shape-2 {
    width: 50px;
    height: 50px;
    top: 65%;
    right: 12%;
    border-radius: 8px;
    border-color: rgba(100, 80, 255, 0.25);
    animation-duration: 10s;
    animation-delay: 3s;
    transform: rotate(45deg);
}

.shape-3 {
    width: 120px;
    height: 120px;
    bottom: 15%;
    left: 20%;
    border-radius: 50%;
    border-style: dashed;
    border-color: rgba(255, 80, 160, 0.15);
    animation-duration: 18s;
    animation-delay: 6s;
}

@keyframes floatShape {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-15px, -50px) rotate(180deg);
    }
    75% {
        transform: translate(-30px, -20px) rotate(270deg);
    }
}

.shape-2 {
    animation-name: floatShape2;
}

@keyframes floatShape2 {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    25% { transform: rotate(135deg) translate(15px, -25px); }
    50% { transform: rotate(225deg) translate(-10px, -40px); }
    75% { transform: rotate(315deg) translate(-25px, -15px); }
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
    animation: scanDown 6s linear infinite;
    z-index: 3;
    box-shadow: 0 0 20px var(--accent-glow);
}

@keyframes scanDown {
    0% { top: -2px; opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

/* ====== Photography Decorations ====== */
.photo-deco {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    color: var(--accent);
}

.photo-deco svg {
    width: 100%;
    height: 100%;
}

.photo-deco-1 {
    width: 260px;
    height: 260px;
    top: 50%;
    right: -80px;
    transform: translateY(-50%);
    animation: lensSpin 30s linear infinite;
    opacity: 0.5;
}

.photo-deco-2 {
    width: 180px;
    height: 120px;
    bottom: 18%;
    right: 15%;
    animation: cameraFloat 14s ease-in-out infinite;
    color: rgba(100, 80, 255, 0.7);
    opacity: 0.55;
}

.photo-deco-3 {
    width: 100px;
    height: 100px;
    top: 18%;
    right: 25%;
    animation: lensSpin 20s linear infinite reverse;
    opacity: 0.45;
}

.photo-deco-4 {
    width: 160px;
    height: 160px;
    top: 55%;
    left: 6%;
    animation: lensSpin 40s linear infinite;
    opacity: 0.35;
}

.photo-deco-5 {
    width: 120px;
    height: 45px;
    top: 35%;
    left: 3%;
    animation: cameraFloat 18s ease-in-out infinite reverse;
    color: rgba(255, 140, 80, 0.6);
    opacity: 0.5;
}

@keyframes lensSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.photo-deco-1 {
    animation: lensSpin 30s linear infinite, floatDrift 12s ease-in-out infinite;
}

@keyframes floatDrift {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-55%) translateX(-15px); }
}

.photo-deco-3 {
    animation: lensSpin 20s linear infinite reverse, floatDriftSmall 10s ease-in-out infinite;
}

@keyframes floatDriftSmall {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(10px) translateY(-12px); }
}

@keyframes cameraFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-18px) rotate(3deg); }
    50% { transform: translateY(-8px) rotate(-2deg); }
    75% { transform: translateY(-22px) rotate(1deg); }
}

.photo-deco-5 {
    animation: cameraFloat 18s ease-in-out infinite reverse, floatDriftLeft 14s ease-in-out infinite;
}

@keyframes floatDriftLeft {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(15px); }
}

.photo-deco-4 {
    animation: lensSpin 40s linear infinite, floatDriftRight 16s ease-in-out infinite;
}

@keyframes floatDriftRight {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(12px) translateY(-10px); }
}

.hero-container {
    position: relative;
    z-index: 1;
    padding: 0 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--accent);
    padding: 8px 16px;
    background: var(--accent-soft);
    border: 1px solid rgba(0, 224, 198, 0.2);
    border-radius: 100px;
    margin-bottom: 36px;
    letter-spacing: 0.02em;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: clamp(56px, 9vw, 140px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
}

.hero-title .line {
    display: block;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 640px;
    margin-bottom: 48px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 80px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 0 40px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 48px;
}

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

.meta-num {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.meta-num span {
    font-size: 20px;
    color: var(--accent);
    margin-left: 2px;
}

.meta-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.meta-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ====== Section Common ====== */
section {
    padding: 140px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-tag {
    display: inline-block;
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 20px auto 0;
    line-height: 1.7;
}

/* ====== About ====== */
.about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: start;
}

.about-profile {
    position: sticky;
    top: 120px;
}

.profile-image {
    position: relative;
    width: 300px;
    height: 340px;
    margin: 0 auto 32px;
}

.profile-spotlight {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 224, 198, 0.15) 0%, rgba(0, 224, 198, 0.05) 40%, transparent 70%);
    filter: blur(20px);
    z-index: 0;
    animation: spotlightPulse 4s ease-in-out infinite;
}

@keyframes spotlightPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
    50% { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

.profile-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    pointer-events: none;
}

.profile-ring-outer {
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 224, 198, 0.15);
    animation: ringRotate 20s linear infinite;
}

.profile-ring-outer::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 224, 198, 0.3);
    animation: ringRotateReverse 30s linear infinite;
}

.profile-ring-middle {
    width: 260px;
    height: 260px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 224, 198, 0.2);
    border-top-color: var(--accent);
    border-right-color: transparent;
    animation: ringRotate 8s linear infinite;
}

.profile-ring-inner {
    width: 220px;
    height: 220px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: radial-gradient(circle at 30% 30%, rgba(0, 224, 198, 0.08) 0%, transparent 60%);
}

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

@keyframes ringRotateReverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.profile-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translate(-50%, -50%);
    animation: ringRotate 16s linear infinite;
}

.orbit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(0, 224, 198, 0.4);
}

.orbit-dot-1 {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent);
}

.orbit-dot-2 {
    bottom: 15%;
    right: 0;
    transform: translate(50%, 50%);
    background: var(--accent-purple);
    box-shadow: 0 0 12px var(--accent-purple), 0 0 24px rgba(139, 92, 246, 0.4);
}

.orbit-dot-3 {
    top: 30%;
    left: -5%;
    transform: translate(50%, -50%);
    background: var(--accent-orange);
    box-shadow: 0 0 12px var(--accent-orange), 0 0 24px rgba(255, 153, 0, 0.4);
}

.profile-avatar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 240px;
    object-fit: contain;
    object-position: center top;
    z-index: 2;
    background: transparent;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(0, 224, 198, 0.15));
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 65%, rgba(0, 0, 0, 0.6) 80%, rgba(0, 0, 0, 0.2) 92%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 65%, rgba(0, 0, 0, 0.6) 80%, rgba(0, 0, 0, 0.2) 92%, transparent 100%);
    -webkit-mask-composite: source-over;
}

.profile-deco {
    position: absolute;
    font-size: 14px;
    color: var(--accent);
    opacity: 0.5;
    font-weight: 300;
    z-index: 3;
    line-height: 1;
}

.profile-deco-tl { top: 8px; left: 8px; }
.profile-deco-tr { top: 8px; right: 8px; }
.profile-deco-bl { bottom: 40px; left: 8px; }
.profile-deco-br { bottom: 40px; right: 8px; }

.profile-initials {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent);
    opacity: 0.4;
    z-index: 3;
    padding: 4px 12px;
    border: 1px solid rgba(0, 224, 198, 0.2);
    border-radius: 4px;
    background: rgba(0, 224, 198, 0.05);
    text-transform: uppercase;
}

.profile-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s infinite;
}

.profile-info h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-role {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 20px;
}

.profile-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s var(--transition);
}

.contact-item:hover {
    color: var(--text-primary);
}

.about-story h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
}

.about-story p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.timeline {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.25s var(--transition);
}

.timeline-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.timeline-year {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
    min-width: 120px;
}

.timeline-role {
    font-size: 14px;
    color: var(--text-secondary);
}

.about-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.stat-card {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

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

.stat-num {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.03em;
}

.stat-suffix {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    margin-left: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ====== Projects ====== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.project-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.project-image img,
.project-image video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-video {
    background: #000;
}

.project-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s;
    pointer-events: none;
}

.project-card:hover .project-play-overlay {
    opacity: 0.5;
}

.project-visual {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-1 {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.visual-2 {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

.visual-3 {
    background: linear-gradient(135deg, #2d1b3d, #1f1033, #0d0620);
}

.visual-4 {
    background: linear-gradient(135deg, #1a3a2a, #0d2818, #051810);
}

.visual-5 {
    background: linear-gradient(135deg, #3d1a1a, #2a0d0d, #180505);
}

.visual-6 {
    background: linear-gradient(135deg, #2a2a1a, #1a1a0d, #101005);
}

.visual-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 224, 198, 0.15) 0%, transparent 40%),
        linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
}

.visual-label {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.12);
}

.project-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
}

.project-tag {
    font-size: 12px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-hover);
    border-radius: 100px;
    color: var(--text-primary);
}

.project-info {
    padding: 24px 28px 28px;
}

.project-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: color 0.2s var(--transition);
}

.project-card:hover .project-info h3 {
    color: var(--accent);
}

.project-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-meta span {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--accent-soft);
    border: 1px solid rgba(0, 224, 198, 0.15);
    border-radius: 6px;
    color: var(--accent);
}

/* ====== Skills ====== */
.skills {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.skill-card {
    padding: 40px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.4s var(--transition);
    position: relative;
}

.skill-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    background: var(--bg-card-hover);
}

.skill-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s var(--transition);
}

.icon-video {
    background: linear-gradient(135deg, rgba(0, 224, 198, 0.15), rgba(0, 224, 198, 0.05));
    color: var(--accent);
}

.icon-brand {
    background: linear-gradient(135deg, rgba(100, 80, 255, 0.15), rgba(100, 80, 255, 0.05));
    color: #8b7cf6;
}

.icon-design {
    background: linear-gradient(135deg, rgba(255, 140, 80, 0.15), rgba(255, 140, 80, 0.05));
    color: #ff8c50;
}

.icon-ai {
    background: linear-gradient(135deg, rgba(255, 80, 160, 0.15), rgba(255, 80, 160, 0.05));
    color: #ff50a0;
}

.icon-data {
    background: linear-gradient(135deg, rgba(80, 200, 255, 0.15), rgba(80, 200, 255, 0.05));
    color: #50c8ff;
}

.icon-team {
    background: linear-gradient(135deg, rgba(255, 200, 80, 0.15), rgba(255, 200, 80, 0.05));
    color: #ffc850;
}

.skill-card:hover .skill-icon {
    transform: scale(1.05);
}

.skill-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.skill-card > p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tags span {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
}

/* ====== Contact ====== */
.contact {
    position: relative;
    overflow: hidden;
}

.contact-inner {
    text-align: center;
    position: relative;
    z-index: 1;
}

.contact-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 24px 0 28px;
}

.contact-title .accent {
    color: var(--accent);
}

.contact-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 64px;
}

.contact-btn {
    padding: 18px 36px;
    font-size: 15px;
}

.contact-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.skill-pill {
    font-size: 13px;
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    transition: all 0.25s var(--transition);
    cursor: default;
}

.skill-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* ====== Footer ====== */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    font-size: 20px;
    font-weight: 600;
}

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

.footer-left p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.footer-center {
    display: flex;
    gap: 32px;
}

.footer-center a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s var(--transition);
}

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

.footer-right span {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-link {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: color 0.2s, border-color 0.2s;
}

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

/* ====== Project Detail Modal ====== */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.project-modal.hidden {
    display: none !important;
}

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

.project-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 9, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.project-modal .modal-container {
    position: relative;
    width: 90%;
    max-width: 960px;
    max-height: 90vh;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.4s var(--transition);
}

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

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.6);
    transform: rotate(90deg);
}

.modal-body {
    overflow-y: auto;
    flex: 1;
}

.modal-project-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-project-hero img,
.modal-project-hero video {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    display: block;
}

.modal-project-hero .hero-visual {
    width: 100%;
    height: 400px;
}

.modal-video-grid {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border);
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.modal-video-grid::-webkit-scrollbar {
    height: 4px;
}

.modal-video-grid::-webkit-scrollbar-track {
    background: transparent;
}

.modal-video-grid::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}

.modal-video-item {
    position: relative;
    flex: 0 0 auto;
    width: 120px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    background: #000;
}

.modal-video-item:hover {
    border-color: rgba(0, 224, 198, 0.5);
}

.modal-video-item.active {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 224, 198, 0.3);
}

.modal-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
}

.modal-video-item:hover .modal-video-play {
    opacity: 1;
}

.modal-video-label {
    position: absolute;
    bottom: 2px;
    left: 4px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    padding: 1px 4px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
}

.modal-video-player-container {
    width: 100%;
    background: #000;
}

.modal-video-player-container video {
    width: 100%;
    max-height: 50vh;
    object-fit: contain;
    display: block;
}

.modal-project-hero .play-big-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.modal-project-hero .play-big-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.modal-project-hero .play-big-btn svg {
    width: 80px;
    height: 80px;
    color: var(--accent);
    filter: drop-shadow(0 0 20px rgba(0, 224, 198, 0.5));
    transition: transform 0.2s;
}

.modal-project-hero .play-big-btn:hover svg {
    transform: scale(1.1);
}

.modal-project-info {
    padding: 32px 40px 40px;
}

.modal-project-info .cat-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.modal-project-info h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
    line-height: 1.3;
}

.modal-project-info .desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.modal-project-info .meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-project-info .meta-list span {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.modal-project-info .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.modal-project-info .tags-list span {
    padding: 4px 12px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 6px;
    font-size: 12px;
}

.modal-project-info .link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    color: #000;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-project-info .link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 224, 198, 0.3);
}

.modal-project-info .link-btn svg {
    width: 16px;
    height: 16px;
}

.project-card {
    cursor: pointer;
    transition: transform 0.3s var(--transition), box-shadow 0.3s var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.project-card .project-image {
    position: relative;
    overflow: hidden;
}

.project-card .project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 7, 9, 0.8) 0%, transparent 40%);
    pointer-events: none;
}

.project-card .project-info {
    position: relative;
    z-index: 2;
}

.project-card .video-count-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    background: var(--accent);
    color: #000;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 3;
}

.project-card.is-external-link {
    cursor: pointer;
}

.project-card.is-external-link .project-image {
    position: relative;
}

.project-link-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(0, 224, 198, 0.9);
    color: #000;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 4;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-4px);
}

.project-card.is-external-link:hover .project-link-indicator {
    opacity: 1;
    transform: translateY(0);
}

.project-link-indicator svg {
    flex-shrink: 0;
}

.project-card.is-external-link .project-image img,
.project-card.is-external-link .project-visual {
    transition: transform 0.4s ease;
}

.project-card.is-external-link:hover .project-image img,
.project-card.is-external-link:hover .project-visual {
    transform: scale(1.05);
}

.project-card.is-external-link::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

/* ====== Reveal Animation ====== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays set via data-delay */
.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }
.reveal[data-delay="400"] { transition-delay: 0.4s; }
.reveal[data-delay="500"] { transition-delay: 0.5s; }

/* ====== Responsive ====== */
@media (max-width: 1200px) {
    .container,
    .nav-container,
    .hero-container {
        padding: 0 40px;
    }

    .project-grid,
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-profile {
        position: static;
    }

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    section {
        padding: 100px 0;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(7, 7, 9, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 32px 40px;
        gap: 24px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: clamp(42px, 10vw, 72px);
    }

    .photo-deco-1 {
        width: 160px;
        height: 160px;
        right: -40px;
        opacity: 0.35;
    }

    .photo-deco-2 {
        width: 120px;
        height: 80px;
        opacity: 0.4;
    }

    .photo-deco-3 {
        width: 70px;
        height: 70px;
        opacity: 0.35;
    }

    .photo-deco-4 {
        width: 100px;
        height: 100px;
        opacity: 0.25;
    }

    .photo-deco-5 {
        display: none;
    }

    .hero-meta {
        gap: 32px;
    }

    .meta-num {
        font-size: 28px;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-container {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-center {
        flex-wrap: wrap;
        justify-content: center;
    }

    .contact-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .container,
    .nav-container,
    .hero-container {
        padding: 0 20px;
    }

    .nav-container {
        padding: 0 20px;
    }

    section {
        padding: 80px 0;
    }

    .hero-title {
        font-size: 40px;
    }

    .photo-deco {
        opacity: 0.2 !important;
    }

    .photo-deco-1 {
        width: 120px;
        height: 120px;
        right: -50px;
    }

    .photo-deco-2,
    .photo-deco-3,
    .photo-deco-4 {
        display: none;
    }

    .hero-meta {
        flex-direction: column;
        gap: 24px;
    }

    .meta-divider {
        width: 40px;
        height: 1px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .profile-image {
        width: 240px;
        height: 280px;
    }

    .profile-ring-outer { width: 240px; height: 240px; }
    .profile-ring-middle { width: 210px; height: 210px; }
    .profile-ring-inner { width: 180px; height: 180px; }
    .profile-orbit { width: 225px; height: 225px; }

    .profile-avatar {
        top: 15px;
        width: 160px;
        height: 190px;
    }

    .profile-spotlight {
        width: 180px;
        height: 180px;
    }

    .contact-skills {
        gap: 8px;
    }

    .skill-pill {
        font-size: 12px;
        padding: 6px 14px;
    }

    .project-image {
        height: 200px;
    }

    .project-modal .modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 14px;
    }

    .modal-project-hero {
        min-height: 250px;
    }

    .modal-project-hero img,
    .modal-project-hero video {
        max-height: 40vh;
    }

    .modal-project-info {
        padding: 20px 24px 28px;
    }

    .modal-project-info h2 {
        font-size: 22px;
    }

    .modal-project-info .desc {
        font-size: 14px;
    }

    .modal-close-btn {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .modal-video-item {
        width: 90px;
        height: 54px;
    }

    .modal-video-grid {
        padding: 8px 10px;
        gap: 6px;
    }

    .modal-video-player-container video {
        max-height: 35vh;
    }
}