/* ===================================
   Advanced Portfolio - Ruphak Varmaa
   =================================== */

/* CSS Variables */
:root {
    /* Colors - Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b80;
    --accent-primary: #6c5ce7;
    --accent-secondary: #a29bfe;
    --accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #74b9ff 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Typography */
    --font-primary: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Effects */
    --blur-amount: 20px;
    --glow-color: rgba(108, 92, 231, 0.5);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f0f5;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

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

body {
    font-family: var(--font-primary);
    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;
}

::selection {
    background: var(--accent-primary);
    color: white;
}

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

ul, ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===================================
   Custom Cursor - Enhanced
   =================================== */
.cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s, opacity 0.3s;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.5), 0 0 40px rgba(108, 92, 231, 0.3);
}

.cursor-follower {
    position: fixed;
    width: 45px;
    height: 45px;
    border: 2px solid rgba(108, 92, 231, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s, border 0.3s, background 0.3s;
    backdrop-filter: blur(2px);
}

.cursor.hover {
    width: 50px;
    height: 50px;
    background: rgba(108, 92, 231, 0.1);
    border: 2px solid #6c5ce7;
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.6), 0 0 60px rgba(108, 92, 231, 0.3);
}

.cursor-follower.hover {
    width: 70px;
    height: 70px;
    border-color: rgba(162, 155, 254, 0.8);
    background: rgba(108, 92, 231, 0.05);
}

.cursor.clicking {
    transform: translate(-50%, -50%) scale(0.8);
}

.cursor-follower.clicking {
    transform: translate(-50%, -50%) scale(0.9);
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none;
    }
}

/* ===================================
   Three.js Canvas
   =================================== */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

/* Professional Gradient Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(116, 185, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(162, 155, 254, 0.08) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* Animated gradient orbs */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 30%, rgba(108, 92, 231, 0.03) 0%, transparent 30%),
        radial-gradient(circle at 70% 70%, rgba(0, 210, 211, 0.03) 0%, transparent 30%);
    animation: gradientMove 20s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(5deg); }
    50% { transform: translate(-1%, 3%) rotate(-3deg); }
    75% { transform: translate(3%, -2%) rotate(3deg); }
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(116, 185, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(162, 155, 254, 0.05) 0%, transparent 60%);
}

/* ===================================
   Loader
   =================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-logo .bracket {
    color: var(--accent-primary);
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: var(--glass-border);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.loader-progress {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.3s;
}

.loader-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

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

/* ===================================
   Glass Card Effect
   =================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-medium);
}

.glass-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.2);
    transform: translateY(-5px);
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 1000;
    transition: all var(--transition-medium);
}

.navbar.scrolled {
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
}

.nav-logo .bracket {
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

.nav-logo:hover .bracket {
    color: var(--accent-secondary);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

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

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-medium);
}

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

.nav-link:hover::before {
    width: 100%;
}

.nav-link::after {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    transform: rotate(180deg);
}

.toggle-icon {
    position: relative;
}

.toggle-icon i {
    font-size: 1.1rem;
    transition: all var(--transition-medium);
}

.toggle-icon .fa-sun {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    opacity: 0;
}

[data-theme="light"] .toggle-icon .fa-moon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="light"] .toggle-icon .fa-sun {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0);
}

/* Nav CTA Button */
.nav-cta {
    padding: 0.75rem 1.5rem;
    background: var(--accent-gradient);
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium);
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left var(--transition-slow);
}

.nav-cta:hover::before {
    left: 100%;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

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

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

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right var(--transition-medium);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-cta {
        display: none;
    }
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary .btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a29bfe 0%, #74b9ff 100%);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.btn-primary:hover .btn-bg {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.4);
}

.btn-text, .btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    transition: transform var(--transition-medium);
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
}

.btn-glass .btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.btn-glass:hover {
    border-color: var(--accent-primary);
    background: rgba(108, 92, 231, 0.1);
}

.btn-glass:hover .btn-shine {
    animation: shine 0.6s ease;
}

@keyframes shine {
    to { left: 100%; }
}

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

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(108, 92, 231, 0.1);
}

.btn-full {
    width: 100%;
}

/* Magnetic Button Effect */
.magnetic-btn {
    transition: transform var(--transition-fast);
}

/* ===================================
   Container & Section
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-primary);
    opacity: 0.8;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: #00d26a;
    border-radius: 50%;
    animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 210, 106, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(0, 210, 106, 0); }
}

/* Hero Title */
.hero-title {
    margin-bottom: 1.5rem;
}

.title-line {
    overflow: hidden;
}

.title-small {
    display: block;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.title-name {
    display: block;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip-path: inset(0 100% 0 0);
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 #00ffff;
    clip-path: inset(0 0 0 100%);
    animation: glitch-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 100% 0 0); }
    10% { clip-path: inset(20% 0 60% 0); }
    20% { clip-path: inset(80% 0 10% 0); }
    30% { clip-path: inset(0 100% 0 0); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 100%); }
    15% { clip-path: inset(50% 0 30% 0); }
    25% { clip-path: inset(10% 0 70% 0); }
    35% { clip-path: inset(0 0 0 100%); }
}

.title-role {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.role-static {
    color: var(--text-secondary);
}

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

/* Typing Animation */
.typing-wrapper {
    display: inline-flex;
    align-items: center;
}

.typing-cursor {
    width: 3px;
    height: 1.5rem;
    background: var(--accent-primary);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Hero Description */
.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-description .word {
    display: inline-block;
    margin-right: 0.3em;
}

.highlight-word {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Hero CTA */
.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-line {
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: var(--glass-border);
}

.stat-item:last-child .stat-line {
    display: none;
}

/* Hero Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--glass-border);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    width: 4px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 4px;
    position: absolute;
    left: -1.5px;
    animation: scrollDown 2s ease-in-out infinite;
}

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

/* Hero Social */
.hero-social {
    position: fixed;
    left: 2rem;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: 100;
}

.social-line {
    width: 1px;
    height: 80px;
    background: var(--glass-border);
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-medium);
    position: relative;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-medium);
}

.social-link:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.social-link:hover::before {
    border-color: var(--accent-primary);
    transform: scale(1.2);
    opacity: 0;
}

@media (max-width: 768px) {
    .hero-social {
        display: none;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-line {
        right: -1rem;
    }
}

/* ===================================
   About Section
   =================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-visual {
    position: relative;
}

.visual-container {
    position: relative;
}

.visual-frame {
    position: relative;
    padding: 2rem;
}

.frame-corner {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid var(--accent-primary);
}

.frame-corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.frame-corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.frame-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.frame-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.visual-image {
    aspect-ratio: 1;
    background: var(--glass-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.placeholder-icon {
    font-size: 5rem;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

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

.code-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0.3;
}

.code-lines span {
    height: 8px;
    background: var(--text-muted);
    border-radius: 4px;
}

.code-lines span:nth-child(1) { width: 80px; }
.code-lines span:nth-child(2) { width: 120px; }
.code-lines span:nth-child(3) { width: 60px; }
.code-lines span:nth-child(4) { width: 100px; }
.code-lines span:nth-child(5) { width: 40px; }

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(108, 92, 231, 0.1) 100%);
}

.visual-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
}

.deco-circle {
    width: 150px;
    height: 150px;
    border: 2px dashed var(--glass-border);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

/* Floating Cards */
.floating-card {
    position: absolute;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: floatCard 3s ease-in-out infinite;
}

.experience-card {
    bottom: 0;
    left: -30px;
    animation-delay: 0s;
}

.projects-card {
    top: 30%;
    right: -40px;
    animation-delay: 1.5s;
}

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

.floating-card .card-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
}

.floating-card .card-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.floating-card .card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* About Content */
.content-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.tag-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.about-subtitle {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    text-align: left;
}

.about-subtitle .char {
    display: inline-block;
}

.about-text {
    margin-bottom: 2rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--text-primary);
}

/* About Highlights */
.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    transition: all var(--transition-medium);
}

.highlight-item:hover {
    transform: translateX(10px);
}

.highlight-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
}

.highlight-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.about-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-icon-left {
    margin-right: 0.5rem;
}

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

    .about-visual {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .about-highlights {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Skills Section
   =================================== */
.skills-orbit {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.orbit-center {
    position: relative;
    width: 300px;
    height: 300px;
}

.center-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

.center-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed var(--glass-border);
    border-radius: 50%;
}

.ring-1 {
    width: 200px;
    height: 200px;
    animation: orbitSpin 20s linear infinite;
}

.ring-2 {
    width: 280px;
    height: 280px;
    animation: orbitSpin 30s linear infinite reverse;
}

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

.orbit-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-primary);
    transition: all var(--transition-medium);
    cursor: pointer;
}

/* Position orbit items */
.ring-1 .orbit-item:nth-child(1) { top: -25px; left: 50%; transform: translateX(-50%); }
.ring-1 .orbit-item:nth-child(2) { top: 50%; right: -25px; transform: translateY(-50%); }
.ring-1 .orbit-item:nth-child(3) { bottom: -25px; left: 50%; transform: translateX(-50%); }
.ring-1 .orbit-item:nth-child(4) { top: 50%; left: -25px; transform: translateY(-50%); }

.ring-2 .orbit-item:nth-child(1) { top: 10%; left: 10%; }
.ring-2 .orbit-item:nth-child(2) { top: 10%; right: 10%; }
.ring-2 .orbit-item:nth-child(3) { bottom: 10%; right: 10%; }
.ring-2 .orbit-item:nth-child(4) { bottom: 10%; left: 10%; }

.orbit-item:hover {
    background: var(--accent-gradient);
    color: white;
    transform: scale(1.2);
    box-shadow: 0 0 30px var(--glow-color);
}

.orbit-item::after {
    content: attr(data-skill);
    position: absolute;
    bottom: -30px;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
}

.orbit-item:hover::after {
    opacity: 1;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-category {
    padding: 2rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 12px;
    color: white;
    font-size: 1.25rem;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    cursor: pointer;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

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

.skill-level {
    font-size: 0.875rem;
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

.skill-bar {
    height: 6px;
    background: var(--glass-border);
    border-radius: 6px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 6px;
    width: 0;
    position: relative;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-glow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--glow-color);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.skill-item:hover .progress-glow {
    opacity: 1;
}

@media (max-width: 992px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skills-orbit {
        display: none;
    }
}

/* ===================================
   Projects Section
   =================================== */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-medium);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Project Card with 3D Flip */
.project-card {
    perspective: 1000px;
    height: 400px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.project-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.card-front {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.card-back {
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-visual {
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.visual-bg {
    font-size: 4rem;
    color: var(--accent-primary);
    opacity: 0.3;
    transition: all var(--transition-medium);
}

.project-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-primary);
    opacity: 0.5;
}

.project-info {
    padding: 1.5rem;
}

.project-year {
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.project-brief {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-back .project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: rgba(108, 92, 231, 0.15);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--transition-medium);
}

.project-link:hover {
    background: var(--accent-gradient);
    border-color: transparent;
}

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

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Experience Section
   =================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-track {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-progress {
    width: 100%;
    height: 0;
    background: var(--accent-gradient);
    transition: height 0.5s ease;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
}

.marker-icon {
    width: 42px;
    height: 42px;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1rem;
    position: relative;
    z-index: 1;
    transition: all var(--transition-medium);
}

.timeline-item:hover .marker-icon {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
}

.marker-pulse {
    position: absolute;
    inset: 0;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    animation: markerPulse 2s ease infinite;
}

@keyframes markerPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

.timeline-content {
    padding: 1.5rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-primary);
}

.timeline-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(108, 92, 231, 0.15);
    border-radius: 50px;
    color: var(--accent-primary);
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.timeline-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* ===================================
   Contact Section
   =================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
}

.info-header {
    margin-bottom: 2rem;
}

.info-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.info-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    transition: all var(--transition-medium);
}

.info-card:hover {
    transform: translateX(10px);
}

.info-card .card-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
}

.card-details {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all var(--transition-medium);
}

.social-btn:hover {
    color: var(--accent-primary);
    transform: translateY(-5px);
}

/* Contact Form */
.contact-form {
    padding: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-group textarea {
    resize: none;
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all var(--transition-fast);
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -0.75rem;
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-medium);
}

.form-group input:focus ~ .input-line,
.form-group textarea:focus ~ .input-line {
    width: 100%;
}

@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

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

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.heart {
    color: #ff6b6b;
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ===================================
   Back to Top
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    transform: translateY(-5px);
}

.progress-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-circle {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 3;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.3s;
}

/* ===================================
   Reveal Animations
   =================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px);
    white-space: pre;
}

.split-text.revealed .char {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Responsive Utilities
   =================================== */
@media (max-width: 1200px) {
    :root {
        --section-padding: 100px;
    }
}

@media (max-width: 992px) {
    :root {
        --section-padding: 80px;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    html {
        font-size: 14px;
    }

    .section-header {
        flex-wrap: wrap;
    }

    .section-line {
        display: none;
    }
}
