/* ===== PREMIUM GAMING DESIGN SYSTEM (OPTIMIZED) ===== */

:root {
    --bg-darkest: #050507;
    --bg-darker: #0b0b0f;
    --bg-dark: #121218;
    --bg-card: rgba(10, 10, 15, 0.82); /* Slightly more opaque, less transparency overhead */
    
    --accent-red: #ff1f4b;
    --accent-red-hover: #ff476c;
    --accent-red-dark: #b5002a;
    --accent-red-glow: rgba(255, 31, 75, 0.35);
    
    --text-primary: #ffffff;
    --text-secondary: #b8b8c4;
    --text-muted: #6b6b7a;
    
    --border-light: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(255, 31, 75, 0.25);
    
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-premium: cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-darkest);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 31, 75, 0.05), transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(139, 0, 0, 0.05), transparent 45%),
        linear-gradient(135deg, #050507 0%, #0c0c12 50%, #050507 100%);
    background-size: 150% 150%;
    transform: translate3d(0,0,0);
}

/* Cyber Grid Background - simplified size to reduce paint complexity */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 31, 75, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 31, 75, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
}

.container {
    width: min(1200px, 92%);
    margin: auto;
    position: relative;
    z-index: 2;
}

section {
    padding: clamp(60px, 10vw, 120px) 0;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darkest);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent-red), var(--accent-red-dark));
    border-radius: 10px;
}

/* NAVBAR (Optimized sticky) */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 7, 0.7);
    backdrop-filter: blur(10px); /* Reduced blur for performance */
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.3s, padding 0.3s, border-color 0.3s;
    will-change: background, padding;
}

header.scrolled {
    background: rgba(5, 5, 7, 0.92);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 31, 75, 0.12);
}

nav {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: height 0.3s;
}

header.scrolled nav {
    height: 60px;
}

.logo {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    will-change: transform;
}

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

.logo-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-red);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(15px, 3vw, 32px);
}

.nav-links a {
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.25s;
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
    transition: width 0.25s var(--transition-premium);
}

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

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

.nav-links a.active {
    color: var(--text-primary);
}

/* Mobile Hamburger Menu */
.burger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1001;
}

.burger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.25s var(--transition-premium), opacity 0.25s;
}

/* Hamburger animations */
.burger.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
    background-color: var(--accent-red);
}

.burger.toggle .line2 {
    opacity: 0;
}

.burger.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
    background-color: var(--accent-red);
}

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

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
}

.hero-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(255, 31, 75, 0.08);
    border: 1px solid rgba(255, 31, 75, 0.2);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-red);
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: clamp(2.2rem, 7vw, 4.2rem);
    line-height: 1.08;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--accent-red) 0%, #ff6b8b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.25s var(--transition-premium), box-shadow 0.25s, background 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 31, 75, 0.2);
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: transform 0.4s;
    will-change: transform;
}

.btn-primary:hover::before {
    transform: translateX(200%);
}

.btn-primary:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 8px 25px rgba(255, 31, 75, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    transform: translate3d(0, -3px, 0);
    border-color: var(--accent-red);
    background: rgba(255, 31, 75, 0.05);
    box-shadow: 0 8px 20px rgba(255, 31, 75, 0.12);
}

/* HERO CARD & STATS */
.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    transition: transform 0.25s var(--transition-premium), border-color 0.25s, background 0.25s, box-shadow 0.25s;
    will-change: transform;
}

.stat:hover {
    transform: translate3d(0, -4px, 0);
    border-color: var(--border-glow);
    background: rgba(255, 31, 75, 0.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 31, 75, 0.05);
}

.stat h3 {
    color: var(--accent-red);
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(255, 31, 75, 0.2);
}

.stat p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* SECTION HEADERS */
.section-title {
    text-align: center;
    margin-bottom: clamp(40px, 8vw, 70px);
}

.section-title h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    max-width: 600px;
    margin: auto;
}

/* ABOUT ME SECTION */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
}

.about-image-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
}

.about-image-frame {
    position: relative;
    width: min(320px, 100%);
    aspect-ratio: 1;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent-red-dark), #151522);
    padding: 3px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.about-image-frame::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 1px solid rgba(255, 31, 75, 0.1);
    border-radius: 32px;
    z-index: -1;
    pointer-events: none;
    transition: transform 0.3s var(--transition-premium), border-color 0.3s;
    will-change: transform;
}

.about-image-frame:hover::before {
    border-color: var(--accent-red);
    transform: scale3d(1.03, 1.03, 1);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 21px;
    background-color: var(--bg-dark);
}

.about-content h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.about-content p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.7;
    margin-bottom: 25px;
}

.about-content strong {
    color: var(--text-primary);
    border-bottom: 1px dashed var(--accent-red);
    padding-bottom: 2px;
}

/* CORE EXPERTISE / SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px 30px;
    transition: transform 0.25s var(--transition-premium), border-color 0.25s, box-shadow 0.25s;
    will-change: transform;
}

.skill-card:hover {
    transform: translate3d(0, -5px, 0);
    border-color: var(--border-glow);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 31, 75, 0.05);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.skill-card h3 {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-pct {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent-red);
    font-size: 0.95rem;
}

.bar {
    height: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.01);
    overflow: hidden;
    position: relative;
}

.fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-red), #ff6b8b);
    border-radius: 10px;
    box-shadow: 0 0 8px var(--accent-red);
    transition: width 1.2s cubic-bezier(0.1, 0.8, 0.2, 1);
    will-change: width;
}

/* FUTURISTIC Cyberpunk/Esports Contact Styling */
.contact-bg-blob {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 31, 75, 0.05) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 1;
    pointer-events: none;
}
.contact-bg-blob-1 {
    top: 10%;
    left: -100px;
}
.contact-bg-blob-2 {
    bottom: 10%;
    right: -100px;
}

#contact .section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

#contact .section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    margin-left: -60px;
    width: 120px;
    height: 3px;
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
    border-radius: 99px;
    transform-origin: center;
    animation: titleUnderlineMove 3s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

@keyframes titleUnderlineMove {
    0% { transform: scaleX(0.35); opacity: 0.6; }
    100% { transform: scaleX(1); opacity: 1; }
}

.contact-grid-futuristic {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-info h3 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #ffffff 0%, #a5a5b5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.7;
    margin-bottom: 25px;
}

.cyber-card {
    background: rgba(10, 10, 15, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: clamp(25px, 5vw, 45px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s var(--transition-premium);
    will-change: transform;
}

.cyber-card-glow-border {
    position: relative;
    padding: 1.5px;
    border-radius: 22px;
    background: rgba(255, 31, 75, 0.15);
    overflow: hidden;
    transition: background 0.3s, box-shadow 0.3s;
}

.cyber-card-glow-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        transparent, 
        transparent, 
        var(--accent-red), 
        transparent
    );
    animation: rotateBorder 6s linear infinite;
    z-index: 0;
    opacity: 0.3;
    pointer-events: none;
    will-change: transform;
}

.cyber-card-glow-border:hover::before {
    opacity: 0.8;
    animation: rotateBorder 3.5s linear infinite;
}

.cyber-card-glow-border:hover {
    background: rgba(255, 31, 75, 0.3);
    box-shadow: 0 0 25px rgba(255, 31, 75, 0.2);
}

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

.cyber-card-glow-border .cyber-card {
    border: none;
    background: #08080c;
    height: 100%;
    z-index: 1;
}

.mouse-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        250px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 31, 75, 0.05),
        transparent 80%
    );
    pointer-events: none;
    z-index: 0;
}

.cyber-contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.cyber-contact-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: transform 0.25s var(--transition-premium), border-color 0.25s;
    will-change: transform;
}

.cyber-contact-item:hover {
    background: rgba(255, 31, 75, 0.02);
    border-color: rgba(255, 31, 75, 0.15);
    transform: translate3d(5px, 0, 0);
}

.cyber-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: rgba(255, 31, 75, 0.04);
    border: 1px solid rgba(255, 31, 75, 0.12);
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 31, 75, 0.02);
    transition: transform 0.25s var(--transition-premium), background 0.25s, color 0.25s;
    will-change: transform;
}

.cyber-icon-box svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.cyber-contact-item:hover .cyber-icon-box {
    background: var(--accent-red);
    color: #fff;
    transform: scale3d(1.08, 1.08, 1) rotate(-5deg);
}

.cyber-contact-content span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 700;
}

.cyber-contact-content a,
.cyber-contact-content p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.25s;
}

.cyber-contact-content a:hover {
    color: var(--accent-red);
}

.esports-social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.esports-social-btn {
    position: relative;
    height: 50px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.25s var(--transition-premium), border-color 0.25s, box-shadow 0.25s, color 0.25s;
    overflow: hidden;
    will-change: transform;
}

.esports-social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    z-index: 2;
}

.esports-social-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--btn-hover-bg, var(--accent-red));
    opacity: 0;
    transform: scale3d(0.7, 0.7, 1);
    transition: transform 0.25s var(--transition-premium), opacity 0.25s;
    z-index: 1;
    will-change: transform, opacity;
}

.esports-social-btn:hover {
    color: #fff;
    border-color: var(--btn-hover-border, var(--accent-red));
    box-shadow: 0 0 15px var(--btn-hover-shadow, rgba(255, 31, 75, 0.3));
    transform: translate3d(0, -4px, 0);
}

.esports-social-btn:hover::before {
    opacity: 1;
    transform: scale3d(1, 1, 1);
}

.esports-social-btn.discord {
    --btn-hover-bg: #5865F2;
    --btn-hover-border: #5865F2;
    --btn-hover-shadow: rgba(88, 101, 242, 0.3);
}
.esports-social-btn.youtube {
    --btn-hover-bg: #FF0000;
    --btn-hover-border: #FF0000;
    --btn-hover-shadow: rgba(255, 0, 0, 0.3);
}
.esports-social-btn.github {
    --btn-hover-bg: #24292e;
    --btn-hover-border: #444;
    --btn-hover-shadow: rgba(255, 255, 255, 0.1);
}
.esports-social-btn.email-btn {
    --btn-hover-bg: var(--accent-red);
    --btn-hover-border: var(--accent-red);
    --btn-hover-shadow: rgba(255, 31, 75, 0.3);
}

/* Floating Label Inputs & Form Elements */
.contact-form-futuristic {
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 1;
    position: relative;
}

.floating-group {
    position: relative;
}

.floating-input,
.floating-textarea {
    width: 100%;
    background: rgba(5, 5, 7, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 0.9rem;
    color: #fff;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.floating-textarea {
    min-height: 120px;
    resize: vertical;
}

.floating-label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: transform 0.25s var(--transition-premium), top 0.25s, color 0.25s, background-color 0.25s;
    background: transparent;
    padding: 0 4px;
}

.floating-textarea ~ .floating-label {
    top: 20px;
    transform: none;
}

.floating-input:focus,
.floating-input:not(:placeholder-shown),
.floating-textarea:focus,
.floating-textarea:not(:placeholder-shown) {
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(255, 31, 75, 0.1);
    background: rgba(5, 5, 7, 0.95) !important;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label,
.floating-textarea:focus ~ .floating-label,
.floating-textarea:not(:placeholder-shown) ~ .floating-label {
    top: -8px;
    transform: scale3d(0.78, 0.78, 1);
    color: var(--accent-red);
    background: #08080c;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1px;
    left: 12px;
}

/* Validation styles */
.floating-input:focus:invalid,
.floating-textarea:focus:invalid {
    border-color: var(--accent-red);
}

.floating-input:not(:focus):not(:placeholder-shown):valid,
.floating-textarea:not(:focus):not(:placeholder-shown):valid {
    border-color: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.05);
}

.floating-input:not(:focus):not(:placeholder-shown):invalid,
.floating-textarea:not(:focus):not(:placeholder-shown):invalid {
    border-color: #ff3333;
    box-shadow: 0 0 8px rgba(255, 51, 51, 0.05);
}

/* Upgraded Submit Button with Sweep & GPU compositing */
.btn-futuristic {
    position: relative;
    overflow: hidden;
    width: 100%;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-futuristic svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.25s var(--transition-premium);
    will-change: transform;
}

.btn-futuristic:hover svg {
    transform: translate3d(4px, 0, 0) scale3d(1.1, 1.1, 1);
}

.btn-futuristic::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    z-index: 2;
    pointer-events: none;
    will-change: left;
}

.btn-futuristic:hover::after {
    animation: shineSweep 1.5s ease-in-out infinite;
}

@keyframes shineSweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
    z-index: 0;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Success Terminal Interface */
.success-interface {
    position: absolute;
    inset: 0;
    background: #08080c;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: scale3d(0.96, 0.96, 1);
    transition: opacity 0.4s var(--transition-premium), transform 0.4s var(--transition-premium);
    padding: 20px;
    will-change: transform, opacity;
}

.success-interface.active {
    opacity: 1;
    pointer-events: all;
    transform: scale3d(1, 1, 1);
}

.success-checkmark-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #00ff88;
    color: #00ff88;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
    margin-bottom: 20px;
    animation: pulseSuccess 2s infinite alternate;
}

@keyframes pulseSuccess {
    0% { box-shadow: 0 0 10px rgba(0, 255, 136, 0.1); }
    100% { box-shadow: 0 0 25px rgba(0, 255, 136, 0.35); }
}

.success-checkmark-box svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheckmark 0.6s ease-in-out forwards 0.3s;
}

@keyframes drawCheckmark {
    to { stroke-dashoffset: 0; }
}

.success-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.success-msg {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 320px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinSpinner 0.8s linear infinite;
}

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

/* FOOTER */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-light);
    position: relative;
    z-index: 2;
    background: var(--bg-darkest);
}

/* REVEAL ANIMATIONS ON SCROLL (GPU Optimized) */
.reveal {
    opacity: 0;
    transform: translate3d(0, 25px, 0);
    transition: opacity 0.6s var(--transition-premium), transform 0.6s var(--transition-premium);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}


/* PARTICLES CANVAS */
#particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.65;
}

/* TOAST ALERTS */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(18, 18, 24, 0.92);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--accent-red);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px 20px;
    border-radius: 10px;
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translate3d(120%, 0, 0);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    min-width: 280px;
    max-width: 400px;
    will-change: transform;
}

.toast.success {
    border-left-color: #00ff88;
}

.toast.show {
    transform: translate3d(0, 0, 0);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon.success {
    color: #00ff88;
}

.toast-icon.error {
    color: var(--accent-red);
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* RESPONSIVE MEDIA QUERIES */
* {
    -webkit-tap-highlight-color: transparent;
}

body.nav-active {
    overflow: hidden;
}

body.nav-active::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 7, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    animation: navOverlayFade 0.35s ease forwards;
}

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

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .hero {
        padding-top: 110px;
        text-align: center;
    }
    
    .hero p {
        margin-inline: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 35px;
        text-align: center;
    }
    
    .about-image-wrapper {
        order: -1;
    }
    
    .contact-grid-futuristic {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 55px 0;
    }
    
    .burger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 75%;
        max-width: 280px;
        height: 100vh;
        background: rgba(8, 8, 12, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-left: 2px solid var(--accent-red);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        transform: translate3d(105%, 0, 0);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
    }
    
    .nav-links.active {
        transform: translate3d(0, 0, 0);
    }
    
    .nav-links .nav-link {
        opacity: 0;
        transform: translate3d(20px, 0, 0);
        transition: opacity 0.4s var(--transition-premium), transform 0.4s var(--transition-premium);
        font-size: 1.1rem;
        letter-spacing: 2px;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }
    
    .nav-links.active .nav-link {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    
    .nav-links.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active .nav-link:nth-child(2) { transition-delay: 0.18s; }
    .nav-links.active .nav-link:nth-child(3) { transition-delay: 0.26s; }
    .nav-links.active .nav-link:nth-child(4) { transition-delay: 0.34s; }
    
    /* Disable rotating border Conic gradient and cursor follower on mobile to optimize CPU/GPU */
    .cyber-card-glow-border::before {
        display: none !important;
    }
    
    .cyber-card-glow-border {
        background: rgba(255, 31, 75, 0.25) !important;
        box-shadow: 0 5px 15px rgba(255, 31, 75, 0.1);
    }
    
    #particles {
        display: none !important;
    }
    
    /* Avoid iOS Safari automatic zoom-in when selecting fields */
    .floating-input,
    .floating-textarea {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat {
        padding: 15px 10px;
    }
    
    .stat h3 {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }
    
    .stat p {
        font-size: 0.72rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .cyber-card {
        padding: 22px 16px;
    }
    
    .esports-social-grid {
        gap: 8px;
    }
}